@@ -384,10 +384,11 @@ func (c *MySqlConnector) PullRecords(
384384 if errors .Is (err , context .DeadlineExceeded ) {
385385 if inTx {
386386 c .logger .Info ("[mysql] timeout reached, but still in transaction, waiting for inTx false" ,
387- slog .Int ("recordCount" , int (recordCount )))
387+ slog .Uint64 ("recordCount" , uint64 (recordCount )))
388388 // reset timeoutCtx to a low value and wait for inTx to become false
389389 // cancelTimeout should be called by defer, spurious lint
390- //nolint:lostcancel
390+ cancelTimeout ()
391+ //nolint
391392 timeoutCtx , cancelTimeout = context .WithTimeout (ctx , 10 * time .Second )
392393 overtime = true
393394 } else {
@@ -406,6 +407,7 @@ func (c *MySqlConnector) PullRecords(
406407 if err != nil {
407408 if errors .Is (err , context .DeadlineExceeded ) {
408409 if ! inTx {
410+ //nolint
409411 return nil
410412 }
411413 // if in tx, don't let syncer exit due to deadline exceeded
@@ -484,16 +486,16 @@ func (c *MySqlConnector) PullRecords(
484486 if ev .Table .ColumnName != nil {
485487 unsafeName := shared .UnsafeFastReadOnlyBytesToString (ev .Table .ColumnName [idx ])
486488 if _ , excluded := exclusion [unsafeName ]; ! excluded {
487- idx2 := slices .IndexFunc (schema .Columns , func (col * protos.FieldDescription ) bool {
489+ schemaIdx := slices .IndexFunc (schema .Columns , func (col * protos.FieldDescription ) bool {
488490 return col .Name == unsafeName
489491 })
490- if idx2 == - 1 {
492+ if schemaIdx == - 1 {
491493 if ! skewLossReported {
492494 skewLossReported = true
493495 c .logger .Warn ("Unknown column name received, ignoring" , slog .String ("name" , string (ev .Table .ColumnName [idx ])))
494496 }
495497 } else {
496- return schema .Columns [idx2 ]
498+ return schema .Columns [schemaIdx ]
497499 }
498500 }
499501 return nil
0 commit comments