Migrating from a primary datastore to a secondary datastore
AssigneeStripe, Inc.
InventorsKarthikBalaji Gandhi, Bryce Plunkett, Alexander Rhee, Brian Kachmarck
Life of this patent
Estimating the term…
Abstract
Aspects of the subject technology provide for synchronization between a first database and a second database. When a repeated command to a second database for a write operation to the second database is not performed, a forward synchronization process can update records from the first database to the second database. A reverse synchronization process can be used to further check that the synchronization is complete.
Claims20
A method comprising:
- submitting, to a first database, a first request to perform a first write operation to modify a first record of the first database, the first write operation comprising a first update to a first value of the first record and a second update to a first synchronization field of the first record to indicate that synchronization of the first record with a second record in a second database is unverified, the second record corresponding to the first record;
- submitting, to the second database, a second request to perform a second write operation for the second record of the second database according to a best-effort policy that allows the second request to be dropped, the second write operation comprising the first update to a second value of the second record and the second update to a second synchronization field of the second record;
- and
- subsequent to the second request and when the second database does not yet include the second record due to the second request being dropped, copying the first record to the second database as the second record and submitting a request to update the first synchronization field of the first record to indicate that synchronization of the first record is verified.
A device comprising:
- a memory;
- one or more processors, wherein the one or more processors are configured to:
- submit, to a first database, a first request to perform a first write operation to modify a first record of the first database, the first write operation comprising a first update to a first value of the first record and a second update to a first synchronization field of the first record to indicate that synchronization of the first record with a second record in a second database is unverified, the second record corresponding to the first record;
- submit, to the second database, a second request to perform a second write operation for the second record of the second database according to a best-effort policy that allows the second request to be dropped, the second write operation comprising the first update to a second value of the second record and the second update to a second synchronization field of the second record;
- and
- subsequent to the second request and when the second database does not yet include the second record due to the second request being dropped, copy the first record to the second database as the second record and submit a request to update the first synchronization field of the first record to indicate that synchronization of the first record is verified.
A non-transitory computer-readable medium containing instructions thereon, which when executed by one or more processors, cause the one or more processors to:
- submit, to a first database, a first request to perform a first write operation to modify a first record of the first database, the first write operation comprising a first update to a first value of the first record and a second update to a first synchronization field of the first record to indicate that synchronization of the first record with a second record in a second database is unverified, the second record corresponding to the first record;
- submit, to the second database, a second request to perform a second write operation for the second record of the second database according to a best-effort policy that allows the second request to be dropped, the second write operation comprising the first update to a second value of the second record and the second update to a second synchronization field of the second record;
- and
- subsequent to the second request and when the second database does not yet include the second record due to the second request being dropped, copy the first record to the second database as the second record and submit a request to update the first synchronization field of the first record to indicate that synchronization of the first record is verified.
Dependencies are inferred from the claim text.