-
Type:
Task
-
Resolution: Fixed
-
Priority:
Trivial - P5
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
BSONColumn::contains_forTest (src/mongo/bson/column/bsoncolumn.cpp) is dead code. SERVER-65804 added it in 2023 to speed up a time-series check, but no production code calls it. SERVER-74926, which would have finished it, was closed as Won't Do. Only seven unit tests call it (ContainsScalar*SimpleCompressed in bsoncolumn_test.cpp), so they test dead code.
It also has a bug, found by reading the code and not by running a test: after a Simple8b run it advances 8 * numBlocks bytes where the decoder advances 1 + 8 * numBlocks (control byte plus blocks), so it reads the last byte of the last block as a control byte. The tests use single-type columns and do not hit it.
Delete contains_forTest, its declaration in bsoncolumn.h, and the seven tests.
- related to
-
SERVER-113064 Complete TODO listed in SERVER-74926
-
- Closed
-
-
SERVER-65804 Enhance BSONColumn to allow checking contained element types without decompressing
-
- Closed
-
-
SERVER-74926 Add interleave support to BSONColumn::containsCompressed
-
- Closed
-