HDDS-14076. Disable SSTFilteringService when defrag feature is enabled#9495
Conversation
jojochuang
left a comment
There was a problem hiding this comment.
looks good. i'll let @swamirishi to take another look
sadanand48
left a comment
There was a problem hiding this comment.
Thanks @smengcl for the patch. LGTM
There was a problem hiding this comment.
Pull request overview
This PR optimizes snapshot SST filtering by disabling the SSTFilteringService when the defrag service is enabled, since defragmentation already performs filtering operations. It also prevents filtering from running on snapshots that have already been defragged.
Key changes:
- Added logic to disable SSTFilteringService initialization when SnapshotDefragService is enabled
- Enhanced SSTFilteringService to skip defragged snapshots during processing
- Added a new method to expose the last defrag timestamp from snapshot local data
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| KeyManagerImpl.java | Added check to prevent SSTFilteringService from starting when defrag service is enabled |
| SstFilteringService.java | Added logic to skip defragged snapshots during filtering, preventing redundant work |
| OmSnapshotLocalDataManager.java | Added getter method to expose last defrag time for determining if a snapshot has been defragged |
| TestSstFilteringService.java | Added unit test to verify SSTFilteringService is properly disabled when defrag service is enabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
swamirishi
left a comment
There was a problem hiding this comment.
@smengcl thanks for the patch. Changes look good to me apart from the minor comment I have left.
|
Thanks @sadanand48 @jojochuang @swamirishi for the reviews. |
What changes were proposed in this pull request?
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14076
How was this patch tested?