Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes error log #6496

Merged
merged 1 commit into from
Jul 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions go/vt/binlog/keyrange_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package binlog

import (
"fmt"

"vitess.io/vitess/go/vt/key"
"vitess.io/vitess/go/vt/log"

Expand All @@ -43,9 +45,9 @@ func KeyRangeFilterFunc(keyrange *topodatapb.KeyRange, callback func(*binlogdata
case binlogdatapb.BinlogTransaction_Statement_BL_INSERT,
binlogdatapb.BinlogTransaction_Statement_BL_UPDATE,
binlogdatapb.BinlogTransaction_Statement_BL_DELETE:
if statement.KeyspaceID != nil {
if statement.KeyspaceID == nil {
updateStreamErrors.Add("KeyRangeStream", 1)
log.Errorf("SBR mode unsupported for streaming: %s", statement.Statement.Sql)
return fmt.Errorf("SBR mode unsupported for streaming: %s", statement.Statement.Sql)
}
if !key.KeyRangeContains(keyrange, statement.KeyspaceID) {
continue
Expand Down