131
}
132
134
>
// Maybe try to write one final update of ack level and GC some tasks.
135
>
// Skip the update if we never initialized (ackLevel will be -1 in that case).
136
>
// Also skip if we're stopping due to lost ownership (the update will fail in that case).
137
>
// Ignore any errors.
138
>
// Note that it's fine to GC even if the update ack level fails because we did match the
139
>
// tasks, the next owner will just read over an empty range.
140
>
ackLevel := c.taskAckManager.getAckLevel()
141
>
if ackLevel >= 0 && !c.skipFinalUpdate.Load() {
142
ctx, cancel := context.WithTimeout(c.tqCtx, ioTimeout)
143
defer cancel()