Skip to content

Commit

Permalink
Eventhub: Fix rows synced log (#1053)
Browse files Browse the repository at this point in the history
We weren't returning the current sync batch ID as part of eventhub's
SyncRecords. As a result, we weren't able to get CDC logs for Eventhub.
This PR fixes that
  • Loading branch information
Amogh-Bharadwaj authored Jan 11, 2024
1 parent 3beed6a commit e045b4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flow/connectors/eventhub/eventhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,13 @@ func (c *EventHubConnector) SyncRecords(req *model.SyncRecordsRequest) (*model.S
}

rowsSynced := int64(numRecords)
syncBatchID, err := c.GetLastSyncBatchID(req.FlowJobName)
if err != nil {
c.logger.Error("failed to get last sync batch id", slog.Any("error", err))
}

return &model.SyncResponse{
CurrentSyncBatchID: syncBatchID,
LastSyncedCheckPointID: lastCheckpoint,
NumRecordsSynced: rowsSynced,
TableNameRowsMapping: make(map[string]uint32),
Expand Down

0 comments on commit e045b4c

Please sign in to comment.