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

"ClientMetadata was previously set" invariant in embedded SDK

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL
    • v4.2
    • Elastic 2021-05-24

      In SERVER-49336 we changed how client metadata is handled - it's set earlier in command processing, and the isMaster command implementations for mongos/d must not attempt to set it again. The original SERVER-49336 doesn't change the Embedded SDK's implementation of isMaster, but for some reason that hasn't caused a BF. When I backported SERVER-49336 to 4.4 and 4.2, we started seeing embedded_sdk_run_tests failures, "ClientMetadata was previously set".

      I believe I should remove a call to ClientMetadata::setFromMetadata from the embedded isMaster, but I don't know why this has caused problems only on 4.4 and 4.2, but not on the master branch.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: