IP Library Granted Patent US 8,352,421
Granted Patent B2
US 8,352,421 · App. 12/128,577 · Granted Jan 8, 2013

Recording distributed transactions using probabalistic data structures

Assignee: Red Hat, Inc.
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 8,352,421
App. No.
12/128,577
Granted
Jan 8, 2013
Kind
B2
Abstract

A coordinator manages a two-phase commit distributed transaction. The coordinator uses a probabilistic data structure to record whether the two-phase commit distributed transaction was successfully completed. A participant of the two-phase commit distributed transaction is directed to commit to the transaction or to roll back the transaction based on contents of the probabilistic data structure.

Claims (46)

1. A computer implemented method comprising:

managing a two-phase commit distributed transaction by a transaction manager that is configured to use a presumed abort optimization;

adding, by a processing device executing the transaction manager, an entry to a probabilistic data structure for the two-phase commit distributed transaction to record whether participants of the transaction have been directed to commit to the transaction, the entry indicating that the transaction was successfully completed;

receiving a query from a participant of the two-phase commit distributed transaction asking whether the two-phase commit distributed transaction was successfully completed;

directing the participant of the two-phase commit distributed transaction to commit to the transaction or to roll back the transaction based on contents of the probabilistic data structure, the directing comprising:

responsive to determining that the entry for the two-phase commit distributed transaction is not in the probabilistic data structure, answering the query with a response that the transaction was aborted; and

responsive to determining that the entry for the two-phase commit distributed transaction is in the probabilistic data structure, answering the query with a response that the transaction was likely successfully completed.

2. The method of claim 1 , further comprising:

using an auxiliary data structure to record whether the two-phase commit distributed transaction is successfully completed; and

responsive to determining that an entry for the two-phase commit distributed transaction is in the probabilistic data structure, verifying whether the transaction was successfully completed by checking the auxiliary data structure.

3. The method of claim 1 , wherein the probabilistic data structure is a bloom filter.

4. A computer readable storage medium including instructions that, when executed by a processing device, cause the processing device to perform a method comprising:

managing a two-phase commit distributed transaction by a transaction manager running on the processing device, wherein the transaction manager is configured to use a presumed abort optimization;

adding, by the transaction manager, an entry to a probabilistic data structure for the two-phase commit distributed transaction to record whether participants of the transaction have been directed to commit to the transaction, the entry indicating that the transaction was;

receiving a query asking whether the two-phase commit distributed transaction was successfully completed;

in response to determining that the entry for the two-phase commit distributed transaction is in the probabilistic data structure, answering the query with a response that the transaction was likely successfully completed; and

in response to determining that no entry for the two-phase commit distributed transaction is in the probabilistic data structure, answering the query with a response that the transaction was aborted.

5. The computer readable storage medium of claim 4 , the method further comprising:

using an auxiliary data structure to record whether the two-phase commit distributed transaction as successfully completed; and

responsive to determining that an entry for the two-phase commit distributed transaction is in the probabilistic data structure, verifying whether the transaction was successfully completed by checking the auxiliary data structure.

6. The computer readable storage medium of claim 4 , wherein the probabilistic data structure is a bloom filter.

7. An apparatus comprising:

a memory; and

a processing device, coupled to the memory, to execute instructions for a transaction manager from the memory, wherein the processing device is configured by the instructions to:

manage a two-phase commit distributed transaction between a plurality of participants using a presumed abort optimization;

add an entry to a probabilistic data structure for the two-phase commit distributed transaction to record whether the plurality of participants of the transaction have been directed to commit to the transaction, the entry indicating that the transaction was successfully completed;

receive a query asking whether the two-phase commit distributed transaction was successfully completed;

answer the query with a response that the transaction was likely successfully completed responsive to determining that the entry for the two-phase commit distributed transaction is in the probabilistic data structure; and

answer the query with a response that the transaction was aborted responsive to determining that the entry for the two-phase commit distributed transaction is not in the probabilistic data structure.

8. The apparatus of claim 7 , wherein the processor is further configured to:

record in an auxiliary data structure whether the two-phase commit distributed transaction as successfully completed; and

use the auxiliary data structure to verify whether the transaction was successfully completed upon determining that an entry for the two-phase commit distributed transaction is in the probabilistic data structure.

9. The apparatus of claim 7 , wherein the probabilistic data structure is a bloom filter.

10. A method, the method comprising:

coordinating, by a processing device executing a transaction manager configured to use a presumed abort optimization, a two-phase commit distributed transaction, the coordinating comprising:

querying participants in the transaction as to whether they are able to commit to the transaction;

directing the participants to commit to the transaction when all of the participants indicated that they are able to commit; and

directing the participants to roll-back the transaction when not all of the participants indicated that they are able to commit;

adding, by the processing device, an entry to a probabilistic data structure for the transaction responsive to determining that the participants have been directed to commit to the transaction, the entry indicating that the transaction has successfully completed;

receiving a query asking whether the two-phase commit distributed transaction was successfully completed;

in response to determining that the entry for the two-phase commit distributed transaction is in the probabilistic data structure, answering the query with a response that the transaction was likely successfully completed; and

in response to determining that the entry for the two-phase commit distributed transaction is not in the probabilistic data structure, answering the query with a response that the transaction was aborted.

11. The method of claim 10 , further comprising:

using an auxiliary data structure to record whether the two-phase commit distributed transaction is successfully completed; and

upon determining that an entry for the two-phase commit distributed transaction is in the probabilistic data structure, verifying whether the transaction was successfully completed by checking the auxiliary data structure.

12. The method of claim 10 , wherein the probabilistic data structure is a bloom filter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2008
From: LITTLE, MARK CAMERON
To: RED HAT INC.
Reel/Frame 021046/0337 →
Continuity (1)
Related Publication 20090300022A1 · Dec 3, 2009