Pre-seed zero-value metrics for empty buckets#378
Pre-seed zero-value metrics for empty buckets#378delthas wants to merge 1 commit intodevelopment/1.17from
Conversation
When all buckets are empty (0 objects), count-items produces no
bucket metric documents in __infostore. This is because
getObjectMDStats() only populates dataMetrics.bucket entries when
the MongoDB cursor yields objects — with 0 objects, the cursor
yields nothing, _processEntryData() is never called, and
dataMetrics.bucket remains {}. The flatMap in
updateStorageConsumptionMetrics() then produces zero documents,
and the atomic collection rename leaves __infostore with only
the countitems marker.
Downstream, Scuba's deep health check queries __infostore for any
metric document and crashes when it finds none, causing CloudServer
to mark the quota service as unavailable (ARTESCA-17063).
Pre-seed dataMetrics.bucket with zero-value entries for every known
bucket in CountManager.addWork(), using consolidateDataMetrics() to
create the canonical zero structure. When workers return results for
non-empty buckets, consolidation adds on top of these zeros. For
empty buckets, the zero entries survive through to
updateStorageConsumptionMetrics, ensuring every bucket gets a
document in __infostore.
Issue: S3UTILS-224
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development/1.17 #378 +/- ##
====================================================
+ Coverage 43.62% 43.65% +0.02%
====================================================
Files 84 84
Lines 5973 5976 +3
Branches 1255 1256 +1
====================================================
+ Hits 2606 2609 +3
Misses 3321 3321
Partials 46 46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Jira issue not foundThe Jira issue S3UTILS-224 was not found. |
When all buckets are empty (0 objects), count-items produces no
bucket metric documents in __infostore. This is because
getObjectMDStats() only populates dataMetrics.bucket entries when
the MongoDB cursor yields objects — with 0 objects, the cursor
yields nothing, _processEntryData() is never called, and
dataMetrics.bucket remains {}. The flatMap in
updateStorageConsumptionMetrics() then produces zero documents,
and the atomic collection rename leaves __infostore with only
the countitems marker.
Downstream, Scuba's deep health check queries __infostore for any
metric document and crashes when it finds none, causing CloudServer
to mark the quota service as unavailable (ARTESCA-17063).
Pre-seed dataMetrics.bucket with zero-value entries for every known
bucket in CountManager.addWork(), using consolidateDataMetrics() to
create the canonical zero structure. When workers return results for
non-empty buckets, consolidation adds on top of these zeros. For
empty buckets, the zero entries survive through to
updateStorageConsumptionMetrics, ensuring every bucket gets a
document in __infostore.
Issue: S3UTILS-224