An initial implementation of kCompactionStopStyleSimilarSize for universal compaction#47
Conversation
1) make summary less likely to be truncated 2) format human-readable file sizes in summary 3) log the motivation for each universal compaction
|
I rebased this in light of c699c84 |
|
Can somebody pl review this? Looks like an useful implementation to me. |
There was a problem hiding this comment.
This means lots of memcpy and it's all done inside of the mutex. Can you refactor the code such that InputSummary directly takes char* output (parameter of Summary) and returns the size (so that you can keep writing) (maybe Summary can also take char **output and advance the pointer automatically)? You can do similar thing with FileSizeSummary.
|
I have small comments, but code mostly looks good. Would like somebody else to take a look at it, though. |
|
Thanks for the comments so far, agree & will do next week. |
- reduce string copying in Compaction::Summary - simplify file number checking in UniversalCompactionStopStyleSimilarSize unit test
|
Hey @mlin , are you interested in finishing this or should we take over? |
|
Sorry for delayed reply- 5e3aeb5 addressed the specific comments and I have no further immediate plans. All yours! |
An initial implementation of kCompactionStopStyleSimilarSize for universal compaction
|
Tnx! :) |
…19.1-sst-insert-ordering [19.1 backport] table: Always check key ordering when inserting to an SST
rocksdb/universal_compaction.h describes an alternate strategy for picking files to merge in a universal compaction, kCompactionStopStyleSimilarSize, but there's no apparent implementation. The strategy (if I understood it correctly) is precisely what I needed for a specific application, so I implemented it. Probably this will need some further adjustments going forward, but it's doing the trick for me.