Details
Description
function repro() {
|
|
uri="mongodb://localhost:27017/test?replicaSet=rs"
|
|
# tail the oplog on the secondary
|
mongo $uri --eval '
|
var ol = db.getSiblingDB("local").oplog.rs
|
var c = ol.find({}).readPref("secondaryPreferred").tailable({isAwaitData: true})
|
var i = 0
|
while (true) {
|
c.forEach(function (o) {
|
print(i++, o.wall)
|
})
|
}
|
' &
|
|
sleep 5
|
|
# generate some traffic
|
mongo $uri --eval '
|
while (true)
|
db.c.insert({})
|
'
|
}
|
Fails reliably with
2018-01-09T15:56:56.703-0500 E QUERY [thread1] Error: getMore command failed: {
|
"ok" : 0,
|
"errmsg" : "PlanExecutor killed: CappedPositionLost: CollectionScan died due to failure to restore tailable cursor position. Last seen record id: RecordId(6509157867780571265)",
|
"code" : 175,
|
"codeName" : "QueryPlanKilled",
|
"operationTime" : Timestamp(1515531416, 129),
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1515531416, 131),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
}
|
} :
|
Does not fail on the primary.
Attachments
Issue Links
- is duplicated by
-
SERVER-32493 PlanExecutor killed: CappedPositionLost after upgrading from 3.4.1 => 3.6.1
-
- Closed
-
- is related to
-
SERVER-32883 Enhanced FSM testing for reading from secondaries
-
- Closed
-
- related to
-
SERVER-33042 Add test coverage for tailing oplog on secondary failing with CappedPositionLost
-
- Closed
-