From 942649a9fd069a9feb4ed9cbec661a7136dd36a9 Mon Sep 17 00:00:00 2001 From: Eric Cox Date: Fri, 23 Oct 2020 21:29:33 +0000 Subject: SERVER-50838 Unchecked return value for recordCursor restore in IDHack stage --- src/mongo/db/exec/idhack.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/exec') diff --git a/src/mongo/db/exec/idhack.cpp b/src/mongo/db/exec/idhack.cpp index 22319c36e74..af8edac2a9b 100644 --- a/src/mongo/db/exec/idhack.cpp +++ b/src/mongo/db/exec/idhack.cpp @@ -148,8 +148,10 @@ void IDHackStage::doSaveStateRequiresIndex() { } void IDHackStage::doRestoreStateRequiresIndex() { - if (_recordCursor) - _recordCursor->restore(); + if (_recordCursor) { + auto couldRestore = _recordCursor->restore(); + uassert(5083800, "IDHackStage could not restore cursor", couldRestore); + } } void IDHackStage::doDetachFromOperationContext() { -- cgit v1.2.1