Maybe it's just me, but I've managed to make the error a few times that I've created a table as a set only to later realize that it should have been an ordered_set.
Mnesia doesn't support changing this, and in mnesia_rocksdb, we have the added complication that the change may involve re-coding each object in the table.
This PR makes it possible to do this. mnesia_rocksdb_admin:change_table_type/[3,4] allow for changing the table type between sext and ordered_set, and if need be, migrating the serialization of the data.
This can be done either synchronously or asynchronously, and the migration process is stored persistently in the admin metadata table, and can be resumed after restart.
mnesia_rocksdb_admin:migrate_encoding/[3,4] support doing the re-coding manually, but using the above wrapper is strongly recommended.
See the test/mnesia_rocksdb_migration_SUITE for examples of use.
Maybe it's just me, but I've managed to make the error a few times that I've created a table as a `set` only to later realize that it should have been an `ordered_set`.
Mnesia doesn't support changing this, and in `mnesia_rocksdb`, we have the added complication that the change may involve re-coding each object in the table.
This PR makes it possible to do this.
`mnesia_rocksdb_admin:change_table_type/[3,4]` allow for changing the table type between `sext` and `ordered_set`, and if need be, migrating the serialization of the data.
This can be done either synchronously or asynchronously, and the migration process is stored persistently in the admin metadata table, and can be resumed after restart.
`mnesia_rocksdb_admin:migrate_encoding/[3,4]` support doing the re-coding manually, but using the above wrapper is strongly recommended.
See the `test/mnesia_rocksdb_migration_SUITE` for examples of use.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Maybe it's just me, but I've managed to make the error a few times that I've created a table as a
setonly to later realize that it should have been anordered_set.Mnesia doesn't support changing this, and in
mnesia_rocksdb, we have the added complication that the change may involve re-coding each object in the table.This PR makes it possible to do this.
mnesia_rocksdb_admin:change_table_type/[3,4]allow for changing the table type betweensextandordered_set, and if need be, migrating the serialization of the data.This can be done either synchronously or asynchronously, and the migration process is stored persistently in the admin metadata table, and can be resumed after restart.
mnesia_rocksdb_admin:migrate_encoding/[3,4]support doing the re-coding manually, but using the above wrapper is strongly recommended.See the
test/mnesia_rocksdb_migration_SUITEfor examples of use.