1

我的测试看起来像

> db.MyCollection.count()
8
> db.MyCollection.find()
{ "_id" : ObjectId("58f5cfc65faf1122b63dca3f"), /* ... */ }
{ "_id" : ObjectId("58f5cfc65faf1122b63dca40"), /* ... */ }
{ "_id" : ObjectId("58f5ebc95faf11638526d743"), /* ... */ }
{ "_id" : ObjectId("58f5eecb5faf1163872f95a3"), /* ... */ }
{ "_id" : ObjectId("58f5ef605faf11638526d745"), /* ... */ }
{ "_id" : ObjectId("58f5f0505faf1161595c1a35"), /* ... */ }
{ "_id" : ObjectId("58f5f0ca5faf1163872f95a4"), /* ... */ }
{ "_id" : ObjectId("58f5f48e5faf11638526d746"), /* ... */ }
{ "_id" : ObjectId("58f5f4e05faf1161595c1a38"), /* ... */ }
{ "_id" : ObjectId("58f5f5625faf1163872f95a7"), /* ... */ }
{ "_id" : ObjectId("58f5f5855faf11638526d749"), /* ... */ }
{ "_id" : ObjectId("58f5f6825faf1161595c1a3b"), /* ... */ }
{ "_id" : ObjectId("58f5f6ca5faf1163872f95aa"), /* ... */ }
{ "_id" : ObjectId("58f5f6e65faf11638526d74c"), /* ... */ }
{ "_id" : ObjectId("58f5f6e75faf1161595c1a3c"), /* ... */ }
{ "_id" : ObjectId("58f5f6e95faf1163872f95ab"), /* ... */ }
{ "_id" : ObjectId("58f5f76f5faf1161595c1a3d"), /* ... */ }
{ "_id" : ObjectId("58f5f8685faf1163872f95ac"), /* ... */ }
{ "_id" : ObjectId("58f600de5faf1163872f95be"), /* ... */ }
Type "it" for more
> db.MyCollection.count()
8

这怎么可能?我试图重新索引,但没有任何帮助。我使用的是 Wired Tiger 存储引擎,没有分片/复制。

4

1 回答 1

0

db.MyCollection.validate()对我有帮助!

于 2017-09-07T12:09:27.403 回答