rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

ldb tool : please make the error message when converting from universal compaction to level compaction more descriptive.

Open ytrezq opened this issue 3 years ago • 2 comments

Currently, if someone tries to change compaction style to level compaction in order to export the database over the network, the message will read like this :

sh-5.1# ldb --db=/mnt/openethereum/xdai/db/3c648cbdc4c9333d/archive/db change_compaction_style --old_compaction_style=1 --new_compaction_style=0 --ignore_unknown_options --block_size=33554432 --compression_type=no --try_load_options --auto_compaction=true --block_size=33554432 --file_size=1572864
Failed: Convert from universal compaction to level compaction. Nothing to do.

This is misleading because the underlying issue isn’t tied to a specific database, but according to the source code, the real issue is https://github.com/facebook/rocksdb/blob/main/tools/ldb_cmd.cc#L2396 ldb doesn’t support it.

The message should be changed for stating more clearly this isn’t supported by the ldb tool and isn’t specific to a database.

Relevant commit explaining the situation

ytrezq avatar Aug 28 '22 18:08 ytrezq

Would you like to submit a PR?

hx235 avatar Aug 29 '22 19:08 hx235

@hx235 : I rather think the commit is almost 9 years old so the right thing to do is have ldb feature on par with the library since this is now supported. However I don t know how to perform such right task.

ytrezq avatar Aug 29 '22 19:08 ytrezq