Skip to content

Commit e441f6a

Browse files
authored
make sure streaming query handle invalid sequence error (#4307)
Invalid sequence error is a known issue in the go-mysql-org client that needs to be classified. Previously fixed for cdc (#4197) but missing for snapshot during ExecuteSelectStreaming. Fixes: DBI-743
1 parent c91f1a9 commit e441f6a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

flow/connectors/mysql/qrep.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/PeerDB-io/peerdb/flow/otel_metrics"
1919
"github.com/PeerDB-io/peerdb/flow/pkg/common"
2020
"github.com/PeerDB-io/peerdb/flow/shared"
21+
"github.com/PeerDB-io/peerdb/flow/shared/exceptions"
2122
"github.com/PeerDB-io/peerdb/flow/shared/types"
2223
)
2324

@@ -281,7 +282,7 @@ func (c *MySqlConnector) PullQRepRecords(
281282
}
282283

283284
if err := c.ExecuteSelectStreaming(ctx, query, &rs, onRow, onResult); err != nil {
284-
return 0, 0, err
285+
return 0, 0, exceptions.NewMySQLStreamingError(err)
285286
}
286287
} else {
287288
var rangeStart string
@@ -329,7 +330,7 @@ func (c *MySqlConnector) PullQRepRecords(
329330
}
330331

331332
if err := c.ExecuteSelectStreaming(ctx, query, &rs, onRow, onResult); err != nil {
332-
return 0, 0, err
333+
return 0, 0, exceptions.NewMySQLStreamingError(err)
333334
}
334335
}
335336

0 commit comments

Comments
 (0)