-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(explain-plan): migrate to TS/away from Ampersand, fix sharding wa…
…rning bug (#2494) * chore(explain-plan): drop serverVersion from state This does not have any actual impact on the UI. * feat(explain-plan): replace explain-plan ampersand model Replace the explain-plan-model Ampersand model and replace it with a typescript helper package. This new package matches the model broadly, except in a few aspects: - It automatically includes the SBE compatibiltiy helper, removing the need to apply it explicitly in compass-explain-plan. - The “raw” original data property is exposed directly, not attached via monkey-patching in compass-explain-plan. - `model.serialize()` is gone, the compass-explain-plan package now manually unpacks the properties it uses. This may not look very pretty, but at least it doesn’t hide the fact that we are using the object as an untyped bag of properties anymore. - The child stage iterator helper is exposed, allowing some code redundancy between the packages to be removed. - Support for pre-3.0 server explain plans is dropped. * chore(explain-plan): replace usedIndex field to make it more meaningful Replace the `usedIndex` field, which had an odd typing to begin with, with a `usedIndexes` field that reflects all indices used and what shards they were used on in a consistent way that matches its actual usage. * fix(explain-plan): do not display shard warning when inappropriate COMPASS-4770 This warning is supposed to tell people about situations in which different shards used difference indices in their explain plan, which is fine to warn about. However, the check was fairly naïve and only warned whether multiple indices were used at all. That can lead to false positives, since using multiple indices by itself is not problematic. Address this by grouping the used indices by the shards they were run on, and seeing if these structures actually differ between the individual shards.
- Loading branch information
Showing
57 changed files
with
3,839 additions
and
5,945 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
packages/compass-explain-plan/src/modules/server-version.js
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
packages/compass-explain-plan/src/modules/server-version.spec.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.