[SERVER-77736] Add concurrency test to stress concurrency of $queryStats running concurrently with queries Created: 02/Jun/23  Updated: 29/Oct/23  Resolved: 16/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Engineering Test Priority: Major - P3
Reporter: Charlie Swanson Assignee: Naama Bareket
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QO 2023-06-12
Participants:

 Description   

There is some code to lock one partition, compute everything we need from it, then release the partition lock. It all looks fine on inspection, but we've seen some suspicious build failures in one of naama.bareket@mongodb.com's patches, and an explicit test of this memory management and concurrency control would help us feel better.

Broadly, the test should have:

  • Many threads doing queries
    • Some repeat queries that would modify existing entries in the query stats store (incrementing metrics and changing timestamps)
    • Some novel queries adding to the query stats store. Ideally enough that by the end of the workload we see some eviction logic kicking in (can be confirmed in serverStatus.metrics.queryStats output)
    • Some finds, some aggregates, to make sure the two codepaths are both handled correctly
  • At least one thread or maybe a couple doing $queryStats, some with "transformIdentifiers", some without.
    • It would be good to have a very small batch size like 1 or 2 to ensure that the getMore loop doesn't introduce bugs.


 Comments   
Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Naama Bareket', 'email': 'naama.bareket@mongodb.com', 'username': 'naama-bareket'}

Message: SERVER-77736: Add concurrency test to stress concurrency of $queryStats running concurrently with queries
Branch: master
https://github.com/mongodb/mongo/commit/49687fd45f2e6c65393c9fa9e48db86000d0fe9d

Generated at Thu Feb 08 06:36:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.