Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure Historical Stream is cleared before pushing new messages (#…
…375) On cancelling an existing Historical Process the Redis Stream is cleared/deleted, but this is only the case if the async task is still active and the cancellation token is consumed. This leads to the following potential problems: - When restarting Coordinator, if any Historical Processes are currently active, the task and cancellation token will be lost, meaning the new process will start without clearing the existing Stream - When any branch within `tokio::select!` completes, all others are cancelled. Therefore, if the Historical Process finishes successfully, the cancellation branch will never be executed, meaning the Stream won't be cleared. This becomes a problem if the Redis Stream still contains messages when the next process is kicked off. This PR updates cancellation so that the Stream is _always_ cleared when a new Historical Process is kicked off.
- Loading branch information