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

Investigate afterClusterTime error in causally consistent suite with 0 vote secondaries

    • Type: Icon: Task Task
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sharding 2018-04-23, Sharding 2018-05-07

      gvim Running the causally_consistent_jscore_passthrough suite with non-voting secondaries runs into an afterClusterTime error, even though inspecting the logs it looks like the shell is sending the correct cluster times. Because of this, we cannot make secondaries non-voting in those suites.

      To reproduce this apply the attached patch (courtesy of Max) and run:

      python ./buildscripts/resmoke.py --suites=causally_consistent_jscore_passthrough repro.js
      

      The repro just does an insert followed by a find with "secondary" read preference while logging the commands and received operationTime/clusterTime.

      Here's the output of one run:

      ----
      {
          "insert" : "mycoll",
          "documents" : [
              {
                  "_id" : 0
              }
          ],
          "$clusterTime" : {
              "clusterTime" : Timestamp(1515253320, 13),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          }
      }
      ----
      ----
      After doing insert: {
          "operationTime" : Timestamp(1515253320, 31),
          "clusterTime" : Timestamp(1515253320, 31)
      }
      ----
      ----
      {
          "query" : {
              "find" : "mycoll",
              "limit" : 1,
              "singleBatch" : true,
              "$clusterTime" : {
                  "clusterTime" : Timestamp(1515253320, 31),
                  "signature" : {
                      "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                      "keyId" : NumberLong(0)
                  }
              },
              "readConcern" : {
                  "afterClusterTime" : Timestamp(1515253320, 31)
              }
          },
          "$readPreference" : {
              "mode" : "secondary"
          }
      }
      ----
      assert: command failed: {
          "ok" : 0,
          "errmsg" : "readConcern afterClusterTime must not be greater than clusterTime value",
          "code" : 72,
          "codeName" : "InvalidOptions",
          "$clusterTime" : {
              "clusterTime" : Timestamp(1515253320, 31),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          },
          "operationTime" : Timestamp(1515253320, 31)
      } : undefined
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:16:14
      assert.commandWorked@src/mongo/shell/assert.js:403:5
      

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: