Skip to content

Commit b13296a

Browse files
committed
make sure streaming query handle invalid sequence error
1 parent 97a1624 commit b13296a

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
@@ -10,6 +10,7 @@ import (
1010
"strings"
1111
"time"
1212

13+
"github.com/PeerDB-io/peerdb/flow/shared/exceptions"
1314
"github.com/go-mysql-org/go-mysql/mysql"
1415

1516
"github.com/PeerDB-io/peerdb/flow/connectors/utils"
@@ -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)