Method and device for processing distributed transaction
Abstract:
An objective of the present application is to provide a method and device for processing a distributed transaction. Compared with the prior art, in a distributed system, a first device in the present application is a group formed by multiple nodes. The first device acquires a writer lock adding request, sent by an SQL compiler, about a target table of a to-be-processed transaction, and performs writer lock adding processing on the target table on the basis of the writer lock adding request, so as to avoid collision problems in multi-transaction concurrence and to ensure isolation of transactions. If the writer lock adding processing is successful, to-be-processed version information of the target table is sent to the SQL compiler, so as to ensure that the SQL compiler operates a correct version of the target table later. Further, by restarting child nodes which do not respond to the writer lock adding request or migrating service of the child nodes to other physical machines and then updating locking state information of the child nodes, the present application effectively recovers errors and ensures in-group consistency.
Public/Granted literature
Information query
Patent Agency Ranking
0/0