From 3d60f67f2086e93403bada5c0ced25b4bad62782 Mon Sep 17 00:00:00 2001 From: Haley Connelly Date: Thu, 14 Jan 2021 19:20:11 +0000 Subject: SERVER-50584 Serialize resharding errors into a new abortReason field --- src/mongo/db/s/resharding/resharding_recipient_service.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mongo/db/s/resharding/resharding_recipient_service.h') diff --git a/src/mongo/db/s/resharding/resharding_recipient_service.h b/src/mongo/db/s/resharding/resharding_recipient_service.h index 8408742e94d..0967b4bf930 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service.h +++ b/src/mongo/db/s/resharding/resharding_recipient_service.h @@ -142,12 +142,11 @@ private: // Transitions the state on-disk and in-memory to 'endState'. void _transitionState(RecipientStateEnum endState, - boost::optional fetchTimestamp = boost::none); + boost::optional fetchTimestamp = boost::none, + boost::optional abortReason = boost::none); - void _transitionStateAndUpdateCoordinator(RecipientStateEnum endState); - - // Transitions the state on-disk and in-memory to kError. - void _transitionStateToError(const Status& status); + void _transitionStateAndUpdateCoordinator(RecipientStateEnum endState, + boost::optional abortReason = boost::none); // Inserts 'doc' on-disk and sets '_replacementDoc' in-memory. void _insertRecipientDocument(const ReshardingRecipientDocument& doc); -- cgit v1.2.1