chrisdutz opened a new pull request, #19228: URL: https://github.com/apache/iotdb/pull/19228
## Description SonarCloud's quality gate currently fails for pull requests with `new_reliability_rating` = 2 (B, the limit is A). The rating comes from three `java:S3077` findings in `TierManager`, which recent master commits (#19126, #19151, #19161) touched, not from the pull requests themselves (e.g. #19108): | Field | Finding | Fix | |------|------|-----| | `folderManagers` (line 65) | a `Map` published through a `volatile` field is not thread-safe | `AtomicReference` holding an unmodifiable map that `rebuildFolders()` replaces as a whole | | `tierDiskTotalSpace` (line 78) | a `long[]` behind a `volatile` field | `AtomicReference<long[]>`, replaced as a whole; `getTierDiskTotalSpace()` reads it once and returns a copy | | `TierFolderManager.manager` (line 236) | a mutable `FolderManager` behind a `volatile` field | `AtomicReference<FolderManager>`, set by the memoized supplier | Behavior 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:check` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
