The query_hash_stability.js integration test verifies that the "planCacheKey" as reported by explain remains stable for a given set of indexes. However, the plan cache key encoding is permitted to change between different versions of the server. One recent example is that the plan cache key is encoded slightly differently for queries using the SBE execution engine than for queries using the classic execution engine. Therefore, if a user downgrades from 5.2 (where SBE is enabled) to 5.0 (where SBE is disabled), then the "planCacheKey" will change for queries eligible for SBE.
This means that query_hash_stability.js cannot run in test passthrough suites that perform downgrades while the test is running. The test could obtain the plan cache key for a query on 5.2, then a downgrade could occur, and then the test obtains the plan cache key again and expects it to remain the same as before. To prevent this from occurring we should blocklist this test from passthrough suites that involve downgrades. This includes at least the following suites:
- change_streams_downgrade
- retryable_writes_downgrade
- sharded_retryable_writes_downgrade
- is related to
-
SERVER-56980 Robustify jstests/core/query_hash_stability.js
- Closed