[SERVER-59058] Enable ValidateCollections Python hook to validate fast counts Created: 03/Aug/21  Updated: 29/Oct/23  Resolved: 30/Sep/21

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

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

Issue Links:
Depends
Problem/Incident
Related
is related to SERVER-60337 Investigate incorrect fast count in r... Closed
is related to SERVER-59057 Do not enforce fast count in validate... Closed
is related to SERVER-60432 Temporarily disable fast count enforc... Closed
is related to SERVER-44650 New test mode for foreground validate... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-08-23, Execution Team 2021-09-06, Execution Team 2021-09-20, Execution Team 2021-10-04
Participants:
Linked BF Score: 167

 Description   

The changes from 3e95061 as part of SERVER-44650 updated jstests/libs/override_methods/validate_collections_on_shutdown.js to specify {full: true, enforceFastCount: true} to the validate command. However, validate_collections_on_shutdown.js is only run for MongoDB clusters spawned by the mongo shell using MongoRunner/ReplSetTest/ShardingTest. In particular, it isn't run for MongoDB clusters spawned by resmoke.py.

Instead, resmoke.py-spawned MongoDB clusters use the ValidateCollections hook which runs jstests/hooks/run_validate_collections.js. The validateCollectionsThread() function currently only specifies {full: true} to the validate command. We would get more fast count validation from our tests by enabling it to be {full: true, enforceFastCount: true}. Doing so would likely require setting a TestData option for YAML suite files involving unclean shutdowns to keep the enforceFastCount=false behavior.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 30/Sep/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-59058 Enforce fast count validation in ValidateCollections Python hook
Branch: master
https://github.com/mongodb/mongo/commit/96327c826416d360ee8bd6361b36cd5d96fc802d

Comment by Githook User [ 21/Aug/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: Revert "SERVER-59058 Enforce fast count validation in ValidateCollections Python hook"

This reverts commit 038958ef6ef7351f669d0ddf893546095ad9ab3c.
Branch: master
https://github.com/mongodb/mongo/commit/9862b5bd81d901e1a36f98df73069d1bb754a921

Comment by Githook User [ 19/Aug/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-59058 Enforce fast count validation in ValidateCollections Python hook
Branch: master
https://github.com/mongodb/mongo/commit/038958ef6ef7351f669d0ddf893546095ad9ab3c

Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: Revert "SERVER-59058 Enforce fast count validation in ValidateCollections Python hook"

This reverts commit 386f9535a30df093aa74539ae7cee7b504c0b9ce.
Branch: master
https://github.com/mongodb/mongo/commit/8dc5961aa06a9a8f6e98aefe228f2c837a846786

Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-59058 Enforce fast count validation in ValidateCollections Python hook
Branch: master
https://github.com/mongodb/mongo/commit/386f9535a30df093aa74539ae7cee7b504c0b9ce

Generated at Thu Feb 08 05:46:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.