Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
table_resolver refactor - introduce patternSplitter, decisionMerger (#…
…925) This PR changes the way patterns (wildcards such as `logs*`) are handled by `table_resolver`. Previously, many `table_resolver` rules had two code paths - one code path for a single index (e.g. `logs1`) and one code path for patterns (e.g. `logs1,logs2` or `logs*`), making those rules more complicated. Moreover, one rule `makeCheckIfPatternMatchesAllConnectors` was the primary one to handle patterns and it contained fragments of other rules. This PR introduces `patternSplitter`, `decisionMerger`. The `table_resolver` now works like this: 1. `patternSplitter` splits a pattern (e.g. `logs*`) into concrete single indexes (e.g. `logs1`, `logs2`) 2. Existing rules are evaluated on each single index separately 3. `decisionMerger` merges decisions of single indexes, making sure that the decisions are compatible. It yields a single decision.
- Loading branch information