[SERVER-64198] Observer updating per-collection orphaned documents counters Created: 04/Mar/22  Updated: 06/Dec/22  Resolved: 06/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-64196 Implement BalancerStatisticsRegistry ... Closed
is depended on by SERVER-64242 Make `collStats` aggregation stage re... Closed
Assigned Teams:
Sharding EMEA
Participants:

 Description   

Implement an observer reacting to changes happening on the numOrphanDocs field of range deletion documents.

The objective is to keep in sync the persistent state with BalancerStatsRegistry's per-collection orphaned documents counters as follows:

EVENT Donor side  Recipient side
Migrated batch
(numOrphanDocs increases)
Increase in-memory orphans counter by num docs in batch  Increase in-memory orphans counter by num docs in batch 
Migration commits
(pending = false on donor)
Increase in-memory orphans counter by  numOrphanDocs  Decrease in-memory orphans counter by numOrphanDocs
Migration aborts
(pending = false on recipient)
///// /////
Range-deleter deletes batch Decrease in-memory orphans counter by num of deleted docs Decrease in-memory orphans counter by num of deleted docs


 Comments   
Comment by Pierlauro Sciarelli [ 06/Apr/22 ]

Closing as duplicate because this ticket has been addressed under SERVER-64196

Generated at Thu Feb 08 05:59:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.