[SERVER-39472] Backport changes to apply_ops_concurrent_non_atomic.js to account for HMAC key inserts in 3.6 and 4.0. Created: 08/Feb/19  Updated: 29/Oct/23  Resolved: 15/Feb/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.6.11, 4.0.7

Type: Bug Priority: Major - P3
Reporter: Jason Chan Assignee: Jacob Evans
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Participants:
Linked BF Score: 7

 Description   

Currently in 3.6 and 4.0, apply_ops_concurrent_non_atomic.js can fail as it checks the opCounters for inserts in collections. However, periodic HMAC key inserts can cause this opCounter to go up. This bug was resolved in SERVER-14364 but had the backports denied for reasons related to other parts of the ticket. It would be helpful to backport just the jstest fix to 3.6 and 4.0 to get rid of the BF failures.



 Comments   
Comment by Githook User [ 15/Feb/19 ]

Author:

{'name': 'Jacob Evans', 'email': 'jacob.evans@10gen.com'}

Message: SERVER-39472 Account for HMAC key inserts in apply_ops_concurrent_non_atomic.js
Branch: v3.6
https://github.com/mongodb/mongo/commit/281c60d09ab041c8db0c7afbc2bbdb771b670264

Comment by Githook User [ 15/Feb/19 ]

Author:

{'name': 'Jacob Evans', 'email': 'jacob.evans@10gen.com'}

Message: SERVER-39472 Account for HMAC key inserts in apply_ops_concurrent_non_atomic.js
Branch: v4.0
https://github.com/mongodb/mongo/commit/14c4dae63d7191814da2f1e7bdc165e37474d04e

Comment by Jason Chan [ 08/Feb/19 ]

david.storch I'm not too sure really, but the problem stems from the inserts done into the admin.system.key.
eg.

[js_test:apply_ops_concurrent_non_atomic_different_db] 2018-05-09T14:22:12.891+0000 d20510| 2018-05-09T14:22:12.887+0000 I COMMAND  [monitoring keys for HMAC] command admin.system.keys command: insert { insert: "system.keys", bypassDocumentValidation: false, ordered: true, documents: [ { _id: 6553586366700060673, purpose: "HMAC", key: BinData(0, 16999BED5B9A140C7EBAF36F94A1585EA3A8F786), expiresAt: Timestamp(1533651732, 0) } ], writeConcern: { w: "majority", wtimeout: 15000 }, $db: "admin" } ninserted:1 keysInserted:1 numYields:0 reslen:214 locks:{ Global: { acquireCount: { r: 7, w: 5 }, acquireWaitCount: { r: 1 }, timeAcquiringMicros: { r: 37466 } }, Database: { acquireCount: { r: 1, w: 2, W: 3 } }, Collection: { acquireCount: { r: 1, w: 2 } }, oplog: { acquireCount: { w: 2 } } } protocol:op_msg 179ms

From what I understand, these inserts are performed in the background of the node while tests are running every some duration, which can cause problems for jstests that rely on opcounters for verifying results. I'm not sure if there is a way to turn it off completely (or whether we want to) for a test.

Comment by David Storch [ 08/Feb/19 ]

jason.chan, what does "HMAC" mean?

Comment by Charlie Swanson [ 08/Feb/19 ]

jacob.evans can you take care of this as part of BF friday? Thanks.

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