summaryrefslogtreecommitdiff
path: root/src/mongo/shell/data_consistency_checker.js
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2022-10-01 20:24:07 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-01 20:56:09 +0000
commit424befe581c9aeb29e42f05c0b1439ba2e39af98 (patch)
treef3c13abf67a68045541e5b11406e8334ef15f1d8 /src/mongo/shell/data_consistency_checker.js
parent88203efd43517720245e920a5d23bf4f0aeb35b0 (diff)
downloadmongo-424befe581c9aeb29e42f05c0b1439ba2e39af98.tar.gz
SERVER-70152 Fix PeekableCursor#hasNext() in DataConsistencyChecker.
Changes PeekableCursor#hasNext() to return true when there is a stashed document still.
Diffstat (limited to 'src/mongo/shell/data_consistency_checker.js')
-rw-r--r--src/mongo/shell/data_consistency_checker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/data_consistency_checker.js b/src/mongo/shell/data_consistency_checker.js
index 4e47ea22977..0226610d674 100644
--- a/src/mongo/shell/data_consistency_checker.js
+++ b/src/mongo/shell/data_consistency_checker.js
@@ -104,7 +104,7 @@ var {DataConsistencyChecker} = (function() {
}
hasNext() {
- return this.cursor.hasNext();
+ return this.stashedDoc !== undefined || this.cursor.hasNext();
}
peekNext() {