Remote lock waiting management method and device, electronic equipment and storage medium
By controlling the lock conflict information between the node and the execution node and retry message processing, the resource waste problem after lock conflict in remote data processing tasks in distributed databases is solved, and the data processing effect and user experience are improved.
Patent Information
- Application Number
- CN202411125615.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-03
AI Technical Summary
Remote data processing tasks in distributed databases lack effective lock waiting management methods when lock conflicts, resulting in wasted computing resources and database instance bandwidth, affecting data processing effects and user experience.
By controlling the interaction between the node and the execution node, the reporting of lock conflict information and the processing of retry messages is realized, the target task is added to the lock waiting queue, and retry when the data is released to avoid continuous tasks after lock conflict. Try again.
Effectively manage lock waiting in distributed databases, reduce waste of computing resources and database instance bandwidth, and improve data processing effect and user experience.
Smart Images

Figure CN119066080A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of database technology, and in particular, to a remote lock waiting management method and device, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of the Internet and informatization, the generation of data is exploding, so the requirements for databases and their management are getting higher and higher. When executing data processing tasks such as SQL requests, databases often need to add locks to the targeted data resources, such as shared locks, exclusive locks, etc., to maintain data consistency and transaction isolation when data resources are accessed concurrently. This means that different data processing tasks may have lock conflicts on the same data resource, that is, multiple data processing tasks need to lock the same data resource and cannot be implemented at the same time. In the face of the above lock conflict problem, a single database instance often uses a lock wait queue to manage lock waits so that different tasks lock data resources in turn.
[0003] However, in the related technologies, faced with the above-mentioned lock conflict problem, there is no effective lock waiting management for the remote data processing tasks in the distributed database, and the data processing tasks that have lock conflicts can only be retried continuously until the data resources can be locked. This leads to a lot of waste of computing resources and bandwidth between database instances, which in turn affects the data processing effect of the distributed database and the user experience. Summary of the invention
[0004] In view of this, one or more embodiments of the present specification provide a remote lock waiting management method and device, an electronic device, and a storage medium.
[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0006] According to a first aspect of one or more embodiments of this specification, a remote lock waiting management method is proposed, the method comprising:
[0007] receiving and executing a target task sent by a control node, and if a lock conflict occurs on first data targeted by the target task, sending lock conflict information carrying the first data to the control node;
[0008] If a lock waiting message carrying the first data is received from the control node, the target task is added to the lock waiting queue corresponding to the first data, wherein if the control node adds the target task to the lock waiting queue corresponding to the first data, the lock waiting message carrying the first data is sent to the execution node;
[0009] If the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, a retry message carrying the target task is sent to the control node, so that the control node retries the target task.
[0010] In a possible embodiment of the present specification, when the control node receives lock conflict information sent by an execution node, the control node adds the target task to a lock waiting queue corresponding to the data carried by the lock conflict information; when the control node receives lock conflict information sent by multiple execution nodes, the control node adds the target task to a lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received;
[0011] After adding the target task to the lock waiting queue, the control node returns a lock waiting message to the corresponding execution node.
[0012] In a possible embodiment of the present specification, if a lock waiting message carrying the first data sent by the control node is received, adding the target task to a lock waiting queue corresponding to the first data includes:
[0013] If the first data is not released after receiving the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
[0014] In a possible embodiment of this specification, the method further includes:
[0015] If the first data has been released after receiving the lock wait message carrying the first data sent by the control node, a retry message is sent to the control node to enable the control node to retry the target task.
[0016] In a possible embodiment of this specification, the method further includes:
[0017] receiving and executing the target task sent by the control node when retrying the target task, and if a lock conflict occurs on the second data targeted by the target task, sending lock conflict information carrying the second data to the control node, so that the control node sends a release message carrying the first data to the execution node, wherein the first data and the second data are different;
[0018] If a release message carrying the first data sent by the control node is received, the first data is released.
[0019] In a possible embodiment of this specification, the method further includes:
[0020] If the first data is released, and the target task is the first task in the lock waiting queue corresponding to the first data, add a retry waiting time for the second task in the lock waiting queue;
[0021] If the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to make the control node retry the target task.
[0022] In a possible embodiment of this specification, the method further includes:
[0023] The target task sent by the control node when retrying the target task is received and executed, and if a lock conflict occurs on the first data targeted by the target task, the retry waiting time added to the second task is removed.
[0024] According to a second aspect of one or more embodiments of this specification, a remote lock waiting management method is proposed, the method comprising:
[0025] Sending the target task to an execution node so that the execution node executes the target task, wherein if a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node;
[0026] If lock conflict information carrying the first data sent by the execution node is received, and the target task is added to the lock waiting queue corresponding to the first data, a lock waiting message carrying the first data is sent to the execution node, so that the execution node adds the target task to the lock waiting queue corresponding to the first data;
[0027] If a retry message carrying the target task is received from the execution node, the target task is retried, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
[0028] In a possible embodiment of the present specification, sending the target task to an execution node so that the execution node executes the target task includes:
[0029] The target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node when a lock conflict occurs on the data targeted by the target task.
[0030] In a possible embodiment of this specification, the method further includes:
[0031] If lock conflict information is received from one execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; if lock conflict information is received from multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information;
[0032] After the target task is added to the lock waiting queue, a lock waiting message is returned to the corresponding execution node.
[0033] In a possible embodiment of the present specification, if the first data has been released after the execution node receives the lock waiting message sent by the control node, the execution node sends a retry message carrying the target task to the control node.
[0034] In a possible embodiment of the present specification, if a lock conflict occurs on the second data targeted by the target task during the process of retrying the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein the first data is different from the second data;
[0035] The method further comprises:
[0036] In the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, a release message for the first data is sent to the execution node, so that the execution node releases the first data.
[0037] In a possible embodiment of this specification, the method further includes:
[0038] Periodically detecting the status of the execution node;
[0039] If it is determined that the state of the execution node is abnormal when detecting the state of the execution node, the target task is retried.
[0040] According to a third aspect of one or more embodiments of this specification, a remote lock waiting management device is provided, the device comprising:
[0041] A lock conflict module, configured to receive and execute a target task sent by a control node, and if a lock conflict occurs on first data targeted by the target task, send lock conflict information carrying the first data to the control node;
[0042] a lock waiting module, configured to add the target task to the lock waiting queue corresponding to the first data if a lock waiting message carrying the first data is received from the control node, wherein if the control node adds the target task to the lock waiting queue corresponding to the first data, the control node sends a lock waiting message carrying the first data to the execution node;
[0043] The lock release module is used to send a retry message carrying the target task to the control node if the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, so that the control node retries the target task.
[0044] In a possible embodiment of the present specification, when the control node receives lock conflict information sent by an execution node, the control node adds the target task to a lock waiting queue corresponding to the data carried by the lock conflict information; when the control node receives lock conflict information sent by multiple execution nodes, the control node adds the target task to a lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received;
[0045] After adding the target task to the lock waiting queue, the control node returns a lock waiting message to the corresponding execution node.
[0046] In a possible embodiment of the present specification, the lock waiting module is used to:
[0047] If the first data is not released after receiving the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
[0048] In a possible embodiment of the present specification, the retry module is further used for:
[0049] If the first data has been released after receiving the lock wait message carrying the first data sent by the control node, a retry message is sent to the control node to enable the control node to retry the target task.
[0050] In a possible embodiment of the present specification, the apparatus further includes a queue updating module, configured to:
[0051] receiving and executing the target task sent by the control node when retrying the target task, and if a lock conflict occurs on the second data targeted by the target task, sending lock conflict information carrying the second data to the control node, so that the control node sends a release message carrying the first data to the execution node, wherein the first data and the second data are different;
[0052] If a release message carrying the first data sent by the control node is received, the first data is released.
[0053] In a possible embodiment of the present specification, the retry module is further used for:
[0054] If the first data is released, and the target task is the first task in the lock waiting queue corresponding to the first data, add a retry waiting time for the second task in the lock waiting queue;
[0055] If the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to make the control node retry the target task.
[0056] In a possible embodiment of the present specification, the retry module is further used for:
[0057] The target task sent by the control node when retrying the target task is received and executed, and if a lock conflict occurs on the first data targeted by the target task, the retry waiting time added to the second task is removed.
[0058] According to a fourth aspect of one or more embodiments of this specification, a remote lock waiting management device is provided, the method comprising:
[0059] A sending module, used for sending the target task to an execution node, so that the execution node executes the target task, wherein if a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node;
[0060] a notification module for sending a lock waiting message carrying the first data to the execution node if lock conflict information carrying the first data is received from the execution node and the target task is added to the lock waiting queue corresponding to the first data, so that the execution node adds the target task to the lock waiting queue corresponding to the first data;
[0061] A retry module is used to retry the target task if a retry message carrying the target task is received from the execution node, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
[0062] In a possible embodiment of this specification, the sending module is used to:
[0063] The target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node when a lock conflict occurs on the data targeted by the target task.
[0064] In a possible embodiment of the present specification, the apparatus further includes a queue selection module, configured to:
[0065] If lock conflict information is received from one execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; if lock conflict information is received from multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information;
[0066] After the target task is added to the lock waiting queue, a lock waiting message is returned to the corresponding execution node.
[0067] In a possible embodiment of the present specification, if the first data has been released after the execution node receives the lock waiting message sent by the control node, the execution node sends a retry message carrying the target task to the control node.
[0068] In a possible embodiment of the present specification, if a lock conflict occurs on the second data targeted by the target task during the process of retrying the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein the first data is different from the second data;
[0069] The device also includes a queue updating module, which is used to:
[0070] In the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, a release message for the first data is sent to the execution node, so that the execution node releases the first data.
[0071] In a possible embodiment of the present specification, the device further includes a detection module, which is used to:
[0072] Periodically detecting the status of the execution node;
[0073] If it is determined that the state of the execution node is abnormal when detecting the state of the execution node, the target task is retried.
[0074] According to a fifth aspect of one or more embodiments of this specification, a computer program product is proposed, comprising a computer program / instruction, which implements the steps of the method described in the first aspect or the second aspect when executed by a processor.
[0075] According to a sixth aspect of one or more embodiments of this specification, an electronic device is provided, including:
[0076] processor;
[0077] a memory for storing processor-executable instructions;
[0078] The processor implements the method as described in the first aspect or the second aspect by running the executable instructions.
[0079] According to a seventh aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0080] According to an eighth aspect of one or more embodiments of this specification, a distributed database system is proposed, the system comprising:
[0081] at least one execution node, the execution node being used to report lock conflict information to the control node when executing a remote task issued by the control node, add the remote task to a lock waiting queue corresponding to the data involved in the lock conflict information, and remotely notify the control node to retry the remote task when the data involved in the lock conflict information is released and the remote task is at the head of the lock waiting queue;
[0082] At least one control node, the control node is used to send remote tasks to execution nodes, add the remote tasks to a lock waiting queue according to lock conflict information reported by the execution nodes, and retry the remote tasks according to remote notifications from the execution nodes.
[0083] Exemplarily, the execution node is used to run the remote lock waiting management method described in the first aspect.
[0084] Exemplarily, the control node is used to run the remote lock waiting management method described in the second aspect.
[0085] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0086] In the remote lock waiting management method provided in the embodiment of the present specification, the control node sends the target task to the execution node when executing or retrying the target task for the first time. If a lock conflict occurs on the first data targeted by the target task during the execution of the target task, the execution node sends the lock conflict information carrying the first data to the control node to notify the control node that the target task has a lock conflict on the first data; the execution node can add the target task to the lock waiting queue corresponding to the first data and return the lock waiting message to the execution node to notify the execution node that the target task has been added to the lock waiting queue corresponding to the first data; the execution node can also add the target task to the lock waiting queue corresponding to the first data after receiving the lock waiting message, and notify the control node to retry the target task through a retry message when the first data is released and the target task is the head of the queue. It can be seen that the method realizes remote lock waiting management by reporting lock conflict information and retry messages from the execution node to the control node, so that the remote data processing tasks in the distributed database can also perform effective lock waiting management, thereby avoiding the waste of computing resources and bandwidth between database instances caused by the continuous retry of the remote data processing tasks after the lock conflict occurs, so as to improve the data processing effect of the distributed database and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a structural diagram of a distributed database provided by an exemplary embodiment.
[0088] Figure 2 The invention is a flowchart of a remote lock waiting management method applied to an execution node provided by an exemplary embodiment.
[0089] Figure 3 It is a flowchart of a remote lock waiting management method applied to a control node provided by an exemplary embodiment.
[0090] Figure 4 It is a flowchart of the interaction between the execution node and the control node in the remote lock waiting management method provided by an exemplary embodiment.
[0091] Figure 5 It is a structural schematic diagram of a device provided by an exemplary embodiment.
[0092] Figure 6 It is a block diagram of a remote lock waiting management device applied to an execution node provided by an exemplary embodiment.
[0093] Figure 7 It is a block diagram of a remote lock waiting management device applied to a control node provided by an exemplary embodiment. DETAILED DESCRIPTION
[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0095] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0096] Based on the technical problems mentioned in the background technology, at least one embodiment of the present specification provides a remote lock waiting management method, which can effectively manage the lock waiting of the remote data processing tasks of the distributed database after a lock conflict occurs on the data resources, thereby avoiding the waste of computing resources and bandwidth between database instances caused by continuous retries of the remote data processing tasks after the lock conflict occurs, so as to improve the data processing effect of the distributed database and the user experience.
[0097] This method can be applied to Figure 1 Each database instance in the distributed database based on the LSM-Tree storage engine shown in the figure, some of these database instances act as control nodes when executing remote data processing tasks, that is, the source end of the task, and some database instances act as execution nodes when executing remote data processing tasks, that is, the destination end of the task.
[0098] It should be understood that the correspondence between database instances and node types (i.e., control nodes and execution nodes) can be fixed or not, that is, some database instances can be used as control nodes when processing some data processing tasks, and can be used as execution nodes when processing other data processing tasks.
[0099] It should be understood that when a distributed database executes a remote data processing task, the control node can send the task to one or more execution nodes, and each execution node executes the task on the local data resources involved in the task. If the execution is completed, the execution result is returned to the control node, so that the control node determines the execution result of the task based on the execution results reported by all execution nodes. Of course, lock conflicts may occur when some execution nodes execute the task, and this method is to perform lock waiting management in this scenario.
[0100] Next, the remote lock waiting management method provided in this specification is introduced in detail from both the execution node and the control node sides.
[0101] Please refer to the attached Figure 2 , which exemplarily shows the process of the remote lock waiting management method applied to the execution node, including steps S201 to S203.
[0102] In step S201, a target task sent by a control node is received and executed. If a lock conflict occurs on first data targeted by the target task, lock conflict information carrying the first data is sent to the control node.
[0103] The target task is a remote data processing task, such as a remote SQL (Structured Query Language) request. The first data is part or all of the data in the local data resource involved in the execution node of the target task executing the method, such as one or more rows of data in the local data resource involved in the execution node of the target task executing the method.
[0104] When processing or retrying a target task, the control node will assign an execution thread to the target task, which is used to process operations related to the target task. After receiving the target task, the execution node will assign an execution thread to the target task, which will execute operations related to the target task.
[0105] Exemplarily, when the execution node reports the lock conflict information carrying the first data to the control node, the lock conflict information may carry an identifier of the first data, such as a key value of the row data.
[0106] In step S202, if a lock waiting message carrying the first data is received from the control node, the target task is added to the lock waiting queue corresponding to the first data. If the control node adds the target task to the lock waiting queue corresponding to the first data, a lock waiting message carrying the first data is sent to the execution node.
[0107] When the control node processes or retries the target task for the first time, it will send the target task to one or more execution nodes involved, and these execution nodes may have lock conflicts and report them in accordance with step S201. When the control node receives lock conflict information sent by an execution node, it adds the target task to the lock waiting queue corresponding to the data carried by the lock conflict information, and when the control node receives lock conflict information sent by multiple execution nodes, it adds the target task to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received, for example, randomly adding the target task to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received, or adding the target task to the lock waiting queue corresponding to the data carried by the first received lock conflict information among the multiple lock conflict information received; after adding the target task to the lock waiting queue, the control node returns a lock waiting message to the corresponding execution node, that is, the control node adds the target task to the lock waiting queue corresponding to the data carried by a certain lock conflict information, and then returns a lock waiting message carrying the data carried by the lock conflict information to the execution node that reports the lock conflict information.
[0108] After receiving the lock conflict information reported by at least one execution node, the control node sends a rollback message to each execution node involved in the target task, so that each execution node rolls back the transaction of the target task and releases the thread of the target task, thereby ensuring that lock conflicts occur in some execution nodes and other execution nodes can also give up local threads in time, thereby avoiding waste of computing resources and improving data processing efficiency on the execution nodes.
[0109] It can be seen from this that the execution node executing the method may receive a lock waiting message carrying the first data sent by the control node, or may not receive a lock waiting message carrying the first data sent by the control node. If the execution node executing the method may receive a lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
[0110] Exemplarily, if the first data is not released after the execution node executing the method receives the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data. For example, the execution node can determine whether the first data is released by comparing the seq value of the lock waiting queue corresponding to the first data when a lock conflict occurs and the seq (data sequence number) value of the lock waiting queue corresponding to the first data when the lock waiting message is received. If it changes, the first data is released, and if it does not change, the first data is not released.
[0111] Exemplarily, if the execution node executing the method receives a lock wait message carrying the first data and the first data has been released, then the execution node sends a retry message to the control node so that the control node retries the target task. For example, the execution node can determine whether the first data is released by comparing the seq value of the lock wait queue corresponding to the first data when a lock conflict occurs and the seq (data sequence number) value of the lock wait queue corresponding to the first data when the lock wait message is received. If the change occurs, the first data is released, and if the change does not occur, the first data is not released. It should be understood that when the control node retries the target task, it will resend the target task to one or more execution nodes involved so that these execution nodes execute the target task on the local data resources involved in the target task.
[0112] Since there is a certain time interval between the occurrence of a lock conflict and the receipt of a lock waiting message, the first data may have been released during this time interval. Therefore, the above two embodiments confirm whether the first data is released for a second time when the lock waiting message is received, so as to avoid the problem that when the first data is released, there is no task in the lock waiting queue corresponding to the first data, resulting in the first data being idle, and the resulting problem that the target task added to the lock waiting queue will not be awakened and will starve to death, because the task is not awakened when the first data is released and will not continue to try to wake it up later.
[0113] It should be understood that when the control node adds the target task to the lock waiting queue corresponding to a certain data, the target task is added to the lock waiting queue corresponding to the data in the control node. When the execution node adds the target task to the lock waiting queue corresponding to the first data, since the transaction of the target task has been rolled back and the thread has been released, a false target task can be created and added to the lock waiting queue corresponding to the first data in the execution node.
[0114] The remote lock waiting management method provided in this embodiment implements remote lock waiting management by having the execution node report lock conflict information and retry messages to the control node, so that the remote data processing tasks in the distributed database can also perform effective lock waiting management, thereby avoiding the waste of computing resources and bandwidth between database instances caused by continuous retries of remote data processing tasks after lock conflicts, thereby improving the data processing effect of the distributed database and the user experience.
[0115] In some embodiments of the present specification, after the execution node executing the method sends a retry message carrying the target task to the control node so that the control node retries the target task, the control node will retry the target task, that is, send the target task to one or more execution nodes involved so that each execution node executes the target task on the local data resources related to the target task.
[0116] If no lock conflict occurs and the target task is completed when the execution node executing the method receives and executes the target task sent by the control node when retrying the target task, the next task in the lock waiting queue corresponding to the first data can be awakened.
[0117] If a lock conflict occurs when the execution node executing the method receives and executes the target task sent by the control node when retrying the target task, lock conflict information is reported to the control node, and the lock conflict information carries data of the lock conflict.
[0118] Furthermore, in the process of receiving and executing the target task sent by the control node when retrying the target task, if a lock conflict occurs on the second data targeted by the target task, lock conflict information carrying the second data is sent to the control node, so that the control node sends a release message carrying the first data to the execution node, wherein the first data and the second data are different; if a release message carrying the first data sent by the control node is received, the first data is released.
[0119] After receiving the lock conflict information, the control node can Figure 2 In the embodiment shown, the control node performs processing logic when receiving lock conflict information reported by one or more execution nodes, that is, sends a rollback message to each execution node so that each execution node rolls back the transaction of the target task and releases the local thread, and adds the target task to the lock conflict queue corresponding to the second data or the lock waiting queue corresponding to the data carried by other lock conflict messages, and returns the lock conflict message to the corresponding execution node.
[0120] Since the control node is in the stage of retrying the target task rather than the stage of executing the target task for the first time, after receiving the lock conflict information, the control node can compare whether the data carried in the lock conflict information reported by the execution node executing the method is consistent with the data carried in the lock conflict information reported by the execution node executing the method when processing the target task last time. If they are inconsistent, the execution node executing the method is notified through a release message to release the data carried in the lock conflict information reported last time, and remove the first task in the lock conflict queue corresponding to the retried data to avoid starvation of the task.
[0121] In this embodiment, the execution node that executes the method will execute the target task resent by the control node after removing the retry target task and notifying the control node to retry the target task; if a lock conflict occurs on data other than the first data, the execution node will release the first data in response to the release message of the control node, that is, remove the first task in the lock waiting queue corresponding to the retry first data, so as to avoid the target task occupying the local thread and causing other tasks in the lock waiting queue to be starved, thereby improving the effectiveness of remote lock waiting management.
[0122] In some embodiments of the present disclosure, the method further comprises:
[0123] First, if the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, a retry waiting time is added for the second task in the lock waiting queue; next, if the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to enable the control node to retry the target task.
[0124] In this embodiment, when the execution node wakes up the remote task in the lock waiting queue, a retry waiting time is added to the second task so that the second task is woken up and retried after the retry waiting time, thereby avoiding unexpected situations such as the loss of the remote task woken up by the execution node, which may cause other tasks in the lock waiting queue to be starved to death.
[0125] Preferably, the target task sent by the control node when retrying the target task can also be received and executed. If a lock conflict occurs on the first data targeted by the target task, and the time after the retry message carrying the target task is sent to the control node does not reach the retry waiting time, the retry waiting time added to the second task is removed. This avoids the waste of computing resources caused by unnecessary retries of the second task, because the first data has already had a lock conflict, and retrying the second task at this time cannot lock the first data.
[0126] Please refer to the attached Figure 3 , which exemplarily shows the process of the remote lock waiting management method applied to the control node, including steps S301 to S303.
[0127] In step S301, the target task is sent to an execution node so that the execution node executes the target task. If a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node.
[0128] Exemplarily, the target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein when a lock conflict occurs on the data targeted by the target task, each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node.
[0129] In step S302, if lock conflict information carrying the first data is received from the execution node and the target task is added to the lock waiting queue corresponding to the first data, a lock waiting message carrying the first data is sent to the execution node so that the execution node adds the target task to the lock waiting queue corresponding to the first data.
[0130] It should be understood that if the control node receives lock conflict information sent by an execution node, the target task will be added to the lock waiting queue corresponding to the data carried by the lock conflict information; if the control node receives lock conflict information sent by multiple execution nodes, the target task will be added to the lock waiting queue corresponding to the data carried by one lock conflict information among the multiple lock conflict information; and after adding the target task to the lock waiting queue, the control node will return a lock waiting message to the corresponding execution node.
[0131] Exemplarily, if the first data is not released after the execution node receives the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
[0132] As another example, if the first data has been released after the execution node receives the lock waiting message sent by the control node, the execution node sends a retry message carrying the target task to the control node.
[0133] In step S303, if a retry message carrying the target task is received from the execution node, the target task is retried, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
[0134] Exemplarily, the method further includes: periodically detecting the state of the execution node; if it is determined that the state of the execution node is abnormal when detecting the state of the execution node, retrying the target task.
[0135] Since the target task is a remote data processing task, the retry of the target task is remotely notified by the execution node based on whether the first data is released and the order of the target task in the lock waiting queue. When the execution node remotely notifies the control node to retry the target task, failures such as packet loss may occur, but the execution node is still waiting for the control node to retry the target task and will not notify again. Based on the remote notification of the execution node, this example adds a periodic detection method of the control node to ensure that the retry of the target task can be triggered accurately and in a timely manner, avoiding the problem of the target task being unable to be retried due to abnormal situations such as execution node downtime and network disconnection, thereby improving the effectiveness and reliability of the remote lock waiting management provided by this method.
[0136] Wherein, if a lock conflict occurs on the second data targeted by the target task during the process of retrying the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein the first data is different from the second data. Based on this, the method also includes: in the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, sending a release message for the first data to the execution node, so that the execution node releases the first data.
[0137] More details about the above steps have been introduced in detail in the method for executing the node side in the first aspect, and will not be repeated here.
[0138] Please refer to the attached Figure 4 , which shows the interaction flow chart between the control node and the execution node in the lock waiting management method obtained by combining the above embodiments. Figure 4 For a more vivid and specific understanding of the complete remote lock waiting management process provided in this specification, the details of the process have been introduced in detail in the above embodiments and will not be repeated here.
[0139] Figure 5 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 5At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include hardware required for other tasks. One or more embodiments of this specification may be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0140] Please refer to Figure 6 The remote lock waiting management device can be applied to Figure 5 The device shown in the figure is used to implement the technical solution of this specification. Figure 5 When the device shown is an execution node, the remote lock waiting management device may include:
[0141] The lock conflict module 601 is used to receive and execute the target task sent by the control node, and if a lock conflict occurs on the first data targeted by the target task, send lock conflict information carrying the first data to the control node;
[0142] A lock waiting module 602 is configured to add the target task to a lock waiting queue corresponding to the first data if a lock waiting message carrying the first data is received from the control node, wherein if the control node adds the target task to the lock waiting queue corresponding to the first data, the control node sends a lock waiting message carrying the first data to the execution node;
[0143] The lock release module 603 is used to send a retry message carrying the target task to the control node if the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, so that the control node retries the target task.
[0144] In a possible embodiment of the present specification, when the control node receives lock conflict information sent by an execution node, the control node adds the target task to a lock waiting queue corresponding to the data carried by the lock conflict information; when the control node receives lock conflict information sent by multiple execution nodes, the control node adds the target task to a lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received;
[0145] After adding the target task to the lock waiting queue, the control node returns a lock waiting message to the corresponding execution node.
[0146] In a possible embodiment of the present specification, the lock waiting module is used to:
[0147] If the first data is not released after receiving the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
[0148] In a possible embodiment of the present specification, the retry module is further used for:
[0149] If the first data has been released after receiving the lock wait message carrying the first data sent by the control node, a retry message is sent to the control node to enable the control node to retry the target task.
[0150] In a possible embodiment of the present specification, the apparatus further includes a queue updating module, configured to:
[0151] receiving and executing the target task sent by the control node when retrying the target task, and if a lock conflict occurs on the second data targeted by the target task, sending lock conflict information carrying the second data to the control node, so that the control node sends a release message carrying the first data to the execution node, wherein the first data and the second data are different;
[0152] If a release message carrying the first data sent by the control node is received, the first data is released.
[0153] In a possible embodiment of the present specification, the retry module is further used for:
[0154] If the first data is released, and the target task is the first task in the lock waiting queue corresponding to the first data, add a retry waiting time for the second task in the lock waiting queue;
[0155] If the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to make the control node retry the target task.
[0156] In a possible embodiment of the present specification, the retry module is further used for:
[0157] The target task sent by the control node when retrying the target task is received and executed, and if a lock conflict occurs on the first data targeted by the target task, the retry waiting time added to the second task is removed.
[0158] Please refer to Figure 7 The remote lock waiting management device can be applied to Figure 5 The device shown in the figure is used to implement the technical solution of this specification. Figure 5 When the device shown is a control node, the remote lock waiting management device may include:
[0159] A sending module 701 is used to send the target task to an execution node so that the execution node executes the target task, wherein if a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node;
[0160] The notification module 702 is configured to send a lock waiting message carrying the first data to the execution node if the lock conflict information carrying the first data sent by the execution node is received and the target task is added to the lock waiting queue corresponding to the first data, so that the execution node adds the target task to the lock waiting queue corresponding to the first data;
[0161] The retry module 703 is used to retry the target task if a retry message carrying the target task is received from the execution node, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
[0162] In a possible embodiment of this specification, the sending module is used to:
[0163] The target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node when a lock conflict occurs on the data targeted by the target task.
[0164] In a possible embodiment of the present specification, the apparatus further includes a queue selection module, configured to:
[0165] If lock conflict information is received from one execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; if lock conflict information is received from multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information;
[0166] After the target task is added to the lock waiting queue, a lock waiting message is returned to the corresponding execution node.
[0167] In a possible embodiment of the present specification, if the first data has been released after the execution node receives the lock waiting message sent by the control node, the execution node sends a retry message carrying the target task to the control node.
[0168] In a possible embodiment of the present specification, if a lock conflict occurs on the second data targeted by the target task during the process of retrying the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein the first data is different from the second data;
[0169] The device also includes a queue updating module, which is used to:
[0170] In the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, a release message for the first data is sent to the execution node, so that the execution node releases the first data.
[0171] In a possible embodiment of the present specification, the device further includes a detection module, which is used to:
[0172] Periodically detecting the status of the execution node;
[0173] If it is determined that the state of the execution node is abnormal when detecting the state of the execution node, the target task is retried.
[0174] One or more embodiments of the present specification also provide a computer program product, including a computer program / instruction, which implements the steps of the method provided in any of the above embodiments when executed by a processor.
[0175] One or more embodiments of the present specification further provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method provided in any of the above embodiments.
[0176] According to an eighth aspect of one or more embodiments of this specification, a distributed database system is proposed, the system comprising:
[0177] at least one execution node, the execution node being used to report lock conflict information to the control node when executing a remote task issued by the control node, add the remote task to a lock waiting queue corresponding to the data involved in the lock conflict information, and remotely notify the control node to retry the remote task when the data involved in the lock conflict information is released and the remote task is at the head of the lock waiting queue;
[0178] At least one control node, the control node is used to send remote tasks to execution nodes, add the remote tasks to a lock waiting queue according to lock conflict information reported by the execution nodes, and retry the remote tasks according to remote notifications from the execution nodes.
[0179] Please refer to the attached Figure 1 , which exemplarily shows the structure of the distributed database system, in which multiple database instances of the distributed database system are partially used as execution nodes and partially used as control nodes.
[0180] Exemplarily, the execution node is used to run the remote lock waiting management method described in the first aspect.
[0181] Exemplarily, the control node is used to run the remote lock waiting management method described in the second aspect.
[0182] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0183] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0184] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0185] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0186] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0187] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0188] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0189] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0190] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0191] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A remote lock waiting management method, the method comprising: receiving and executing a target task sent by a control node, and if a lock conflict occurs on first data targeted by the target task, sending lock conflict information carrying the first data to the control node; If a lock waiting message carrying the first data is received from the control node, the target task is added to the lock waiting queue corresponding to the first data, wherein if the control node adds the target task to the lock waiting queue corresponding to the first data, the lock waiting message carrying the first data is sent to the execution node; If the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, a retry message carrying the target task is sent to the control node, so that the control node retries the target task.
2. The remote lock waiting management method according to claim 1, wherein when the control node receives lock conflict information sent by an execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; when the control node receives lock conflict information sent by multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information received; After adding the target task to the lock waiting queue, the control node returns a lock waiting message to the corresponding execution node.
3. The remote lock waiting management method according to claim 1, wherein if a lock waiting message carrying the first data sent by the control node is received, the target task is added to a lock waiting queue corresponding to the first data, comprising: If the first data is not released after receiving the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
4. The remote lock waiting management method according to claim 3, further comprising: If the first data has been released after receiving the lock wait message carrying the first data sent by the control node, a retry message is sent to the control node to enable the control node to retry the target task.
5. The remote lock waiting management method according to claim 1, further comprising: receiving and executing the target task sent by the control node when retrying the target task, and if a lock conflict occurs on the second data targeted by the target task, sending lock conflict information carrying the second data to the control node, so that the control node sends a release message carrying the first data to the execution node, wherein the first data and the second data are different; If a release message carrying the first data sent by the control node is received, the first data is released.
6. The remote lock waiting management method according to claim 1, further comprising: If the first data is released, and the target task is the first task in the lock waiting queue corresponding to the first data, add a retry waiting time for the second task in the lock waiting queue; If the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to make the control node retry the target task.
7. The remote lock waiting management method according to claim 6, further comprising: The target task sent by the control node when retrying the target task is received and executed, and if a lock conflict occurs on the first data targeted by the target task, the retry waiting time added to the second task is removed.
8. A remote lock waiting management method, the method comprising: Sending the target task to the execution node so that the execution node executes the target task, wherein if a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node; If lock conflict information carrying the first data sent by the execution node is received, and the target task is added to the lock waiting queue corresponding to the first data, a lock waiting message carrying the first data is sent to the execution node, so that the execution node adds the target task to the lock waiting queue corresponding to the first data; If a retry message carrying the target task is received from the execution node, the target task is retried, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
9. The remote lock waiting management method according to claim 8, wherein sending the target task to an execution node so that the execution node executes the target task comprises: The target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node when a lock conflict occurs on the data targeted by the target task.
10. The remote lock waiting management method according to claim 9, further comprising: If lock conflict information is received from one execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; if lock conflict information is received from multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information; After the target task is added to the lock waiting queue, a lock waiting message is returned to the corresponding execution node.
11. The remote lock waiting management method according to claim 8, if the first data has been released after the execution node receives the lock waiting message sent by the control node, the execution node sends a retry message carrying the target task to the control node.
12. The remote lock waiting management method according to claim 8, wherein if a lock conflict occurs on the second data targeted by the target task during the retry of the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein: The first data is different from the second data; The method further comprises: In the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, a release message for the first data is sent to the execution node, so that the execution node releases the first data.
13. The remote lock waiting management method according to claim 8, further comprising: Periodically detecting the status of the execution node; If it is determined that the state of the execution node is abnormal when detecting the state of the execution node, the target task is retried.
14. A remote lock waiting management device, the device comprising: A lock conflict module, configured to receive and execute a target task sent by a control node, and if a lock conflict occurs on first data targeted by the target task, send lock conflict information carrying the first data to the control node; a lock waiting module, configured to add the target task to the lock waiting queue corresponding to the first data if a lock waiting message carrying the first data is received from the control node, wherein if the control node adds the target task to the lock waiting queue corresponding to the first data, the control node sends a lock waiting message carrying the first data to the execution node; The lock release module is used to send a retry message carrying the target task to the control node if the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data, so that the control node retries the target task.
15. The remote lock waiting management device according to claim 14, wherein the lock waiting module is used for: If the first data is not released after receiving the lock waiting message carrying the first data sent by the control node, the target task is added to the lock waiting queue corresponding to the first data.
16. The remote lock waiting management device according to claim 15, wherein the retry module is further used for: If the first data has been released after receiving the lock wait message carrying the first data sent by the control node, a retry message is sent to the control node to enable the control node to retry the target task.
17. The remote lock waiting management device according to claim 14, wherein the retry module is further used for: If the first data is released, and the target task is the first task in the lock waiting queue corresponding to the first data, add a retry waiting time for the second task in the lock waiting queue; If the time after a retry message carrying the target task is sent to the control node reaches the retry waiting time, and the target task sent by the control node when retrying the target task is not received, a retry message carrying the second task is sent to the control node to make the control node retry the target task.
18. The remote lock waiting management device according to claim 17, wherein the retry module is further used for: The target task sent by the control node when retrying the target task is received and executed, and if a lock conflict occurs on the first data targeted by the target task, the retry waiting time added to the second task is removed.
19. A remote lock waiting management device, the device comprising: A sending module, used for sending the target task to an execution node, so that the execution node executes the target task, wherein if a lock conflict occurs on the first data targeted by the target task, the execution node sends lock conflict information carrying the first data to the control node; a notification module for sending a lock waiting message carrying the first data to the execution node if lock conflict information carrying the first data is received from the execution node and the target task is added to the lock waiting queue corresponding to the first data, so that the execution node adds the target task to the lock waiting queue corresponding to the first data; A retry module is used to retry the target task if a retry message carrying the target task is received from the execution node, wherein the execution node sends a retry message carrying the target task to the control node when the first data is released and the target task is the first task in the lock waiting queue corresponding to the first data.
20. The remote lock waiting management device according to claim 19, wherein the sending module is used for: The target task is sent to at least one execution node so that the at least one execution node executes the target task, wherein: When a lock conflict occurs on the data targeted by the target task, each of the at least one execution node sends lock conflict information carrying the data where the lock conflict occurs to the control node.
21. The remote lock waiting management device according to claim 20, further comprising a queue selection module for: If lock conflict information is received from one execution node, the target task is added to the lock waiting queue corresponding to the data carried by the lock conflict information; if lock conflict information is received from multiple execution nodes, the target task is added to the lock waiting queue corresponding to the data carried by one of the multiple lock conflict information; After the target task is added to the lock waiting queue, a lock waiting message is returned to the corresponding execution node.
22. The remote lock waiting management device according to claim 19, wherein if a lock conflict occurs on the second data targeted by the target task during the retry of the target task, the execution node sends lock conflict information carrying the second data to the control node, wherein: The first data is different from the second data; The device also includes a queue updating module, which is used to: In the case of retrying the target task, if lock conflict information carrying the second data sent by the execution node is received, a release message for the first data is sent to the execution node, so that the execution node releases the first data.
23. The remote lock waiting management device according to claim 19, further comprising a detection module for: Periodically detecting the status of the execution node; If it is determined that the state of the execution node is abnormal when detecting the state of the execution node, the target task is retried.
24. A computer program product comprising a computer program / instructions, which when executed by a processor implement the steps of the method according to any one of claims 1 to 13.
25. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 13 by running the executable instructions.
26. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 13.
27. A distributed database system, the system comprising: at least one execution node, the execution node being used to report lock conflict information to the control node when executing a remote task issued by the control node, add the remote task to a lock waiting queue corresponding to the data involved in the lock conflict information, and remotely notify the control node to retry the remote task when the data involved in the lock conflict information is released and the remote task is at the head of the lock waiting queue; At least one control node, the control node is used to send remote tasks to execution nodes, add the remote tasks to a lock waiting queue according to lock conflict information reported by the execution nodes, and retry the remote tasks according to remote notifications from the execution nodes.
28. The database system according to claim 27, wherein the execution node is used to run the remote lock waiting management method according to any one of claims 1 to 7.
29. The database system according to claim 27, wherein the control node is used to run the remote lock waiting management method according to any one of claims 8 to 13.
Citation Information
Cited By
Method for managing remote lock waits in distributed database, and distributed database
WO2026037403A1
