Repository navigation
Conversation
…reliability gate SonarCloud reports java:S3077 for three volatile fields in TierManager that hold a mutable map, an array and a mutable FolderManager. They are now AtomicReferences: folderManagers holds an unmodifiable map that rebuildFolders() replaces as a whole, tierDiskTotalSpace an array that is replaced as a whole and copied once in getTierDiskTotalSpace(), and TierFolderManager.manager the FolderManager created by the memoized supplier. The identity check in hasSpaceForRecovery() still compares the map read before the check with the one published after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19228 +/- ##
=========================================
Coverage 48.88% 48.89%
Complexity 689 689
=========================================
Files 5588 5588
Lines 413444 413448 +4
Branches 54537 54537
=========================================
+ Hits 202128 202150 +22
+ Misses 211316 211298 -18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…s returned as a copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.



Description
SonarCloud's quality gate currently fails for pull requests with
new_reliability_rating= 2 (B, the limit is A). The rating comes from threejava:S3077findings inTierManager, which recent master commits (#19126, #19151, #19161) touched, not from the pull requests themselves (e.g. #19108):folderManagers(line 65)Mappublished through avolatilefield is not thread-safeAtomicReferenceholding an unmodifiable map thatrebuildFolders()replaces as a wholetierDiskTotalSpace(line 78)long[]behind avolatilefieldAtomicReference<long[]>, replaced as a whole;getTierDiskTotalSpace()reads it once and returns a copyTierFolderManager.manager(line 236)FolderManagerbehind avolatilefieldAtomicReference<FolderManager>, set by the memoized supplierBehavior is unchanged:
hasSpaceForRecovery()still compares the map it read before the check with the one published afterwards, so a rebuild in between still prevents the recovery.Tests
TierManagerTest,TierManagerDiskFullReloadTest,SnapshotLoaderDiskFullReloadTest,IoTDBSnapshotTest,TTLTest: 22 tests pass (1 skipped);spotless:checkpasses.🤖 Generated with Claude Code