Investigate adding finer grain asserts to memory tracking unit tests

XMLWordPrintableJSON

    • Query Integration
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently the memory tracking unit tests test for non-zero memory usage to make sure that we are always accounting for memory usage in different execution paths, but also to give flexibility in adding more memory accounting later on

      https://github.com/10gen/mongo/blob/a3fabcd884ce76dfae45c38af5c5bbe2dba19cda/src/mongo/dbtests/query_stage_sort.cpp#L202-L203 

      We could consider adding asserts for an exact amount of bytes used, but that may be flakey on evergreen depending on the machine type. As a compromise, we could consider adding asserts that the memory reported should be in a certain range: e.g. if we are here, the bytes used should be non-zero but also less than X (X could be something like the internal memory limit of the stage, or 2x the size of the raw data used in the test). 

              Assignee:
              Unassigned
              Reporter:
              Erin Liang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: