[SERVER-74755] Collection sample counters not removed atomically with sample reconfiguration Created: 10/Mar/23 Updated: 29/Oct/23 Resolved: 04/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0-rc0 |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Israel Hsu | Assignee: | Israel Hsu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | auto-reverted | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 147 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
In BF-28001, one writing thread is generating a sample ID and invokes the collection's sample counters. In another thread, query sampling on this collection is being disabled, and the collection's sample counters are removed first, and then the collection's sampling configuration is removed. Because these two removals do not happen atomically, the writing thread decides to generate a sample ID, but then an invariant is false when it cannot fetch the collection's sample counters. The removal of a sampling configuration and the removal of the collection's sample counters must occur atomically, within QueryAnalysisSampler::_refreshConfigurations(). |
| Comments |
| Comment by Githook User [ 20/Mar/23 ] |
|
Author: {'name': 'Israel Hsu', 'email': 'israel.hsu@mongodb.com', 'username': 'israelhsu'}Message: |
| Comment by xgen-buildbaron-user [ 15/Mar/23 ] |
|
Ticket re-opened due to revert. sharding_auth_audit began a consistent failure of jstests\sharding\analyze_shard_key\query_analysis_sample_counters_reporting.js |
| Comment by Githook User [ 15/Mar/23 ] |
|
Author: {'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}Message: Revert " This reverts commit d21348f684ad55f39ff1fab4bdfeea4e7b1d3128. |
| Comment by Githook User [ 14/Mar/23 ] |
|
Author: {'name': 'Israel Hsu', 'email': 'israel.hsu@mongodb.com', 'username': 'israelhsu'}Message: |