Operational Defect Database

BugZero found this defect 114 days ago.

MongoDB | 2559116

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

Last update date:

3/14/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

7.2.1

8.0.0-rc0

7.3.0-rc2

Description:

Info

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

Top User Comments

xgen-internal-githook commented on Thu, 14 Mar 2024 22:31:45 +0000: Author: {'name': 'Suganthi Mani', 'email': '38441312+smani87@users.noreply.github.com', 'username': 'smani87'} Message: SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. (#18444) (cherry picked from commit f6698560cf818fa8527614205353e290910096ee) GitOrigin-RevId: 63456a288f5e1e92d31b57dcb8a6e0bbd457fff4 Branch: v7.4test https://github.com/mongodb/mongo/commit/50afe7ed555f404e0dabc2406e06005d6068bbab xgen-internal-githook commented on Thu, 8 Feb 2024 00:13:53 +0000: Author: {'name': 'Suganthi Mani', 'email': '38441312+smani87@users.noreply.github.com', 'username': 'smani87'} Message: SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. (#18444) (cherry picked from commit f6698560cf818fa8527614205353e290910096ee) Branch: v7.2 https://github.com/mongodb/mongo/commit/ed8e3374454186b2184b06a185f8e6ce1de70dc0 xgen-internal-githook commented on Mon, 29 Jan 2024 21:07:22 +0000: Author: {'name': 'Suganthi Mani', 'email': '38441312+smani87@users.noreply.github.com', 'username': 'smani87'} Message: SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. (#18444) (cherry picked from commit f6698560cf818fa8527614205353e290910096ee) GitOrigin-RevId: 63456a288f5e1e92d31b57dcb8a6e0bbd457fff4 Branch: v7.3 https://github.com/mongodb/mongo/commit/d5ea3dac1308b04262c5587f8d153a25c24b28b4 xgen-internal-githook commented on Mon, 29 Jan 2024 19:37:10 +0000: Author: {'name': 'Suganthi Mani', 'email': '38441312+smani87@users.noreply.github.com', 'username': 'smani87'} Message: SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. (#18444) SERVER-85836 TenantFileImporter service skips the feature document while iterating through the donor mdb_catlog table. GitOrigin-RevId: f6698560cf818fa8527614205353e290910096ee Branch: master https://github.com/mongodb/mongo/commit/aa2f3080a5a248de582c25dc91e2f0ee425b8c2b

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...