Skip to content

Replication job acknowledge removes 'completed' and 'dead' events.

Pavlo Strokov requested to merge ps-ack-does-delete into master

In order to prevent continues database growing we should remove replication events that are moved to the final state: 'completed' or 'dead'. The best way to achieve this is to remove events on the stage of acknowledgment. Once the events is processed and should be moved into 'completed' state or if there is no more attempts to process it and the target state is 'dead' the event is removed from the database without changing status. In order to support event collapsing similar scheduled replication events would be removed as well as there won't be any effect in applying them after successful execution of initial one.

Migration script to remove all redundant rows from replication_queue. It is safe to re-run migration if it fails. It is designed to remove rows in batches by 100000 each iteration. Each removal happens in separate transaction. The script removes only 'dead' and 'completed' replication events.

Closes: #2941 (closed)
Substitutes: !2436 (closed)
Depends on: #3008 (closed)

Edited by Pavlo Strokov

Merge request reports