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

Investigate background index behavior with causal consistency and secondary read preference

    • Sharding
    • Fully Compatible
    • ALL
    • Sharding 2017-10-02, Sharding 2017-10-23

      Possible bug with secondary read preference and causal consistency on. The reindex_background.js workload was failing with an "IndexNotFound" error somewhat frequently in the concurrency_sharded_causal_consistency(_and_balancer) suites once I turned secondary read preference on.

      Example stack trace:

      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000 2017-08-31T22:33:38.519+0000 E QUERY    [thread1] Error: 3 threads threw
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000 
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         Foreground jstests/concurrency/fsm_workloads/reindex_background.js
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         Error: error: {
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"ok" : 0,
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"errmsg" : "text index required for $text query",
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"code" : 27,
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"codeName" : "IndexNotFound",
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"$clusterTime" : {
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         		"clusterTime" : Timestamp(1504218621, 2),
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         		"signature" : {
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         			"hash" : BinData(0,"zON3is6ERc9naFc6aUw6RnuPsrU="),
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         			"keyId" : NumberLong("6460566295715774465")
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         		}
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	},
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         	"operationTime" : Timestamp(1504218621, 2)
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         }
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000 
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         _getErrorWithCode@src/mongo/shell/utils.js:25:13
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         DBCommandCursor@src/mongo/shell/query.js:702:1
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         DBQuery.prototype._exec@src/mongo/shell/query.js:117:28
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         DBQuery.prototype.hasNext@src/mongo/shell/query.js:288:5
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.519+0000         DBQuery.prototype.itcount@src/mongo/shell/query.js:415:12
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         query/<@jstests/concurrency/fsm_workloads/reindex.js:76:25
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         assertWithLevel/assertWithLevel@jstests/concurrency/fsm_libs/assert.js:75:1
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         query@jstests/concurrency/fsm_workloads/reindex.js:69:13
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         runFSM@jstests/concurrency/fsm_libs/fsm.js:37:13
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         @<unknown> line 6 > eval:10:9
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         main@jstests/concurrency/fsm_libs/worker_thread.js:135:17
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         @<unknown> line 6 > eval:7:1
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         @<unknown> line 6 > eval:5:24
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000         _threadStartWrapper@:24:16
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000  :
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 throwError@jstests/concurrency/fsm_libs/runner.js:344:23
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 runWorkloads@jstests/concurrency/fsm_libs/runner.js:739:17
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 serial@jstests/concurrency/fsm_libs/runner.js:752:1
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 @jstests\concurrency\fsm_all_sharded_causal_consistency_and_balancer.js:105:1
      [js_test:fsm_all_sharded_causal_consistency_and_balancer] 2017-08-31T22:33:38.520+0000 failed to load: jstests\concurrency\fsm_all_sharded_causal_consistency_and_balancer.
      

      evergreen link: https://evergreen.mongodb.com/task/mongodb_mongo_master_windows_64_2k8_debug_concurrency_sharded_causal_consistency_and_balancer_WT_patch_c351caa6815218c5b4a9801342ccbb1b050f6aea_59a87624e3c3314259001bc1_17_08_31_20_58_16

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: