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

Incorrect error code for blocked write during tenant migration

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Server Serverless 2023-05-29

      confusingly, checkIfCanReadOrBlock is called for a write, which calls into TenantMigrationRecipientAccessBlocker::getCanReadFuture and responds with a ErrorCodes::SnapshotTooOld error code is blocked: https://github.com/10gen/mongo/blob/0a544ab77317cdac47f7239fb251f8256dbbba63/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp#L111-L119

      additionally, the message states that a Tenant read is blocked, when this can happen for a write.

      at the bare minimum, we should switch out the current error code for something more correct and also consider updating the message, updating the names of these methods, and/or adding a comment(s) to clarify that this can be invoked for writes as well.

            Assignee:
            christopher.caplinger@mongodb.com Christopher Caplinger
            Reporter:
            christopher.caplinger@mongodb.com Christopher Caplinger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: