×

Method for transaction within a distributed database

  • US 6,216,126 B1
  • Filed: 05/27/1998
  • Issued: 04/10/2001
  • Est. Priority Date: 05/28/1997
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of performing a transaction that affects a plurality of nodes within a system of nodes in which information belonging to a distributed data base is stored, wherein said information is divided into tables and said transaction originates from a transaction coordinator, wherein said transaction affects at least one group of parts of at least one first table of said number of tables, wherein said group includes at least a first and a second part and possibly one or more further parts, wherein said first table part is stored in a first node and said second table part is stored in a second node that is separate from said first node, wherein possible other table parts in said group are stored in intermediate nodes comprised of further nodes that are separate from each other and from said first and said second node, and wherein said transaction is a two-safe transaction, characterized by opening said transaction with a first phase in which:

  • said transaction coordinator sends a “

    prepare”

    -message, by which is meant a request asking the first node to prepare for said transaction;

    when said first node is able to undertake said transaction, said first node sends a prepare request to said second node either directly or via one or more intermediate nodes, or when said first node is unable to carry out said transaction, said first node sends an “

    unprepared”

    -message to said second node, either directly or via one or more intermediate nodes;

    when said second node is able to undertake said transaction, said second node sends a “

    prepared”

    -message directly to said transaction coordinator, i.e. a message indicating that all affected nodes are prepared to undertake said transaction;

    or when said second node is unable to carry out said transaction or when said second node has received an “

    unprepared”

    -message, said second node sends an “

    unprepared”

    -message directly to said transaction coordinator, which concludes said first phase, wherein said first phase is followed by a second phase in which;

    said transaction coordinator sends directly to said second node a message regarding measures to be carried out;

    said second node then sends said message regarding said measures to said first node, either directly or via one or more intermediate nodes; and

    in which said first node then sends a concluding message to said transaction coordinator;

    therewith concluding said second phase, where said message regarding said measures is a “

    commit”

    -message, i.e. a message to carry out the measures in accordance with said transaction, and said concluding message is a “

    committed”

    -message i.e. a message stating that the measures have been carried out in accordance with the transaction, provided that the first phase is concluded with a “

    prepared”

    -message, or when said message regarding said measures is an “

    abort”

    -message, i.e. a message to abort said transaction and said concluding message is an “

    aborted”

    -message, i.e. the transaction is aborted, when said first phase is concluded with an “

    unprepared”

    -message, wherein said transaction affects further groups of table parts where respective groups include parts belonging to said first table or parts belonging to some other table within said data base but separate from said first table;

    wherein said table parts are stored in first and second nodes and possibly in one or more intermediate nodes, each being separate from the other within respective groups of parts;

    wherein said first phase is opened with said preparatory request from said transaction coordinator to respective first nodes and is concluded with a “

    prepared”

    -message or an “

    unprepared”

    -message from respective second nodes to said transaction coordinator;

    wherein said second phase is opened with said message regarding measures to be carried out from said transaction coordinator to respective second nodes and concluded with said concluding message from respective first nodes to said transaction coordinator, said message regarding measures to be carried out is a “

    commit”

    -message, i.e. a message to carry out measures in accordance with said transaction, and said concluding message is a “

    committed”

    message, i.e. a message stating that the measures have been carried out in accordance with the transaction, when said first phase is concluded with a “

    prepared”

    -message from all second nodes, or when said message regarding said measures is an “

    abort”

    -message, i.e. a message to abort said transaction and said concluding message is a transaction aborted message, when said first phase is concluded with an “

    unprepared”

    message from any second node.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×