SERVER-136738In Progress
Perform a trial run on join plan cache hit and make replanning decision
SERVER-136737, implemented the logic around inserting baseline metrics into the join plan cache entry. On a cache hit, these metrics (numReads, numIntermediateRowsProduced and numSpills) from the TrialRunTracker should be used to make a decision on whether to initiate replanning for the query. The plan from the cache will be run under a trial period for N number of docs (tuneable) and its metrics will be recorded. The replanning decision will be based on: # Did the query start spilling when