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

TenantFileImporter service should skip the feature document while iterating through the donor mdb_catlog table.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical - P2 Critical - P2
    • 7.2.1, 8.0.0-rc0, 7.3.0-rc2
    • None
    • None
    • None
    • Fully Compatible
    • v7.3, v7.2
    • Execution Team 2024-02-05

    Description

      The mdb_catalog can contain a special feature document with an empty namespace. Shard merge doesn't handle this edge case correctly and attempts to read that document, which is incorrect.  The fix is TenantFileImporter service should skip the feature document while iterating through the donor mdb_catlog table.

      Extra context : Starting from version 5.1 (SERVER-57125), the feature document is no longer generated. But, any database created before version 5.1 may contain this document. This means, trying to execute shard merge on a database created before version 5.1.0 will result in the following error:

      {"t":{"$date":"2024-01-25T18:22:56.798+00:00"},"s":"E",  "c":"TENANT_M", "id":6615001, "ctx":"TenantFileImporterService","msg":"TenantFileImporterService::_handleEvents encountered an error","attr":{"migrationId":{"uuid":{"$uuid":"dc9ce573-0ece-4bc4-8826-c51d94802c8c"}},"error":"InvalidTenantId: Failed to extract a valid tenant from namespace ''."}}
      

      This was caught in Serverless production where is causing shard merges to fail

      Attachments

        Activity

          People

            suganthi.mani@mongodb.com Suganthi Mani
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: