[SERVER-35122] dbhash_at_cluster_time.js fails with LockTimeout errors when running dbHash command on secondary Created: 21/May/18  Updated: 29/Oct/23  Resolved: 22/May/18

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.0-rc1, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: TIG 2018-06-04
Participants:
Linked BF Score: 58

 Description   

It is possible that the replication subsystem on the secondary is holding the global X lock when the mongo shell attempts to run the dbHash command. One option would be to retry the dbHash command as it should eventually succeed once the global X lock is released. Another option would be to wait for the secondary to have caught up to the primary as the oplog applier thread would then be idle.

[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 2018-05-18T15:25:58.165+0000 E QUERY    [js] Error: command failed: {
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"operationTime" : Timestamp(1526657158, 3),
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"ok" : 0,
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"errmsg" : "Unable to acquire lock '{2305843009213693953: Global, 1}' within a max lock request timeout of '0ms' milliseconds.",
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"code" : 24,
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"codeName" : "LockTimeout",
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 	"$clusterTime" : {
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 		"clusterTime" : Timestamp(1526657158, 3),
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 		"signature" : {
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 			"keyId" : NumberLong(0)
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.167+0000 		}
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 	}
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 } :
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 _getErrorWithCode@src/mongo/shell/utils.js:25:13
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 doassert@src/mongo/shell/assert.js:16:14
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 _assertCommandWorked@src/mongo/shell/assert.js:516:17
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 assert.commandWorked@src/mongo/shell/assert.js:600:16
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 @jstests/replsets/dbhash_at_cluster_time.js:74:15
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 @jstests/replsets/dbhash_at_cluster_time.js:4:2
[js_test:dbhash_at_cluster_time] 2018-05-18T15:25:58.168+0000 failed to load: jstests/replsets/dbhash_at_cluster_time.js



 Comments   
Comment by Githook User [ 22/May/18 ]

Author:

{'username': 'visemet', 'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-35122 Ensure secondary is caught up in dbhash_at_cluster_time.js.

(cherry picked from commit f3efdda968b5063c484487778228547bf7169902)
Branch: v4.0
https://github.com/mongodb/mongo/commit/313727d61cfb9f90aaca27003914c6ebc6688878

Comment by Githook User [ 22/May/18 ]

Author:

{'username': 'visemet', 'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-35122 Ensure secondary is caught up in dbhash_at_cluster_time.js.
Branch: master
https://github.com/mongodb/mongo/commit/f3efdda968b5063c484487778228547bf7169902

Generated at Thu Feb 08 04:38:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.