DBZ-8354 Fix table filter logic for vstream #213
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous code had custom regex filtering which meant it would match all tables with suffixes for the table filter (eg filter is keyspace.table1 and would also match keyspace.table1_suffix1, keyspace.table1_suffix2, keyspace.table1_suffix3). These events would later be filtered out with the call to emit data change event which uses the Debezium Filters construct correctly (it only matches the full table name). This means there could be lots of unnecessary events being requested & deserialized from the vstream. This PR removes this custom regex logic and instead use the Debezium
Filters
to determine which tables to filter fixing this edge case.This should significantly help with CPU & performance (and cost savings) for keyspaces that have many tables that have the same prefix and different suffixes.