-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Server Serverless 2022-09-05, Server Serverless 2022-09-19
The tenant id in the top level applyOps entry is incorrect. The top-level tenant id contains the kSystemTenatId and not the tenant id.
For eg, the correct tenant id here is ObjectId("6308e6f7498ed88d8073b94a") and not ObjectId("156500000102030405060708"):
{ "lsid" : { "id" : UUID("7d243c06-aac4-4f7f-b337-64e34f39c622"), "uid" : BinData(0,"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=") }, "txnNumber" : NumberLong(0), "op" : "c", "tid" : ObjectId("156500000102030405060708"), "ns" : "admin.$cmd", "o" : { "applyOps" : [ { "op" : "c", "tid" : ObjectId("6308e6f7498ed88d8073b94a"), "ns" : "motill.$cmd", "ui" : UUID("c2dd4c81-5557-4b80-8993-c700d090305f"), "o" : { "create" : "thedogss", "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_" } } },
The logApplyOps function hard codes the kSystemTenatId. This method should set the tenant id with the one in the nested applyOps entry. The applyOps block should be associated with only one tenant id as such it should be safe to extract the tenant id from the nested applyOps entry and set it to the top-level tenant id.
The correct tenant id can be extracted from the operationIter and passed to the logApplyOps function.
- related to
-
SERVER-71385 logOplogEntries() retrieves tenant ID from ReplOperation
- Closed