Add disk space checking before compaction operations - #1
Draft
bpatelcs wants to merge 1 commit into
Draft
Conversation
Summary: Intent: - Prevent compaction operations from failing due to insufficient disk space - Avoid potential data loss or system instability from failed compaction attempts - Enable proactive monitoring and alerting for disk space issues Changes: - Added `spaceMultiplier` field to Plan class to encapsulate strategy-specific space requirements - Introduced Environment dependency injection through TSDBPlugin → TSDBEngineFactory → TSDBEngine → ClosedChunkIndexManager - Implemented `hasSufficientDiskSpace()` method with overflow protection and specific exception handling - Configured space multipliers per strategy: SizeTieredCompaction (2.0x), ForceMergeCompaction (0.3x), NoopCompaction (0.0x) - Enhanced logging with comprehensive diagnostic context (strategy, indexes count, space calculations, paths) - Added input validation to reject negative space multipliers Test Plan: - Ran `./gradlew build` - all tests pass - Verified space calculation logic handles edge cases (empty plans, null environment, overflow scenarios) - Existing test suite covers compaction workflows with the new disk space checks Jira Issues: --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Intent:
Changes:
spaceMultiplierfield to Plan class to encapsulate strategy-specific space requirementshasSufficientDiskSpace()method with overflow protection and specific exception handlingTest Plan
./gradlew build- all tests passIssues