git-hulk commented on issue #2601:
URL: https://github.com/apache/kvrocks/issues/2601#issuecomment-2756767359

   > Sorry for delaying, I'm also good to disable this. I'm not so familiar 
with how `change_level` works, I'll take a careful round about this part of 
code this weekend
   
   The rocksdb's wiki[1] has a clear explanation about this option. The main 
goal is to try best to do the compactoin migration to minimum level. And from 
the implementation, it requires the source level is empty after moving(cannot 
partially move files in the level).
   
   ```
   CompactRangeOptions::change_level,CompactRangeOptions::target_level 
Together, these options control the level where the compacted files will be 
placed. If target_level is -1, the compacted files will be moved to the minimum 
level whose computed max_bytes is still large enough to hold the files. 
Intermediate levels must be empty. For example, if the files were initially 
compacted to L5 and L2 is the minimum level large enough to hold the files, 
they will be placed in L2 if L3 and L4 are empty or in L4 if L3 is non-empty. 
If target_level is positive, the compacted files will be placed in that level 
provided intermediate levels are empty. If any any of the intermediate levels 
are not empty, the compacted files will be left where they are.
   ```
   
   
   
   [1] https://github.com/facebook/rocksdb/wiki/Manual-Compaction


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to