File tree Expand file tree Collapse file tree
modules/module-mongodb-storage/src/storage/implementation
packages/service-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,8 +581,8 @@ export abstract class MongoSyncBucketStorage
581581 * when the whole bucket was read, otherwise estimated via {@link storage.estimateDistinctRows}); fragmentation is
582582 * then `operations / rows`.
583583 */
584- protected async estimateRowsFromOperationSample (
585- collection : mongo . Collection < any > ,
584+ protected async estimateRowsFromOperationSample < T extends mongo . Document > (
585+ collection : mongo . Collection < T > ,
586586 pipelinePrefix : mongo . Document [ ] ,
587587 operations : number ,
588588 sampled : boolean
Original file line number Diff line number Diff line change @@ -271,9 +271,8 @@ export const validate = routeDefinition({
271271/**
272272 * Per-bucket report of total operations vs total live rows in storage, for the active sync config.
273273 *
274- * Answers the recurring "why is my Data Synced so high" question instance-wide
275- * a high `operations / rows` ratio indicates fragmented buckets that a compact or
276- * defragment can reclaim.
274+ * Answers the recurring "why is my Data Synced so high" question. A high `operations / rows` ratio
275+ * indicates fragmented buckets that a compact or defragment can reclaim.
277276 */
278277export const bucketReport = routeDefinition ( {
279278 path : '/api/admin/v1/bucket-report' ,
Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ export interface SyncRulesBucketStorage
173173 * Per-bucket report of total operations vs total live rows in storage.
174174 *
175175 * Intended for an on-demand admin/diagnostics view (e.g. answering "why is my Data Synced so high"),
176- * not as a live gauge. Operation and live-row counts are aggregated from storage; the exact source is
177- * backend-specific (MongoDB reads pre-aggregated bucket state, Postgres scans bucket data). May be
176+ * not as a live gauge. How the counts are derived is backend-specific, and the report may be relatively
178177 * expensive on large instances.
179178 *
180179 * Optional: storage providers that don't implement it are reported as unsupported by the API.
You can’t perform that action at this time.
0 commit comments