-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.4.0-rc1, 3.4.0-rc3, 3.4.0-rc4
-
Component/s: Storage
-
None
-
ALL
-
-
Storage 2016-12-12
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
In developing mongocxx, I stumbled across a bug where a collection drop followed immediately by a count on the collection with an empty document filter doesn't always return a count of zero. This occurs in fixture code, so the collection is being repeatedly filled and dropped for different tests.
The problem was seen on some (but only some) test runs on 3.4-rc1, 3.4-rc3 and 3.4-rc4. (3.4-rc2 was not tested). The problem did not occur on 3.2.9 or 3.2.11.
Replacing the drop with multi-document delete does not exhibit the problem on any of the 3.4 rc's.
I don't have time to do a more complete investigation, but I wanted to file a ticket so that it wasn't lost and others could explore it.
The failing test code can be seen here: https://github.com/xdg/mongo-cxx-driver/blob/CXX-894-server-bug-demo/src/mongocxx/test/collection.cpp#L98-L103
Tests were run on my macbook.