[SERVER-21058] need fail point to stress yielding behavior Created: 21/Oct/15  Updated: 21/Nov/15  Resolved: 03/Nov/15

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

Type: Improvement Priority: Major - P3
Reporter: Geert Bosch Assignee: Judah Schvimer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-21037 Initial sync can miss documents if co... Closed
is related to SERVER-21057 Collection scan during concurrent mov... Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG B (10/30/15)
Participants:

 Description   

In SERVER-21037 and SERVER-21057 certain behavior requires a strategic delay to be easily reproducible. It would be nice to have a fail point that could achieve the same:

diff --git a/src/mongo/db/query/query_yield.cpp b/src/mongo/db/query/query_yield.cpp
index 4e0d463..7edde6e 100644
--- a/src/mongo/db/query/query_yield.cpp
+++ b/src/mongo/db/query/query_yield.cpp
@@ -62,6 +62,10 @@ void QueryYield::yieldAllLocks(OperationContext* txn, RecordFetcher* fetcher) {
     // locks). If we are yielding, we are at a safe place to do so.
     txn->recoveryUnit()->abandonSnapshot();
 
+    if (txn->getNS() == "test.foo") {
+        sleepmillis(1000);
+    }
+
     // Track the number of yields in CurOp.
     CurOp::get(txn)->yielded();

It would be nice, though not strictly necessary, to be able to configure the timeout and/or the namespace for which to cause delays. Finally, some FSM workload that stresses concurrent CRUD operations on documents would be great.

Areas to stress are:

  • document growth/shrinkage
  • unique (secondary) indexes
  • duplicate key violations
  • concurrent collection scans


 Comments   
Comment by Githook User [ 03/Nov/15 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-21058 Adds fail point to stress yielding behavior
Branch: master
https://github.com/mongodb/mongo/commit/a396bcd73c6e07c93f3336139ce9c074cc6721b1

Generated at Thu Feb 08 03:56:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.