-
Type:
Bug
-
Resolution: Incomplete
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.6.1, 3.6.6
-
Component/s: None
-
None
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I try to migrate from oplog fetching to change stream and got error:
mongos> db.users.watch() Error: getMore command failed: { "ok" : 0, "errmsg" : "Collection user.users UUID differs from UUID on change stream operations", "code" : 207, "codeName" : "InvalidUUID", "$clusterTime" : { "clusterTime" : Timestamp(1533826850, 154), "signature" : { "hash" : BinData(0,"fFr/jmk/ZqH6KFM6adIfYcCptw0="), "keyId" : NumberLong("6567806354877055160") } }, "operationTime" : Timestamp(1533826850, 154) }
After googling I found issue SERVER-31691 and try to fix by executing forceRoutingTableRefresh command on PRIMARY shards:
MongoDB server version: 3.6.6 user:PRIMARY> db.getSiblingDB('admin').createUser({user: 'root2', pwd: 'root2', roles: ['root', '__system']}) user:PRIMARY> quit() // relogin as root2 MongoDB server version: 3.6.6 user:PRIMARY> db.adminCommand({forceRoutingTableRefresh: "user.users", syncFromConfig: true}) user:PRIMARY> db.getSiblingDB('config').cache.collections.find({_id: "user.users"}) { "_id" : "user.users", "epoch" : ObjectId("5a6a38d2999e40c3345af3f8"), "key" : { "_id" : "hashed" }, "unique" : false, "refreshing" : false, "lastRefreshedCollectionVersion" : Timestamp(193, 1), "enterCriticalSectionCounter" : 192 } user:PRIMARY> db.getSiblingDB('user').getCollectionInfos({name: 'users'}) [ { "name" : "users", "type" : "collection", "options" : { }, "info" : { "readOnly" : false, "uuid" : UUID("a6eb2f4c-0c57-4f79-8d68-ef597b1bd5a6") }, "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "user.users" } } ]
But it was unsuccessfully:
- I have same error on change stream creating (both: on mongos and on PRIMARY);
- I don't see collection UUID in config.cache.collections on shard nodes;
- I see same UUID in getCollectionInfos result and in config.collections on configuration replica set.
The user.users collection was created half-year ago and servers was some times rebooted and upgraded.