From 544ab78d2b41139653d453128ed54ca3794335c6 Mon Sep 17 00:00:00 2001 From: Max Hirschhorn Date: Fri, 9 Oct 2015 14:34:26 -0400 Subject: SERVER-20839 Use bsonWoCompare() to compare optimes in the shell. (cherry picked from commit c2ae70a7eb2ca553bc56b0d160722591aa7925ea) --- jstests/libs/trace_missing_docs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jstests/libs/trace_missing_docs.js b/jstests/libs/trace_missing_docs.js index 3faf50b4606..0a939f4d8d9 100644 --- a/jstests/libs/trace_missing_docs.js +++ b/jstests/libs/trace_missing_docs.js @@ -74,9 +74,7 @@ function traceMissingDoc( coll, doc, mongos ) { } var compareOps = function( opA, opB ) { - if ( opA.ts < opB.ts ) return -1; - if ( opB.ts < opA.ts ) return 1; - else return 0; + return bsonWoCompare( opA.ts, opB.ts ); } allOps.sort( compareOps ); -- cgit v1.2.1