Fuzzer's findMetafield() errors when iterating on a null object

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • Hide
      1. Download the data files and the generated tests from the evergreen task page.
      2. Move the data files into the /data/db/ folder
      3. Delete all generated files except for #58
      4. Delete all aggregations except for #97, same with unprocessed aggregations and aggregation options
      5. Run test with buildscripts/resmoke.py run --suites=generational_fuzzer
      Show
      Download the data files and the generated tests from the evergreen task page . Move the data files into the /data/db/ folder Delete all generated files except for #58 Delete all aggregations except for #97, same with unprocessed aggregations and aggregation options Run test with buildscripts/resmoke.py run --suites=generational_fuzzer
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the optimization fuzzer, if a query is suspected to fail due to the order of metafields, it will be retried with tryRetryQueryWithSortedMetafields(). Down the line, findMetafield() will iterate through the stages and fields to find references to metafields in order to sort them.

      However, it seems that if it tries iterating through a null value, such as in these examples

      {"$or":[]}
      {"k":"phew nor","v":["$measurement0",null]}

      trying to get Object.keys(null) will throw a conversion error which gets caught as an AggError. We should add a check that prevents this attempted conversion in order to avoid BFs from false-negatives.

      Since the error gets caught as an AggError, the stack doesn't reflect the actual cause of the problem. This is the relevant error stack:

      findMetafield
      findMetafieldHelper
      findMetafield
      findOrderDependentAccumulator
      sortMetafieldsPipeline
      tryRetryQueryWithSortedMetafields

            Assignee:
            Unassigned
            Reporter:
            Mariano Shaar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: