Method for seamless failback after unplanned failover
AssigneeConfluent, Inc.
InventorsSanjana Kaundinya, Chern Yih Cheah
Life of this patent
Estimating the term…
Abstract
Systems and methods are directed to seamless failback after an unplanned failover. The method involves executing a truncate-and-restore command on a primary topic of a primary cluster, performing checks on a secondary topic to ensure it is a mirror topic in a stopped state with valid identifiers and offsets, and transitioning the primary topic to immutable state. The method further includes comparing sequence numbers to ensure safe truncation, truncating partitions to match the secondary topic's log end offsets, and clamping consumer group offsets. The primary topic is then converted to a mirror state, enabling active mirroring. A reverse command is then executed to complete the failback process, restoring the primary topic to a writable state.
Claims18
A method for seamless failback after an unplanned failover, the method comprising:
- executing a truncate-and-restore command on a primary topic of a primary cluster after the primary cluster becomes operational after the unplanned failover;
- responsive to executing the truncate-and-restore command, performing a plurality of checks on a corresponding secondary topic of a secondary cluster that was failed over to during the unplanned failover;
- determining stopped log end offsets of the corresponding secondary topic of the secondary cluster;
- converting the primary topic of the primary cluster to an immutable state based on successful validation of the plurality of checks;
- truncating partitions of the primary topic to log end offsets corresponding to the stopped log end offsets of the corresponding secondary topic;
- after the truncating, converting the primary topic to a mirror state and enabling active mirroring of new data written to the corresponding secondary topic after the unplanned failover;
- and
- at or near zero mirror lag, executing a reverse command to switch a direction of mirroring flow and convert the primary topic to a writable state.
A system for seamless failback after an unplanned failover, the system comprising:
- one or more hardware processors;
- and
- one or more storage components storing instructions that, when executed by the one or more hardware processors, cause the one or more hardware processors to perform operations comprising:
- executing a truncate-and-restore command on a primary topic of a primary cluster after the primary cluster becomes operational after the unplanned failover;
- responsive to executing the truncate-and-restore command, performing a plurality of checks on a corresponding secondary topic of a secondary cluster that was failed over to during the unplanned failover;
- determining stopped log end offsets of the corresponding secondary topic of the secondary cluster;
- converting the primary topic of the primary cluster to an immutable state based on successful validation of the plurality of checks;
- truncating partitions of the primary topic to log end offsets corresponding to the stopped log end offsets of the corresponding secondary topic;
- after the truncating, converting the primary topic to a mirror state and enabling active mirroring of new data written to the corresponding secondary topic after the unplanned failover;
- and
- at or near zero mirror lag, executing a reverse command to switch a direction of mirroring flow and convert the primary topic to a writable state.
A machine-storage medium comprising instructions which, when executed by one or more hardware processors of a machine, cause the machine to perform operations for seamless failback after an unplanned failover, the operations comprising:
- executing a truncate-and-restore command on a primary topic of a primary cluster after the primary cluster becomes operational after the unplanned failover;
- responsive to executing the truncate-and-restore command, performing a plurality of checks on a corresponding secondary topic of a secondary cluster that was failed over to during the unplanned failover;
- determining stopped log end offsets of the corresponding secondary topic of the secondary cluster;
- converting the primary topic of the primary cluster to an immutable state based on successful validation of the plurality of checks;
- truncating partitions of the primary topic to log end offsets corresponding to the stopped log end offsets of the corresponding secondary topic;
- after the truncating, converting the primary topic to a mirror state and enabling active mirroring of new data written to the corresponding secondary topic after the unplanned failover;
- and
- at or near zero mirror lag, executing a reverse command to switch a direction of mirroring flow and convert the primary topic to a writable state.
Dependencies are inferred from the claim text.