VStreamer: change in filter logic#18319
Merged
rohit-nayak-ps merged 9 commits intovitessio:mainfrom Jul 8, 2025
Merged
Conversation
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
9f173e1 to
21be3a6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18319 +/- ##
==========================================
+ Coverage 67.49% 67.50% +0.01%
==========================================
Files 1603 1607 +4
Lines 262426 262736 +310
==========================================
+ Hits 177112 177368 +256
- Misses 85314 85368 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
21be3a6 to
5339a1e
Compare
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
…. Some refactor. Fix TestFilteredInt for new behaviour Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
5339a1e to
7e14681
Compare
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
deepthi
approved these changes
Jun 5, 2025
| // It returns: | ||
| // - bool: true if the row should be included in the stream (passes all filters) | ||
| // - bool: true if a vindex filter was applied (indicates sharded filtering) | ||
| func (plan *Plan) shouldFilter(values []sqltypes.Value, charsets []collations.ID) (bool, bool, error) { |
Collaborator
There was a problem hiding this comment.
For readability it will be good to name the return variables.
shlomi-noach
approved these changes
Jul 6, 2025
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
morgo
added a commit
to morgo/vitess
that referenced
this pull request
Jul 21, 2025
* origin/master: bugfix: Fix impossible query for UNION (vitessio#18463) fix topo use in local_example (vitessio#18357) fix: update go-upgrade tool to check patch number (vitessio#18252) (vitessio#18402) Update MAINTAINERS.md and CODEOWNERS (vitessio#18462) Add logging to binlog watcher actions (vitessio#18264) `schemadiff`: `RelatedForeignKeyTables()` (vitessio#18195) `vtorc`: allow recoveries to be disabled from startup (vitessio#18005) Fix `vttablet` not being marked as not serving when MySQL stalls (vitessio#17883) make xtrabackup ShouldDrainForBackup configurable (vitessio#18431) Reset in-memory sequence info on vttablet on UpdateSequenceTables request (vitessio#18415) Fix watcher storm during topo outages (vitessio#18434) Online DDL: resume vreplication after cut-over/RENAME failure (vitessio#18428) Online DDL cutover enhancements (vitessio#18423) VStreamer: change in filter logic (vitessio#18319) Online DDL metrics: `OnlineDDLStaleMigrationMinutes` (vitessio#18417) Signed-off-by: Morgan Tocker <tocker@gmail.com>
This was referenced Jul 27, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR changes the filter logic in vstreamer filters to send both Before and After images, if filter matches either for non-sharded workflows. Currently only the image which passes is sent, causing downstream consumers to treat the event incorrectly as an insert or delete, when it is actually an update.
For sharded workflows, the current behaviour continues, to support rows that migrate from one shard to another.
The following tests had to be updated:
TestFilteredIntandTestFilteredVarBinary. The changes were to add both after/before images where the previous implementation would result in only one of the before/after images to be sent in the RowEvent.This will not impact
MoveTablesorReshardor any flows where the columns participating in the filter does not change.Related Issue(s)
Fixes #18426
Checklist
Deployment Notes