Loopback control in multi-active database synchronization
Abstract
Systems and methods of loopback control in multi-active database synchronization are provided. A first database instance and a second database instance are configured with two-way synchronization. A synchronization tool detects a first log change in a first operation log associated with the first database instance. The first log change includes a first operation entry associated with a first data operation on a first data record in the first database instance. The first data record includes a first synchronization tag field comprising a first source tag representing a first data source associated with the first data operation on the first data record. If the source tag contains the identification of the second database instance, the synchronization tool skips the first operation entry, without synchronizing the first data operation to the second database instance to avoid data loopback.
Claims
exact text as granted — not AI-modifiedThat which is claimed is:
1 . A method comprising:
detecting a first data operation on a first data record in a first database instance, wherein the first data record comprises a first synchronization tag field and a first synchronization time field; determining that the first synchronization tag field comprises a first source tag; determining whether the first source tag identifies a second database instance; in response to determining the first source tag does not identify the second database instance, executing the first data operation on a second data record in the second database instance, wherein the second data record corresponds to the first data record; and inserting a second source tag in the second data record, wherein the second source tag identifies the first database instance.
2 . The method of claim 1 , further comprising:
detecting a second data operation on a third data record in the first database instance, wherein the third data record comprises a third synchronization tag field and a third synchronization time field; and determining that the third synchronization tag field does not comprise a third source tag, executing the second data operation on a fourth data record in the second database instance, wherein the third data record corresponds to the fourth data record.
3 . The method of claim 1 , further comprising:
in response to determining the first source tag identifies the second database instance, skipping executing the first data operation on the second data record in the second database instance.
4 . The method of claim 1 , further comprising
prior to determining whether the first source tag identifies the second database instance, determining a type of the first data operation is an insert operation or a replace operation; and determining whether the first synchronization tag field comprises the first source tag.
5 . The method of claim 1 , further comprising:
prior to determining whether the first source tag identifies the second database instance, determining a type of the first data operation is an update operation; and
determining whether the first synchronization time field comprises a synchronization timestamp associated with the first data operation.
6 . The method of claim 5 , further comprising:
in response to determining that the first synchronization time field does not comprise a synchronization timestamp, executing the first data operation on the second data record in the second database instance.
7 . The method of claim 5 , further comprising:
in response to determining the first synchronization time field comprises a first synchronization time stamp, comparing the first synchronization time stamp with a first operation timestamp in a first operation entry in a first operation log associated with the first database instance; and in response to determining that the first synchronization time stamp is different from the first operation timestamp, executing the first data operation to the second data record in the second database instance.
8 . The method of claim 1 , further comprising inserting a synchronization timestamp in the second data record, wherein the synchronization timestamp comprises a time of executing the first data operation to the second data record on the second database instance.
9 . A system comprising:
a communications interface; a non-transitory computer-readable medium; and one or more processors communicatively coupled to the communications interface and the non-transitory computer-readable medium, the one or more processors configured to execute processor-executable instructions stored in the non-transitory computer-readable medium to: detect a first data operation on a first data record in a first database instance, wherein the first data record comprises a first synchronization tag field and a first synchronization time field; determine that the first synchronization tag field comprises a first source tag; determine whether the first source tag in the first data record identifies a second database instance; in response to determining the first source tag does not identify the second database instance, execute the first data operation on a second data record in the second database instance, wherein the second data record corresponds to the first data record; and insert a second source tag in the second data record, wherein the second source tag identifies the first database instance.
10 . The system of claim 9 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
detect a second data operation on a third data record in the first database instance, wherein the third data record comprises a third synchronization tag field and a third synchronization time field; and determine that the third synchronization tag field does not comprise a third source tag, executing the second data operation on a fourth data record in the second database instance, wherein the third data record corresponds to the fourth data record.
11 . The system of claim 10 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
in response to determining the first source tag identifies the second database instance, skip executing the first data operation to the second data record in the second database instance.
12 . The system of claim 10 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
prior to determining whether the first source tag identifies the second database instance, determine a type of the first data operation is an insert operation or a replace operation; and determine whether the first synchronization tag field comprises the first source tag.
13 . The system of claim 9 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
prior to determining whether the first source tag identifies the second database instance, determine a type of the first data operation is an update operation; and
determine whether the first synchronization time field comprises a synchronization timestamp associated with the first data operation.
14 . The system of claim 13 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
in response to determining that the first synchronization time field does not comprise a synchronization timestamp, execute the first data operation to the second data record on the second database instance.
15 . The system of claim 13 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
in response to determining the first synchronization time field comprises a first synchronization time stamp, compare the first synchronization time stamp with a first operation timestamp in a first operation entry in a first operation log associated with the first database instance; and in response to determining that the first synchronization time stamp is different from the first operation timestamp, execute the first data operation to the second data record in the second database instance.
16 . The system of claim 9 , wherein the one or more processors are configured to execute further processor-executable instructions stored in the non-transitory computer-readable medium to:
inserting a synchronization timestamp in the second data record, wherein the synchronization timestamp comprises a time of executing the first data operation to the second data record on the second database instance.
17 . A non-transitory computer-readable medium comprising processor-executable instructions configured to cause one or more processors to:
detect a first data operation on a first data record in a first database instance, wherein the first data record comprises a first synchronization tag field and a first synchronization time field; determine that the first synchronization tag field comprises a first source tag; determine whether the first source tag in the first data record identifies a second database instance; in response to determining the first source tag does not identify the second database instance, execute the first data operation on a second data record in a second database instance, wherein the second data record corresponds to the first data record; and insert a second source tag in the second data record, wherein the second source tag identifies the first database instance.
18 . The non-transitory computer-readable medium of claim 17 , further comprising processor-executable instructions configured to cause one or more processors to:
detect a second data operation on a third data record in the first database instance, wherein the third data record comprises a third synchronization tag field and a third synchronization time field; and determine that the third synchronization tag field does not comprise a third source tag, executing the second data operation on a fourth data record in the second database instance, wherein the third data record corresponds to the fourth data record.
19 . The non-transitory computer-readable medium of claim 17 , further comprising processor-executable instructions configured to cause one or more processors to:
prior to determining whether the first source tag identifies the second database instance, determine that the first data operation is an update operation; and determine whether the first synchronization time field comprises a synchronization timestamp associated with the first data operation.
20 . The non-transitory computer-readable medium of claim 18 , further comprising processor-executable instructions configured to cause one or more processors to:
in response to determining the first synchronization time field comprises a first synchronization time stamp, compare the first synchronization time stamp with a first operation timestamp in a first operation entry in a first operation log associated with the first database instance; and in response to determining that the first synchronization time stamp is different from the first operation timestamp, execute the first data operation to the second data record in the second database instance.Join the waitlist — get patent alerts
Track US2025384017A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.