-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
-
Server Tooling & Methods
It's easy to think that Timestamp objects are comparable in the shell:
> Timestamp(1, 9) > Timestamp(1, 8) true
But they are not:
> Timestamp(1, 9) > Timestamp(1, 10) true
I don't know what the rules are for comparing Timestamps, but they're not correct. This leads to bugs like SERVER-41008. Let's either fix comparison, or make comparison operators throw an error so we remember to use timestampCmp from shell/utils.js.
- duplicates
-
SERVER-21861 Better Timestamp object comparison in mongo shell
- Closed