Make migration api more friendly#2420
Conversation
rphmeier
left a comment
There was a problem hiding this comment.
one problem with passing an Arc is that it allows migrations to Clone it or create weak pointers, which might prevent the destructor (which closes the rocksdb handle) from ever being run before the directory is deleted.
I think this is fine as a patch but it doesn't fully address the problem that the migration manager isn't suited to our current database format.
| } | ||
|
|
||
| try!(self.walk_journal(source)); | ||
| try!(self.walk_journal(source.clone())); |
There was a problem hiding this comment.
don't see why a clone is necessary here. works just fine with a reference.
|
This PR should also allow safer in-place upgrades (by running complex migration logic once based on the given column rather than running them after every migration) and prevent issues like #2411. |
|
@rphmeier yeah, this was always the plan |
* js: signaturereg registered, remove hardcoding fixes for non-null returns update ABIs to latest deployed versions update Morden registry address (#2417) using arc (#2420) asterisk space removed redundant memcopy Update gitlab-ci Fixing logs-receipt matching (#2403) fix broken beta compilation Fixing transaction queue (#2392) separate mod for tests bloom filter crate
once it is passed with arc reference, original database can now be used in more complex queries