Skip to content

Commit 537d570

Browse files
committed
slot info: don't poll for completed/terminated mirrors
1 parent 07eb124 commit 537d570

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

flow/activities/flowable.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,7 @@ func (a *FlowableActivity) RecordSlotSizes(ctx context.Context) error {
749749
}
750750

751751
var config protos.FlowConnectionConfigs
752-
err = proto.Unmarshal(configProto, &config)
753-
if err != nil {
752+
if err := proto.Unmarshal(configProto, &config); err != nil {
754753
return nil, err
755754
}
756755

@@ -816,6 +815,12 @@ func (a *FlowableActivity) RecordSlotSizes(ctx context.Context) error {
816815
attribute.String(otel_metrics.FlowStatusKey, status.String()),
817816
attribute.Bool(otel_metrics.IsFlowActiveKey, info.isActive),
818817
)))
818+
819+
if flowMetadata.Status == protos.FlowStatus_STATUS_COMPLETED ||
820+
flowMetadata.Status == protos.FlowStatus_STATUS_TERMINATED {
821+
return
822+
}
823+
819824
srcConn, err := connectors.GetByNameAs[connectors.CDCPullConnector](ctx, nil, a.CatalogPool, info.config.SourceName)
820825
if err != nil {
821826
if !errors.Is(err, errors.ErrUnsupported) {

0 commit comments

Comments
 (0)