ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 9.1.0-rc0, 9.1.0-rc1026
    • 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.

            Assignee:
            Stanislav Lukianov
            Reporter:
            Stanislav Lukianov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: