diff options
author | Matt Diener <matt.diener@mongodb.com> | 2022-10-03 16:04:37 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-03 17:01:05 +0000 |
commit | 315cab5c61a3d177ee6f68d9fd14ffde434039d1 (patch) | |
tree | 984dbbb650ca3635198922f18086b6da16c9a00b | |
parent | 480063fdcb781f2e46d2514c572747b42651bd15 (diff) | |
download | mongo-315cab5c61a3d177ee6f68d9fd14ffde434039d1.tar.gz |
SERVER-70010 fix opCtx interruption checks in query codebase
-rw-r--r-- | src/mongo/db/change_stream_pre_images_collection_manager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/change_stream_pre_images_collection_manager.cpp b/src/mongo/db/change_stream_pre_images_collection_manager.cpp index 25a12d7636a..cb1be82323c 100644 --- a/src/mongo/db/change_stream_pre_images_collection_manager.cpp +++ b/src/mongo/db/change_stream_pre_images_collection_manager.cpp @@ -472,11 +472,12 @@ void deleteExpiredChangeStreamPreImages(Client* client, Date_t currentTimeForTim "jobDuration"_attr = (Date_t::now() - startTime).toString()); } } catch (const DBException& exception) { - if (opCtx && opCtx.get()->getKillStatus() != ErrorCodes::OK) { + Status interruptStatus = opCtx ? opCtx.get()->checkForInterruptNoAssert() : Status::OK(); + if (!interruptStatus.isOK()) { LOGV2_DEBUG(5869105, 3, - "Periodic expired pre-images removal job operation was killed", - "errorCode"_attr = opCtx.get()->getKillStatus()); + "Periodic expired pre-images removal job operation was interrupted", + "errorCode"_attr = interruptStatus); } else { LOGV2_ERROR(5869106, "Periodic expired pre-images removal job failed", |