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

Investigate afterClusterTime error in causally consistent suite with 0 vote secondaries

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Cannot Reproduce
    • None
    • None
    • Sharding
    • None
    • Sharding 2018-04-23, Sharding 2018-05-07

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: