Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-64198

Observer updating per-collection orphaned documents counters

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding EMEA

      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

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: