-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
runWithParams in optimizer_utils.js only works for standalone db passthrough tests (it references db, which is not a parameter). In SERVER-76509 the need for a similar function that works for all cases arose, hence the creation of runWithParamsAllNodes. It would be great if the two could be consolidated, since they basically do the same thing. However, there is an issue with that - runWithParamsAllNodes calls setParameterOnAllHosts, which creates a new Mongo. This ends up calling startSession(), which prints the sessionId + options. This is a problem for any golden JS test that could try to call this function since that print would appear in the golden output. Since the session id is different for each run of the test, such a golden JS test would always fail since it would differ from the expected output.
I was talking to david.percy@mongodb.com about this and he suggested an approach where we introduce a global variable that keeps track of whether we should actually print the output, add logic in golden_test.js and golden_overrides.js to add an override for setParameterOnAllHosts. This override would use set the global variable to disable printing for the function.
This ticket tracks the work to implement the above and consolidate the two runWithParams functions.
- is related to
-
SERVER-96086 Added document key in oplog entries can cause insert to fail due to size limit
- Backlog
- related to
-
SERVER-93769 Complete TODO listed in SERVER-84743
- Open