Skip to content

Commit

Permalink
Avoid uuid.New when avoiding side effects & don't update pull end tim…
Browse files Browse the repository at this point in the history
…e when pull fails
  • Loading branch information
serprex committed Dec 5, 2023
1 parent 469fc51 commit 424667e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,12 @@ func (a *FlowableActivity) replicateQRepPartition(ctx context.Context,
"flowName": config.FlowJobName,
}).Errorf("failed to pull records: %v", err)
goroutineErr = err
}
err = a.CatalogMirrorMonitor.UpdatePullEndTimeAndRowsForPartition(ctx, runUUID, partition, numRecords)
if err != nil {
log.Errorf("%v", err)
goroutineErr = err
} else {
err = a.CatalogMirrorMonitor.UpdatePullEndTimeAndRowsForPartition(ctx, runUUID, partition, numRecords)
if err != nil {
log.Errorf("%v", err)
goroutineErr = err
}
}
wg.Done()
}
Expand Down
2 changes: 1 addition & 1 deletion flow/workflows/xmin_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func XminFlowWorkflow(
}

state.LastPartition = &protos.QRepPartition{
PartitionId: uuid.New().String(),
PartitionId: q.runUUID,
Range: &protos.PartitionRange{Range: &protos.PartitionRange_IntRange{IntRange: &protos.IntPartitionRange{Start: lastPartition}}},
}

Expand Down

0 comments on commit 424667e

Please sign in to comment.