-
Notifications
You must be signed in to change notification settings - Fork 881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Trie log pruning #6000
[WIP] Trie log pruning #6000
Conversation
…anager Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Copied from https://github.com/ahamlat/RocksdDB-Column-Families-Size Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
|
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
String size = rocksdb.getProperty(cfHandle, "rocksdb.estimate-live-data-size"); | ||
boolean emptyColumnFamily = false; | ||
if (!size.isEmpty() && !size.isBlank()) { | ||
long sizeLong = Long.parseLong(size); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
String totolSstFilesSize = rocksdb.getProperty(cfHandle, "rocksdb.total-sst-files-size"); | ||
if (!totolSstFilesSize.isEmpty() && !totolSstFilesSize.isBlank()) { | ||
out.println( | ||
"Total size of SST Files : " + formatOutputSize(Long.parseLong(totolSstFilesSize))); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
String liveSstFilesSize = rocksdb.getProperty(cfHandle, "rocksdb.live-sst-files-size"); | ||
if (!liveSstFilesSize.isEmpty() && !liveSstFilesSize.isBlank()) { | ||
out.println( | ||
"Size of live SST Filess : " + formatOutputSize(Long.parseLong(liveSstFilesSize))); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
This reverts commit 8722162. Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/TrieLogSubCommand.java
Fixed
Show fixed
Hide fixed
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
|
||
out.printf("Current head block number: %d\n", blockchain.getChainHead().getHeight()); | ||
out.printf("Trie log layers to retain: %d\n", layersToRetain); | ||
final long deleteBelowHere = blockchain.getChainHead().getHeight() - layersToRetain + 1; |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Added some subcommands for debugging...
(based on https://github.com/ahamlat/RocksdDB-Column-Families-Size)
Steps to install on a box: