Multi-table partitions in a key-value database
US-2019392047-A1 · Dec 26, 2019 · US
US11093522B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11093522-B2 |
| Application number | US-201816165596-A |
| Country | US |
| Kind code | B2 |
| Filing date | Oct 19, 2018 |
| Priority date | Apr 22, 2016 |
| Publication date | Aug 17, 2021 |
| Grant date | Aug 17, 2021 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A database replication method and apparatus for a distributed system are provided and relate to the database field. The method includes: receiving by a coordination server, a timestamp of a multi-partition transaction newly added to a first partition of a secondary cluster; determining, by the coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster; and sending, by the coordination server, the target timestamp to the first partition, so that the first partition executes a replication log in the first partition based on the target timestamp. In this way, the corresponding partition can execute, without waiting, a multi-partition transaction that is present in all the partitions but has not been executed, thereby avoiding data inconsistency and increasing replication efficiency.
Opening claim text (preview).
What is claimed is: 1. A database replication method for a distributed system, the method comprising: receiving, by a coordination server, a timestamp of a multi-partition transaction newly added to a first partition of a secondary cluster, wherein the newly added multi-partition transaction is a multi-partition transaction among transactions recorded in a replication log that is sent by a corresponding partition of a primary cluster and received by the first partition since the first partition last sends a multi-partition transaction timestamp; determining, by the coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster, wherein the target timestamp indicates information about a multi-partition transaction executable by the first partition; and sending, by the coordination server, the target timestamp to the first partition. 2. The method according to claim 1 , wherein determining, by a coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster comprises: determining the multi-partition transaction timestamps of the partitions of the secondary cluster do not all coincide by the coordination server; determining an intersection of the multi-partition transaction timestamps of the partitions of the secondary cluster by the coordination server; and obtaining, by the coordination server, from a multi-partition transaction timestamp, that is outside the intersection, of the partitions of the secondary cluster, a timestamp with a smallest value as the target timestamp for the first partition, the timestamp with the smallest value for instructing the first partition to execute a log record, in the replication log in the first partition, that is preceding a multi-partition transaction corresponding to the target timestamp. 3. The method according to claim 1 , wherein determining, by a coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster, by a coordination server, comprises: determining the multi-partition transaction timestamps of the partitions all coincide by the coordination server; and using a first designated timestamp as the target timestamp for the first partition by the coordination server, the first designated timestamp for instructing the first partition to execute log records in the replication log in the partition until a log record of a next newly added multi-partition transaction is encountered. 4. The method according to claim 1 , wherein determining, by a coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster comprises: determining an intersection of the multi-partition transaction timestamps of the partitions of the secondary cluster by the coordination server; determining the intersection is not an empty set by the coordination server; and obtaining a timestamp with a largest value from the intersection as the target timestamp for the first partition by the coordination server, the timestamp with the largest value for instructing the first partition to execute a log record, in the first partition, that is preceding a multi-partition transaction corresponding to a 1 st multi-partition transaction timestamp following the target timestamp. 5. The method according to claim 1 , wherein determining, by the coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster, by the coordination server, comprises: determining an intersection of the multi-partition transaction timestamps of the partitions of the secondary cluster by the coordination server; determining the intersection is an empty set by the coordination server; and using a second designated timestamp as the target timestamp for the first partition by the coordination server, the second designated timestamp for instructing the first partition to sequentially execute log records in the replication log in the partition until a multi-partition transaction log record is encountered. 6. A database replication method for a distributed system, the method comprising: sending, by a first partition, to a coordination server, a timestamp of a multi-partition transaction newly added to the first partition; receiving, by a first partition, a target timestamp from the coordination server, wherein the target timestamp is used to indicate information about a multi-partition transaction executable by the first partition, and wherein the target timestamp is based on a received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of a secondary cluster; and executing, by the first partition, a replication log in the first partition based on the target timestamp for the first partition. 7. The method according to claim 6 , wherein executing, by the first partition, a replication log in the first partition based on the target timestamp for the first partition comprises: determining, by the first partition, the target timestamp for the first partition is a timestamp with a smallest value among a multi-partition transaction timestamp that is outside an intersection of the multi-partition transaction timestamps of the partitions of the secondary cluster; and executing a log record, by a first partition, in the replication log in the first partition, that is preceding a multi-partition transaction corresponding to the target timestamp. 8. The method according to claim 6 , wherein executing, by the first partition, a replication log in the first partition based on the target timestamp for the first partition comprises: determining, by the first partition, the target timestamp is a first designated timestamp; and executing, by the first partition, log records in the replication log in the first partition until a log record of a next newly added multi-partition transaction is encountered, wherein the first designated timestamp indicates that the multi-partition transaction timestamps of the partitions of the secondary cluster all coincide. 9. The method according to claim 6 , wherein executing, by the first partition, a replication log in the first partition based on the target timestamp for the first partition comprises: determining, by the first partition, the target timestamp for the first partition is a timestamp with a largest value in an intersection of the multi-partition transaction timestamps of the partitions of the secondary cluster; and executing, by the first partition, a log record, in the first partition, that is preceding a multi-partition transaction corresponding to a 1 st multi-partition transaction timestamp following the target timestamp. 10. The method according to claim 6 , wherein executing, by the first partition, a replication log in the first partition based on the target timestamp for the first partition comprises: determining, by the first partition, the target timestamp for the first partition is a second designated timestamp; and sequentially executing, by the first partiti
Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor · CPC title
Information retrieval; Database structures therefor; File system structures therefor · CPC title
Data partitioning, e.g. horizontal or vertical partitioning · CPC title
Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files · CPC title
Updates performed during online database operations; commit processing · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.