From 09f26f3fb749c7fc2f80937e35a64083de44d7ab Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Fri, 1 Sep 2023 19:34:00 +0530 Subject: [PATCH] Ignore error for catalog monitor for EH (#369) CDC to Eventhub errors in SyncFlow with 'GetLastSyncBatchID not supported for Eventhub', because in `flowable.go`'s `StartFlow` this method is being called for catalog metrics. Eventhub does not have this method implemented so we can just ignore the error in this section and have sync ID in the metrics start from 0: ```Go if a.CatalogMirrorMonitor.IsActive() && len(records.Records) > 0 { syncBatchID, err := dest.GetLastSyncBatchID(input.FlowConnectionConfigs.FlowJobName) if err != nil && conn.Destination.Type != protos.DBType_EVENTHUB { return nil, err } .... } ``` --- flow/activities/flowable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/activities/flowable.go b/flow/activities/flowable.go index 49e2f6a27a..6219069d91 100644 --- a/flow/activities/flowable.go +++ b/flow/activities/flowable.go @@ -205,7 +205,7 @@ func (a *FlowableActivity) StartFlow(ctx context.Context, input *protos.StartFlo } if a.CatalogMirrorMonitor.IsActive() && len(records.Records) > 0 { syncBatchID, err := dest.GetLastSyncBatchID(input.FlowConnectionConfigs.FlowJobName) - if err != nil { + if err != nil && conn.Destination.Type != protos.DBType_EVENTHUB { return nil, err }