247
case ReceiverModeTieredStack:
248
if highPriorityWaterMarkInfo == nil || lowPriorityWaterMarkInfo == nil {
249
>
// This is to prevent the case: high priority task tracker received a batch of tasks, but low priority task tracker did not get any task yet.
stream_receiver.go
250
>
// i.e. HighPriorityTracker received watermark 10 and LowPriorityTracker did not receive any tasks yet.
251
>
// we should avoid ack with {high: 10, low: nil}. If we do, sender will not able to correctly interpret the overall low watermark of the queue,
252
>
// because it is possible that low priority tracker might receive a batch of tasks with watermark 5 later.
253
>
// It is also true for the opposite case.
254
>
r.logger.Warn("Tiered stack mode. Have to wait for both high and low priority tracker received at least one batch of tasks before acking.")
255
>
return 0, nil
256
>
}
257
highPriorityFlowControlInfo := r.flowController.GetFlowControlInfo(enumsspb.TASK_PRIORITY_HIGH)
258
if highPriorityFlowControlInfo.Command == enumsspb.REPLICATION_FLOW_CONTROL_COMMAND_PAUSE {