[SERVER-56935] "ClientMetadata was previously set" invariant in embedded SDK Created: 13/May/21  Updated: 19/May/21  Resolved: 19/May/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
duplicates SERVER-53334 Hitting unexpected invariant failure,... Closed
Problem/Incident
is caused by SERVER-49336 Set client metadata if it is missing ... Closed
Operating System: ALL
Backport Requested:
v4.2
Sprint: Elastic 2021-05-24
Participants:

 Description   

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.



 Comments   
Comment by A. Jesse Jiryu Davis [ 19/May/21 ]

Nevermind, this is a duplicate.

Generated at Thu Feb 08 05:40:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.