Skip to content

Commit

Permalink
uses waitseconds as partitionid
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Dec 4, 2023
1 parent 68d7647 commit ecd48ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flow/cmd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -251,6 +252,10 @@ func (h *FlowRequestHandler) CreateQRepFlow(
var workflowFn interface{}
if cfg.SourcePeer.Type == protos.DBType_POSTGRES && cfg.WatermarkColumn == "xmin" {
state.LastPartition.PartitionId = ""
if cfg.WaitBetweenBatchesSeconds > 0 {
log.Info("Starting XMIN from :", cfg.WaitBetweenBatchesSeconds)
state.LastPartition.PartitionId = strconv.FormatUint(uint64(cfg.WaitBetweenBatchesSeconds), 10)
}
workflowFn = peerflow.XminFlowWorkflow
} else {
workflowFn = peerflow.QRepFlowWorkflow
Expand Down

0 comments on commit ecd48ba

Please sign in to comment.