-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Debian 12 (Linux 6.5.13-5-pve)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem Statement/Rationale
TLP invariant violation when translating Redis GET to mongosh findOne and partitioning by $type
Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell
Steps to Reproduce
In mongosh:
db.collectionName.drop();
db.collectionName.insertOne({ mykey: "hello" });
db.collectionName.insertOne({ nynnubkc: "hello" });
db.collectionName.insertOne({ mykey: "hello" });
db.collectionName.insertOne({ dssplpey: 41788 });
Execute the TLP queries:
const original = db.collectionName.findOne({ dssplpey:
{ $exists: true } });
const tlpTrue = db.collectionName.findOne({ dssplpey:
});
const tlpFalse = db.collectionName.findOne({ dssplpey: { $exists: true, $not:
} });
const tlpNull = db.collectionName.findOne({ dssplpey:
});
Expected Results
count(original) == count(tlpTrue) + count(tlpFalse) + count(tlpNull)
Actual Results
original = 1, tlpTrue = 1, tlpFalse = 0, tlpNull = 1, so partitionSum = 2 ≠ 1. tlpNull returns
{ mykey: "hello" }(no dssplpey), breaking the invariant.
Additional Notes
Any additional information that may be useful to include.