IP Library Granted Patent US 9,710,532
Granted Patent B2
US 9,710,532 · App. 14/465,403 · Granted Jul 18, 2017

Method for avoiding conflicts in database cluster

Inventors: Alexey Yurchenko (Espoo, FI); Seppo Jaakola (Helsinki, FI); Teemu Ollakka (Oulu, FI)
Assignee: Codership Oy
G06F17/30575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,710,532
App. No.
14/465,403
Granted
Jul 18, 2017
Kind
B2
Abstract

A method for avoiding conflicts in a multi-master database cluster is provided. A set of hot spots is identified in the database cluster. When a given node receives a given transaction, the given node selects one or more hot-spot servicing nodes for one or more hot-spot sub-transactions, namely one or more sub-transactions of the given transaction that correspond to one or more hot spots of the set of hot spots. Subsequently, the given node redirects the hot-spot sub-transactions to their respective hot-spot servicing nodes. The hot-spot sub-transactions are then executed at their respective hot-spot servicing nodes.

Claims (42)

1. A method for avoiding conflicts in a multi-master database cluster, wherein the multi-master database cluster comprises a plurality of nodes, the method comprising:

identifying a set of hot spots in the database cluster, the set of hot spots comprising one or more database objects that satisfy one or more criteria defined in a collection of hot-spot policies;

receiving, at a given node of the database cluster, a given transaction;

selecting, from the plurality of nodes, one or more hot-spot servicing nodes for one or more hot-spot sub-transactions of the given transaction, wherein the one or more hot-spot sub-transactions correspond to one or more hot spots of the set of hot spots;

redirecting the one or more hot-spot sub-transactions to their respective hot-spot servicing nodes; and

executing the one or more hot-spot sub-transactions at their respective hot-spot servicing nodes.

2. The method of claim 1 further comprising:

splitting the given transaction into the one or more hot-spot sub-transactions and one or more non-hot-spot sub-transactions, wherein the one or more non-hot-spot sub-transactions do not correspond to the set of hot spots; and

executing the one or more non-hot-spot sub-transactions at the given node.

3. The method of claim 1 further comprising committing the given transaction, when each sub-transaction of the given transaction completes successfully.

4. The method of claim 1 further comprising rolling back the given transaction, when one or more sub-transactions of the given transaction fail.

5. The method of claim 1 , wherein the collection of hot-spot policies is predetermined.

6. The method of claim 1 , wherein the collection of hot-spot policies is updated based on write conflict statistics accumulated during a predefined time period.

7. The method of claim 1 , wherein the set of hot spots comprise one or more database tables.

8. The method of claim 1 , wherein the one or more hot-spot servicing nodes are selected deterministically, based on a redirection rule defined in the collection of hot-spot policies.

9. The method of claim 8 , wherein the redirection rule employs an ordered list of nodes.

10. The method of claim 8 , wherein each hot spot of the set of hot spots is assigned a hot-spot identifier, and the redirection rule employs a hash function, and wherein the selecting the one or more hot-spot servicing nodes comprises applying the hash function to one or more hot-spot identifiers assigned to the one or more hot spots.

11. A computing apparatus comprising:

a processor;

a memory coupled to the processor; and

a network interface coupled to the processor,

wherein the processor is configured to:

identify a set of hot spots in a database cluster, the set of hot spots comprising one or more database objects that satisfy one or more criteria defined in a collection of hot-spot policies;

receive, at a given node of the database cluster, a given transaction;

select, from a plurality of nodes of the database cluster, one or more hot-spot servicing nodes for one or more hot-spot sub-transactions of the given transaction, wherein the one or more hot-spot sub-transactions correspond to one or more hot spots of the set of hot spots; and

redirect the one or more hot-spot sub-transactions to their respective hot-spot servicing nodes.

12. The apparatus of claim 11 , wherein the processor is configured to:

split the given transaction into the one or more hot-spot sub-transactions and one or more non-hot-spot sub-transactions, wherein the one or more non-hot-spot sub-transactions do not correspond to the set of hot spots; and

execute the one or more non-hot-spot sub-transactions at the given node.

13. The apparatus of claim 11 , wherein the processor is configured to commit the given transaction, when each sub-transaction of the given transaction completes successfully.

14. The apparatus of claim 11 , wherein the processor is configured to roll back the given transaction, when one or more sub-transactions of the given transaction fail.

15. The apparatus of claim 11 , wherein the set of hot spots comprise one or more database tables.

16. The apparatus of claim 11 , wherein the one or more hot-spot servicing nodes are selected deterministically, based on a redirection rule defined in the collection of hot-spot policies.

17. The apparatus of claim 16 , wherein the redirection rule employs an ordered list of nodes.

18. The apparatus of claim 16 , wherein each hot spot of the set of hot spots is assigned a hot-spot identifier, and the redirection rule employs a hash function, and

wherein when selecting the one or more hot-spot servicing nodes, the processor is configured to apply the hash function to one or more hot-spot identifiers assigned to the one or more hot spots.

19. A computer program product comprising a non-transitory machine-readable data storage medium having stored thereon program instructions that, when accessed by a processing device, cause the processing device to:

identify a set of hot spots in a database cluster, the set of hot spots comprising one or more database objects that satisfy one or more criteria defined in a collection of hot-spot policies;

receive, at a given node of the database cluster, a given transaction;

select, from a plurality of nodes of the database cluster, one or more hot-spot servicing nodes for one or more hot-spot sub-transactions of the given transaction, wherein the one or more hot-spot sub-transactions correspond to one or more hot spots of the set of hot spots; and

redirect the one or more hot-spot sub-transactions to their respective hot-spot servicing nodes.

20. The computer program product of claim 19 , wherein the one or more hot-spot servicing nodes are selected deterministically, based on a redirection rule defined in the collection of hot-spot policies.

Assignments (2)
NUNC PRO TUNC ASSIGNMENT Recorded Jul 20, 2015
From: D. E. DURAND FAMILY LIMITED PARTNERSHIP
To: FAS SECURED CREDITORS HOLDCO, LLC
Reel/Frame 036137/0683 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 21, 2014
From: YURCHENKO, ALEXEY; JAAKOLA, SEPPO; OLLAKKA, TEEMU
To: CODERSHIP OY
Reel/Frame 033584/0348 →
Continuity (1)
Related Publication 20160055230A1 · Feb 25, 2016