Observer updating per-collection orphaned documents counters

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: