This is what regular validate cmd looks like with background:false
[js_test:index_partial_create_drop] 2019-10-07T07:22:10.865-0400 [jsTest] ---- [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] ~~~validate res: { [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "nInvalidDocuments" : 0, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "nrecords" : 10, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "nIndexes" : 2, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "keysPerIndex" : { [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "_id_" : 10, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "x_1" : 10 [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] }, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "indexDetails" : { [js_test:index_partial_create_drop] 2019-10-07T07:22:10.866-0400 [jsTest] "_id_" : { [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "valid" : true [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] }, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "x_1" : { [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "valid" : true [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] } [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] }, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "ns" : "test.index_partial_create_drop", [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "valid" : true, [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "warnings" : [ ], [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "errors" : [ ], [js_test:index_partial_create_drop] 2019-10-07T07:22:10.867-0400 [jsTest] "extraIndexEntries" : [ ], [js_test:index_partial_create_drop] 2019-10-07T07:22:10.868-0400 [jsTest] "missingIndexEntries" : [ ], [js_test:index_partial_create_drop] 2019-10-07T07:22:10.868-0400 [jsTest] "ok" : 1 [js_test:index_partial_create_drop] 2019-10-07T07:22:10.868-0400 [jsTest] } [js_test:index_partial_create_drop] 2019-10-07T07:22:10.868-0400 [jsTest] ----
Validate with background:true can look just the same except sometimes it'll skip indexes, so 'keysPerIndex' won't have an index, but then 'indexDetails' still has the index with valid:true in it.
We populate the 'indexDetails' section here based on a map of indexes that we instantiate in the latest time prior to looking at a checkpoint'ed data view.
Maybe eliminate the entry in the ValidateResultsMap during ValidateState's initializeCursors when the final set of indexes are chosen?