Details
-
Bug
-
Resolution: Gone away
-
Major - P3
-
None
-
None
-
None
-
None
-
ALL
-
QE 2022-03-21
Description
With this diff:
diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp
|
index 9100df3c57d..3025e627f0e 100644
|
--- a/src/mongo/s/query/async_results_merger.cpp
|
+++ b/src/mongo/s/query/async_results_merger.cpp
|
@@ -761,6 +761,15 @@ void AsyncResultsMerger::_processBatchResults(WithLock lk, |
// Update the cursorId; it is sent as '0' when the cursor has been exhausted on the shard. |
remote.cursorId = cursorResponse.getCursorId();
|
|
|
+ // Adding sleep to repro SERVER-31978 |
+ if (remote.cursorId == 0 && _tailableMode == TailableModeEnum::kTailableAndAwaitData) { |
+ std::cout <<
|
+ "AsyncResultsMerger()::_processBatchResults going to sleep" << std::endl; |
+ sleepmillis(5000);
|
+ std::cout <<
|
+ "AsyncResultsMerger()::_processBatchResults woke up" << std::endl; |
+ }
|
+
|
// Save the batch in the remote's buffer. |
if (!_addBatchToBuffer(lk, remoteIndex, cursorResponse)) { |
return; |
several tests fail with the error:
uncaught exception: Error: [0] != [0] are equal : Cursor has been closed unexpectedly. Observed change stream events: [ null ] :
This only happens in the change_streams_per_shard_cursors_passthrough suite.
The failing tests are:
whole_db_resumability
apply_ops
lookup_post_image
whole_db_metadata_notifications
metadata_notifications
Filing this ticket to investigate the root cause.