[SERVER-53655] Relax an invariant in sbe::compareValue Created: 08/Jan/21  Updated: 29/Oct/23  Resolved: 12/Jan/21

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Martin Neupauer Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 10

 Comments   
Comment by Githook User [ 12/Jan/21 ]

Author:

{'name': 'Martin Neupauer', 'email': 'xmaton@messengeruser.com'}

Message: SERVER-53655 Relax an invariant in sbe::compareValue
Branch: master
https://github.com/mongodb/mongo/commit/3a6d39d499cdc4c8a5b4f77d2ba3be34b5052005

Comment by James Wahlin [ 08/Jan/21 ]

martin.neupauer in addition to relaxing we could consider swapping 'invariant' for 'tassert' as well, which allows our test infrastructure to fail on trigger (on mongod shutdown), but will only result in a uassert for users.

Comment by Martin Neupauer [ 08/Jan/21 ]

There is an invariant in sbe::compareValue that reasonably assumes that different types cannot be compared equal (note we are talking about about truly structurally different types, not different numerical "types").

Unfortunately, that reasonable assumption does not hold for the Undefined type that is aliased to EOO (i.e. missing field in the object).  

Generated at Thu Feb 08 05:31:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.