Cross-region replication architecture
US-10521449-B1 · Dec 31, 2019 · US
US11880367B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11880367-B2 |
| Application number | US-202017622794-A |
| Country | US |
| Kind code | B2 |
| Filing date | Mar 31, 2020 |
| Priority date | Jun 26, 2019 |
| Publication date | Jan 23, 2024 |
| Grant date | Jan 23, 2024 |
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.
Disclosed in embodiments of the present disclosure are methods and apparatuses for realizing a globally unique index, which are applicable to a distributed database. One of the methods includes: receiving a structured query language, SQL, request, obtaining a conflict detection SQL statement corresponding to the SQL request and calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement, and comparing the execution result of the conflict detection SQL statement with the expected value; and when the execution result of the conflict detection SQL statement is less than or equal to the expected value, processing an original SQL statement of the SQL request, and issuing the original SQL statement to the each database node for execution.
Opening claim text (preview).
What is claimed is: 1. A method for realizing a globally unique index, applicable to a distributed database, comprising: receiving a structured query language (SQL) request; obtaining a conflict detection SQL statement corresponding to the SQL request; calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement; comparing the execution result of the conflict detection SQL statement with the expected value; and in response to the execution result of the conflict detection SQL statement being less than or equal to the expected value, processing an original SQL statement of the SQL request, and issuing the original SQL statement to the each database node for execution, wherein obtaining the conflict detection SQL statement corresponding to the SQL request comprises: in response to the SQL request being an insert request, determining whether an insert field of the insert request includes the globally unique index, and in response to the insert field including the globally unique index, splicing a globally unique index field and an insert field value to form the conflict detection SQL statement; wherein a where condition of the conflict detection SQL statement is that the globally unique index field is equal to the insert field value; and in response to the SQL request being an update request, determining whether an update field of the update request includes the globally unique index, and in response to the update field including the globally unique index, splicing the globally unique index field and an update field value to form the conflict detection SQL statement; wherein the where condition of the conflict detection SQL statement is that the globally unique index field is equal to the update field value; wherein one globally unique index is spliced with one conflict detection SQL statement. 2. The method according to claim 1 , wherein obtaining the conflict detection SQL statement corresponding to the SQL request comprises: in response to the SQL request being an update request, determining whether an update field of the update request includes the globally unique index, and in response to the update field including the globally unique index, splicing a globally unique index field, an update field value and a newly added field to form the conflict detection SQL statement; wherein a where condition of the conflict detection SQL statement is that the globally unique index field is equal to the update field value; and the newly added field is equal to the update field value; wherein one globally unique index is spliced with one conflict detection SQL statement, and the newly added field is a field added to a database table with a same field number and a same type as those of the globally unique index field. 3. A method for realizing a globally unique index, applicable to a distributed database, comprising: receiving a structured query language (SQL) request, processing an original SQL statement of the SQL request, and issuing the original SQL statement to each database node for execution; obtaining an execution result of the original SQL statement, and obtaining a conflict detection SQL statement corresponding to the SQL request and calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement, and comparing the execution result of the conflict detection SQL statement with the expected value; and in response to the execution result of the conflict detection SQL statement being less than or equal to the expected value, sending the execution result of the original SQL statement, wherein obtaining the conflict detection SQL statement corresponding to the SQL request comprises: in response to the SQL request being an insert request, determining whether an insert field of the insert request includes the globally unique index, and in response to the insert field including the globally unique index, splicing a globally unique index field and an insert field value to form the conflict detection SQL statement; wherein a where condition of the conflict detection SQL statement is that the globally unique index field is equal to the insert field value; and in response to the SQL request being an update request, determining whether an update field of the update request includes the globally unique index, and in response to the update field including the globally unique index, splicing the globally unique index field and an update field value to form the conflict detection SQL statement; wherein the where condition of the conflict detection SQL statement is that the globally unique index field is equal to the update field value; wherein one globally unique index is spliced with one conflict detection SQL statement. 4. The method according to claim 3 , wherein obtaining the conflict detection SQL statement corresponding to the SQL request comprises: in response to the SQL request being an update request, determining whether an update field of the update request includes the globally unique index, and in response to the update field including the globally unique index, splicing a globally unique index field, an update field value and a newly added field to form the conflict detection SQL statement; wherein a where condition of the conflict detection SQL statement is that the globally unique index field is equal to the update field value; and the newly added field is equal to the update field value; wherein one globally unique index is spliced with one conflict detection SQL statement, and the newly added field is a field added to a database table with a same field number and a same type as those of the globally unique index field. 5. An apparatus for realizing a globally unique index, applicable to a distributed database, wherein the apparatus comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program, when executed, causes the processor to implement a method for realizing a globally unique index, and the method comprises: receiving a structured query language (SQL) request; obtaining a conflict detection SQL statement corresponding to the SQL request; calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement; comparing the execution result of the conflict detection SQL statement with the expected value; and in response to the execution result of the conflict detection SQL statement being less than or equal to the expected value, processing an original SQL statement of the SQL request, and issuing the original SQL statement to the each database node for execution, wherein obtaining the conflict detection SQL statement corresponding to the SQL request comprises: in response to the SQL request being an insert request, determining whether an insert field of the insert request includes the globally unique index, and in response to the insert field including the globally unique index, splicing a globally unique index field and an insert field value to form the conflict detection SQL statement; wherein a where condition of the conflict detection SQL statement is that the globally unique index field is equal to the insert field value; and in response to the SQL request being an update request, determining whether an update field of the update request includes the globally unique index, and in response to the update field including the globally unique index, splicing the globally unique index field and an update field value to form the conflict detection SQL statement;
of query operations · CPC title
Indexing structures · CPC title
Tablespace storage structures; Management thereof · CPC title
Change logging, detection, and notification (replication G06F16/27) · CPC title
Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.