Revise replication job states
The following discussion from !3988 (merged) should be addressed:
-
@8bitlife started a discussion: (+1 comment) We don't use
cancelled
state for any of our operations. I think it can be removed completely from the code.The database should not have events with
completed
state. They all should be removed. I think we can mention onlydead
state here and it should be enough.
Actually thedead
events are not really usable and the job remain in it only if the processing of the event was terminated and there are no more attempts to process the event (AcknowledgeStale
background task does it). I think we can change it to do the same whatAcknowledge
method does with such events - remove it.