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

inject_tenant_prefix.js should not modify the original command on retrying retryable writes

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.9
    • Sprint:
      Repl 2021-04-05

      Description

      From the EVG patch builds for SERVER-52713, crud operations run as retryable writes appear to not always work correctly when there are background migrations.

      [ContinuousTenantMigration:job7] Starting tenant migration: {'donor': 'rs0', 'recipient': 'rs1', 'migration_id': UUID('db9aed32-0810-499b-8e1a-a81500caa62d'), 'tenant_id': 'tenantMigrationTenantId', 'read_preference': {'mode': 'secondary'}}.
      [ContinuousTenantMigration:job7] Starting tenant migration on donor primary on port 21752 of replica set 'rs0'.
      [j7:rs0:n2] | 2021-03-19T03:28:35.068+00:00 I  TENANT_M 5093800 [TenantMigrationDonorService-0] "Tenant migration starting to block writes","attr":{"tenantId":"tenantMigrationTenantId"}
      [js_test:insert1] [jsTest] ----
      [js_test:insert1] [jsTest] Got TenantMigrationAborted for command against database "tenantMigrationTenantId_test" after trying 1 times, retrying the command: {
      [js_test:insert1] [jsTest] 	"n" : 500,
      [js_test:insert1] [jsTest] 	"electionId" : ObjectId("7fffffff0000000000000002"),
      [js_test:insert1] [jsTest] 	"opTime" : {
      [js_test:insert1] [jsTest] 		"ts" : Timestamp(1616124515, 1001),
      [js_test:insert1] [jsTest] 		"t" : NumberLong(2)
      [js_test:insert1] [jsTest] 	},
      [js_test:insert1] [jsTest] 	"ok" : 1,
      [js_test:insert1] [jsTest] 	"$clusterTime" : {
      [js_test:insert1] [jsTest] 		"clusterTime" : Timestamp(1616124536, 1),
      [js_test:insert1] [jsTest] 		"signature" : {
      [js_test:insert1] [jsTest] 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      [js_test:insert1] [jsTest] 			"keyId" : NumberLong(0)
      [js_test:insert1] [jsTest] 		}
      [js_test:insert1] [jsTest] 	},
      [js_test:insert1] [jsTest] 	"operationTime" : Timestamp(1616124515, 1001),
      [js_test:insert1] [jsTest] 	"truncatedWriteErrors" : [
      [js_test:insert1] [jsTest] 		{
      [js_test:insert1] [jsTest] 			"index" : 500,
      [js_test:insert1] [jsTest] 			"code" : 325,
      [js_test:insert1] [jsTest] 			"errmsg" : "Tenant migration aborted"
      [js_test:insert1] [jsTest] 		}
      [js_test:insert1] [jsTest] 	]
      [js_test:insert1] [jsTest] }
      [js_test:insert1] [jsTest] ----
      [js_test:insert1] 
      [ContinuousTenantMigration:job7] Tenant migration with donor primary on port 21752 of replica set 'rs0' has aborted: {'state': 'aborted', 'abortReason': {'code': 1, 'codeName': 'InternalError', 'errmsg': 'simulate a tenant migration error'}, 'ok': 1.0, '$clusterTime': {'clusterTime': Timestamp(1616124536, 1), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}, 'operationTime': Timestamp(1616124536, 1)}
      [ContinuousTenantMigration:job7] Forgetting tenant migration: {'donor': 'rs0', 'recipient': 'rs1', 'migration_id': UUID('db9aed32-0810-499b-8e1a-a81500caa62d'), 'tenant_id': 'tenantMigrationTenantId', 'read_preference': {'mode': 'secondary'}}.
      [ContinuousTenantMigration:job7] Forgetting tenant migration on donor primary on port 21752 of replica set 'rs0'.
      [ContinuousTenantMigration:job7] Starting tenant migration: {'donor': 'rs0', 'recipient': 'rs1', 'migration_id': UUID('4169223b-5285-4ef0-a993-2fb60bb1a586'), 'tenant_id': 'tenantMigrationTenantId', 'read_preference': {'mode': 'secondary'}}.
      [ContinuousTenantMigration:job7] Starting tenant migration on donor primary on port 21752 of replica set 'rs0'.
      [js_test:insert1] New session started with sessionID: {  "id" : UUID("2bfb0351-54ac-4a57-ad1d-aa5bc5c1ef91") } and options: {  "readConcern" : {  "level" : "majority" },  "readPreference" : {  "mode" : "primary" },  "retryWrites" : true }
      [js_test:insert1] assert: [100000] != [99500] are not equal : bad count
      [js_test:insert1] doassert@src/mongo/shell/assert.js:20:14
      [js_test:insert1] assert.eq@src/mongo/shell/assert.js:179:9
      [js_test:insert1] @jstests/core/insert1.js:53:1
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pavithra.vetriselvan Pavithra Vetriselvan
              Reporter:
              cheahuychou.mao Cheahuychou Mao
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: