Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21058

need fail point to stress yielding behavior

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc3
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Fully Compatible
    • TIG B (10/30/15)

      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

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: