Add keyId field to logicalTime object

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 3.5.6
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2017-04-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The keyId field is populated during the signature generation and is used to uniquely identify the key that was used for it.
      This change will add a dummy keyId value and a few tests to verify the new format.

      1. add int _keyId

      {0}

      member to the SignedLogicalTime class, change its c-tor to take a keyId argument.
      2. add a static const SignedLogicalTime::kUninitialized for the default constructed
      3. change LogicalTimeMetadata::writeToMetadata to write to logicalTime the keyId as

      logicalTime: {
          clusterTime: <highest known valid LogicalTime_MEM>
          signature: {
              hash: HMAC SHA1 hash of cluster time for validation,
              keyId: <int>
          }
      }
      

      4. change LogicalTimeMetadata::readFromMetadata to parse the keyId
      5. add a test to logical_type_Test.cpp to validate that keyId roundtrip works

            Assignee:
            Jack Mulrow
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: