Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99121

DocumentSourceMatch::joinMatchWith erroneously depends on the _predicate member

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • v8.0, v7.0, v6.0, v5.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In order to join two DocumentSourceMatch's, we combine the _predicate's of each. This is a problem because the value of a DocumentSourceMatch's _predicate doesn't change during the call to DocumentSourceMatch::optimize(), so we may get into a scenario where we try to join an outdated set of predicates, which can lead to a tassert. Repro is in the comments.

      One idea is to depend on the _matchProcessor's MatchExpression instead since that is kept up to date after optimization.

            Assignee:
            militsa.sotirova@mongodb.com Militsa Sotirova
            Reporter:
            militsa.sotirova@mongodb.com Militsa Sotirova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None