[SERVER-55234] Ensure that tenant migration abortReason is recovered correctly on stepup recovery Created: 16/Mar/21  Updated: 29/Oct/23  Resolved: 17/Mar/21

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: pm-1791_other_required
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-52713 [testing] Add stepdown/kill/terminate... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-03-22
Participants:

 Description   
  • It is incorrect to use getStatusFromCommandResult() to parse the 'abortReason' BSONObj here since it doesn't contain an "ok" field so the call is expected to fail with CommandResultSchemaViolation, causing the migration stepup recovery to fail.
  • As described in SERVER-51345, the generated IDL code doesn't automatically take ownership of a passed-in BSONObj. The _stateDoc created on stepup recovery can hit this BSONElement assertion due to memory/scope issue involving 'abortReason' loaded from disk.


 Comments   
Comment by Githook User [ 17/Mar/21 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-55234 Ensure that tenant migration abortReason is recovered correctly on stepup recovery
Branch: master
https://github.com/mongodb/mongo/commit/2a7d4e1159ee9484ffd1954b220957b1679b74c2

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