-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
TIG 2017-06-19, TIG 2017-07-10
The IdempotencyTest::validate() function currently performs collection validation and computes a hash of the collection's contents for later verification. We should additional check that re-applying the operations via runOps() results in a collection with the same options as before and that any indexes on the collection have the same options as before. This can be viewed as the C++ analogue to some of the additional consistency checks for collection metadata performed in ReplSetTest.prototype.checkReplicatedDataHashes().
The IdempotencyTest::validate() function should probably return a struct that contains a std::string for the collection's hash as well as a CollectionOptions struct and a std::vector<BSONObj> for the index specifications. See CollectionCatalogEntry::getCollectionOptions() and CollectionCatalogEntry::getIndexSpec() for how to retrieve this information from collection->getCatalogEntry().