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

DDL operations on timeseries collection during tenant migration can crash the recipient due to an invariant failure.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.1, 7.2.0-rc0, 7.0.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.1, v7.0
    • Execution NAMR Team 2023-10-16, Execution Team 2023-10-30, Execution Team 2023-11-13
    • 120

      When the timeseries collection doesn't start with the expected 'system.buckets' prefix, we invariant. During the replay of createCollection oplog entry on an inconsistent data (i.e, oplog application mode kInitialSync), if a collection already exits with the same name, we temporarily rename it to temp name (starting with "tempXXX.create") before creating the new collection. So, a timerseries collection db.system.bucket.coll can get temporarily renamed to non-timeseries temp collection db.tempXXX.create. If a user runs the 'listCollection' command before the oplog could finish catching up to make the data consistent, they may observe that the timeseries collection starts with 'tempXXX' rather than 'system.buckets,' potentially triggering an invariant failure.

      Though both tenant migration and logical initial sync behaves similarly, considering the fact that we don't allow external user commands when node is in initial sync, this issue only impacts tenant migration where the cloud can run `listCollections` on the recipient primary to get the list of collections to drop on recipient before retrying the migration, following the initial migration attempt failed after partially migrating donor data.

      Since this a bug can cause server crash in Serverless, this will affect other tenants located in the recipient. To be noted, The tenant migration will be retired in 7.2, so this is an issue only when with 7.1 and below.

            wei.hu@mongodb.com Wei Hu
            suganthi.mani@mongodb.com Suganthi Mani
            0 Vote for this issue
            5 Start watching this issue