-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
ALL
-
-
Execution Team 2023-04-03
Summary
I was implementing DRIVERS-2181 in Ruby, and these tests pass locally but fail on CI (but only very occasionally). This ticket is for implementing snapshot query example tests. When running these tests on CI (it passes locally) I occasionally get the following error on both replica sets and sharded clusters.
Something like this error has been reported before. See SERVER-41532.
The error is as follows:
Mongo::Error::OperationFailure: command failed because can not establish a snapshot :: caused by :: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1645560051, 6). Collection minimum is Timestamp(1645560051, 7) (on localhost:27017, modern retry, attempt 1)
Note that sending distinct commands seems to fix this for sharded clusters. See the comments under SERVER-39704. This still fails for replica sets.
Motivation
Who is the affected end user?
mongo-ruby-driver spec tests are failing
How does this affect the end user?
I'm not sure that it does, since I'm having a hard time reproducing it
How likely is it that this problem or use case will occur?
It doesn't seem very likely since I'm having a hard time reproducing it.
If the problem does occur, what are the consequences and how severe are they?
The snapshot fails, but it seems like if you retry it, it will work. See SERVER-41532.
- depends on
-
SERVER-55505 Enable Feature flag for PM-2218
- Closed
- is depended on by
-
RUBY-2909 Snapshot Query Examples for the Manual
- Closed
- is related to
-
DRIVERS-2181 Snapshot Query Examples for the Manual
- Implementing
-
SERVER-39704 Allow mongos to retry on stale version and snapshot errors within a transaction
- Backlog
- related to
-
SERVER-41532 Mongos can fail with "a non-retryable snapshot error" and "Unable to read from a snapshot due to pending collection catalog changes"
- Closed
-
SERVER-66974 Server responding with unexpected error 246 (SnapshotUnavailable)
- Closed