[test only] Add new parameter to control when chunk migrations are allowed to proceed when recipient PIT history may be lost

XMLWordPrintableJSON

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v9.0
    • CAR Team 2026-08-03
    • 200
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      Chunk migrations may fail when moving a chunk back to a shard that previously owned it, because the migration must preserve the recipient shard's PIT snapshot history. In practice, this means the chunk may not be movable again until minSnapshotHistoryWindowInSeconds has elapsed, which defaults to 5 minutes.

      More details on why this protection is needed are in SERVER-129673.

      As a result, tests that run the balancer in the background may take longer, especially when they need to wait for a shard to drain or for a collection to become balanced.

      This is generally not an issue in production, because moving a chunk back to its original shard is already delayed by orphanCleanupDelaySecs, which is 1 hour. In tests, however, the situation is different: resmoke overrides that parameter to 1 in standalone.py, which is why this behavior is much more likely to surface there.

      The goal of this task is to add a new test-only parameter that controls how long chunk migrations must wait before proceeding when there is a risk of losing PIT snapshot history, ignoring in this case the minSnapshotHistoryWindowInSeconds value (in test environments only).

            Assignee:
            Silvia Surroca
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: