| Steps To Reproduce: |
1. Start up a sharded cluster with auth enabled (e.g. with mongo-orchestration)
2. Create a second index (beyond the one on _id) to ensure that initial call does not exhaust the results. For example:
db.test.createIndex({ name: 1 })
|
3. Open a new shell and run a listIndexes command with a session specified and a batch size of 1. For example:
db.runCommand({
|
"listIndexes": "test",
|
"cursor": {
|
"batchSize": 1
|
},
|
"$clusterTime": {
|
"clusterTime": Timestamp(
|
1527628984,
|
3
|
),
|
"signature": {
|
"hash": BinData(
|
0,
|
"qoVhY5vejrZCjmf2ZhUupCkjytY="
|
),
|
"keyId": 6561100244480688000
|
}
|
},
|
"lsid": {
|
"id": BinData(
|
4,
|
"lzdMPBKTSAqxDLUMXAZVqA=="
|
)
|
}
|
})
|
4. Using the cursor id returned from the previous command, construct a getMore from the same session, which will return the error. For example:
db.runCommand({
|
"getMore": NumberLong("6826835382233548157"),
|
"collection": "$cmd.listIndexes.test",
|
"batchSize": 1,
|
"$clusterTime": {
|
"clusterTime": Timestamp(
|
1527628984,
|
3
|
),
|
"signature": {
|
"hash": BinData(
|
0,
|
"qoVhY5vejrZCjmf2ZhUupCkjytY="
|
),
|
"keyId": 6561100244480688000
|
}
|
},
|
"lsid": {
|
"id": BinData(
|
4,
|
"lzdMPBKTSAqxDLUMXAZVqA=="
|
)
|
}
|
})
|
|