CN118034982A - Error processing method, storage medium and product for database batch operation - Google Patents

Error processing method, storage medium and product for database batch operation Download PDF

Info

Publication number
CN118034982A
CN118034982A CN202410211631.1A CN202410211631A CN118034982A CN 118034982 A CN118034982 A CN 118034982A CN 202410211631 A CN202410211631 A CN 202410211631A CN 118034982 A CN118034982 A CN 118034982A
Authority
CN
China
Prior art keywords
error
information
operations
tuple
lock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410211631.1A
Other languages
Chinese (zh)
Inventor
季业
王建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingbase Information Technologies Co Ltd
Original Assignee
Beijing Kingbase Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingbase Information Technologies Co Ltd filed Critical Beijing Kingbase Information Technologies Co Ltd
Priority to CN202410211631.1A priority Critical patent/CN118034982A/en
Publication of CN118034982A publication Critical patent/CN118034982A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an error processing method for batch operation of a database, a storage medium and a product. The error processing method for batch operation of the database comprises the following steps: all operations in the batch operation are sequentially executed; recording corresponding log information according to the type of the executed operation, wherein the log information corresponding to the updating operation comprises the position information, the old data information and the concurrent locking information of the tuple aimed by the operation; detecting that an error occurs in operation execution; and rolling back the error operation according to the type of the error operation and the corresponding log information. By recording the position information, the old data information and the concurrent locking information of the tuple aimed at by the updating operation, the data can be restored to the state before updating by utilizing the position information and the old data information, and the locking information of other operations can be reserved, so that the information integrity of the other operations is ensured, and the normal operation of the database is facilitated.

Description

Error processing method, storage medium and product for database batch operation
Technical Field
The present invention relates to the field of database technologies, and in particular, to a method for processing errors in batch database operations, a storage medium, and a product.
Background
Batch operations of a database refer to the execution manner of integrating multiple operations of the same type into one transaction for processing for insert (insert), delete (delete) and update (update) operations of the database. In the process of executing batch operations, if an error occurs in the executed operations, the whole transaction is often rolled back, that is, all operations which have been executed before the error are invalidated, which has a great adverse effect on the efficiency of the batch operations.
Disclosure of Invention
An object of the present invention is to provide an error handling method, a storage medium, and a product for batch operation of a database capable of individually rollback an error operation of a batch operation and ensuring accuracy of related information after rollback.
In particular, the invention provides an error processing method for batch operation of a database, which comprises the following steps:
Sequentially executing all operations in the batch operation;
Recording corresponding log information according to the type of the executed operation, wherein the log information corresponding to the updating operation comprises position information, old data information and concurrent locking information of a tuple aimed by the operation;
detecting that an error occurs in operation execution;
and rolling back the error operation according to the type of the error operation and the corresponding log information.
Optionally, the step of rolling back the error operation according to the type of the error operation and the corresponding log information includes:
If the error operation is an updating operation, acquiring log information of the error operation;
detecting that other concurrent operation lock information is included in the concurrent lock information of the log information besides the error operation lock information;
and deleting and rewriting the concurrent lock information to obtain new concurrent lock information, wherein the new concurrent lock information reserves the lock information of other concurrent operations except for the lock information of the misoperation.
Optionally, the step of deleting the concurrent lock information includes:
And checking whether the other concurrent operation and the error operation belong to the same transaction, if so, executing the step of deleting the concurrent lock information, and if not, deleting the lock information of the error operation.
Optionally, the step of rolling back the error operation according to the type of the error operation and the corresponding log information includes:
and if the error operation is an updating operation, recovering the tuple aimed by the error operation as old data information in the log information.
Optionally, in the step of recording the corresponding log information according to the type of the performed operation:
the log information corresponding to the delete operation includes location information, old data information, and lock information of the tuple for which the operation is directed.
Optionally, the step of rolling back the error operation according to the type of the error operation and the corresponding log information includes:
If the error operation is a deletion operation, acquiring log information of the error operation;
Recovering the tuple aimed by the error operation into old data information in the log information;
And restoring the lock information.
Optionally, in the step of recording the corresponding log information according to the type of the performed operation:
the log information corresponding to the insert operation includes location information of the new tuple inserted.
Optionally, the step of rolling back the error operation according to the type of the error operation and the corresponding log information includes:
If the error operation is an inserting operation, acquiring log information of the error operation;
Searching the position of the tuple inserted by the error operation;
The tuple inserted by the incorrect operation is set to invisible.
In another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer-executable program which, when executed by a processor, implements an error handling method for database batch operations according to any of the above.
In a further aspect of the invention, a computer program product is provided, comprising a computer executable program which when executed by a processor implements an error handling method for database batch operations according to any of the preceding claims.
According to the error processing method, the storage medium and the product for batch operation, corresponding log information is recorded according to the type of the operation executed in the process of executing the batch operation, and after the error occurrence of the operation execution is detected, the error operation is rolled back according to the type of the error operation and the corresponding log information. That is, after an error operation occurs, the database data can be restored to a state before the error operation is performed according to the log information, that is, the error operation is rolled back alone, thereby improving the efficiency of the batch operation. In addition, the log information corresponding to the update operation includes the position information, the old data information and the concurrent lock information of the tuple for which the operation is directed, so that in the process of the update operation of the rollback error, the position information and the old data information can be utilized to restore the data to a state before the update, and the lock information of other operations can be reserved, thereby ensuring the information integrity of the other operations, and avoiding that the lock information of the other operations concurrent with the update operation is flushed out due to the rollback of the update operation of the error, so that the subsequent execution of the other operations is influenced. Therefore, on the basis of being capable of independently rollback the error operation of batch operation, the method is beneficial to ensuring the accuracy of the related information of the database after rollback of the error operation, and is beneficial to the normal operation of the database.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter by way of example and not by way of limitation with reference to the accompanying drawings. The same reference numbers will be used throughout the drawings to refer to the same or like parts or portions. It will be appreciated by those skilled in the art that the drawings are not necessarily drawn to scale. In the accompanying drawings:
FIG. 1 is a schematic flow diagram of a method of error handling for database batch operations according to one embodiment of the invention;
FIG. 2 is a schematic flow diagram of a rollback procedure for an update operation in an error handling method for database batch operations according to one embodiment of the invention;
FIG. 3 is a schematic flow chart diagram of a rollback procedure for a delete operation in an error handling method for database bulk operations in accordance with one embodiment of the invention;
FIG. 4 is a schematic flow chart diagram of a rollback procedure for an insert operation in an error handling method for database batch operations in accordance with one embodiment of the invention;
FIG. 5 is a schematic flow chart diagram of a method of error handling for database batch operations in accordance with another embodiment of the invention;
FIG. 6 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention;
FIG. 7 is a schematic diagram of a computer program product according to one embodiment of the invention;
FIG. 8 is a schematic diagram of a computer device according to one embodiment of the invention.
Detailed Description
It should be understood by those skilled in the art that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention, and the some embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive effort, based on the embodiments provided by the present invention, shall still fall within the scope of protection of the present invention.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
The flowcharts provided by the present invention are not intended to indicate that the operations of the methods are to be performed in any particular order, or that all of the operations of the methods are included in all of each case. Furthermore, the method may include additional operations. Additional variations may be made to the above-described methods within the scope of the technical ideas provided by the methods of the present embodiments.
As shown in FIG. 1, in one embodiment, the error handling method for database batch operations generally includes:
Step S101, all operations in the batch operation are sequentially performed. Specifically, individual ones of the batch operations are performed one after the other.
Step S102, corresponding log information is recorded according to the type of the executed operation. Specifically, each time an operation is performed, log information is recorded for the performed operation.
The log information corresponding to the updating operation comprises position information, old data information and concurrent lock information of a tuple aimed by the operation. In particular, the update operation is to modify existing data in the database, that is, to modify data of a certain tuple in the data table. Before formally updating the aimed tuple, recording the position information of the tuple; old data information of the tuple, namely, the tuple data before modification, or the data of the tuple which is not updated currently; concurrent lock information, the database is allowed to operate concurrently during the update operation.
Specifically, the shared lock of the tuple to be operated is obtained when the update operation starts, and at this time, other operations, such as query and other update operations, may also obtain the shared lock of the tuple, that is, there may be multiple concurrent operations that obtain the shared lock of the tuple at the same time. Thus, all lock information on the tuple is obtained before the formal update of the tuple in question.
Further, the log information corresponding to the delete operation includes location information, old data information, and lock information of the tuple for which the operation is directed. Specifically, the deletion operation is to delete existing data in the database, or simply delete a certain tuple in the data table. Before formally deleting the targeted tuple, recording the position information of the tuple; old data information of the tuple, namely current data of the tuple or data to be deleted; the lock information, during the deletion operation, the database is not allowed to operate concurrently.
Specifically, the exclusive lock of the tuple to be operated is acquired at the beginning of the delete operation, and no other operation can target the tuple to be deleted any more, that is, only the delete operation acquires the exclusive lock of the tuple. Therefore, before formally deleting the targeted tuple, the lock information on the tuple, that is, the exclusive lock information of the delete operation, is acquired.
In addition, the log information corresponding to the insert operation includes the location information of the new tuple inserted. Specifically, the insertion operation is to insert a new piece of data into the database, or simply a new tuple into the data table. Because the new tuple does not exist before the new tuple is inserted, no other operations on the new tuple are possible. Therefore, for the insertion operation, only the position information of the new tuple after the insertion is recorded.
Step S103, an error in the execution of the operation is detected. Specifically, an error or abnormality occurs during the execution of a certain operation, in other words, the execution of a certain operation fails.
Step S104, rollback is carried out on the error operation according to the type of the error operation and the corresponding log information. When a certain operation fails to be executed, the error operation needs to be rolled back, so that the operation of the subsequent operation is prevented from being influenced.
Referring to fig. 2, specifically, if the error operation is an update operation, the steps include:
step S201, log information of the error operation is acquired. Specifically, the log information recorded before is obtained, and the log information corresponding to the update operation includes the position information, the old data information and the concurrent lock information of the tuple for which the operation is directed.
Step S202, detecting that other concurrent operation lock information is included in the concurrent lock information of the log information besides the error operation lock information. Specifically, there is shared lock information for other operations on the old tuple, i.e., before the update operation is performed.
Step S203, checking whether other concurrent operations belong to the same transaction as the error operation, if so, executing step S204, otherwise, executing step S205. Specifically, it is checked whether other concurrent operations are operations that belong to the same transaction as the update operation.
Step S204, deleting and rewriting a new concurrent lock information, wherein the new concurrent lock information reserves the lock information of other concurrent operations except for the lock information of the wrong operation. Specifically, if other concurrent operations and the error operation belong to the same transaction, when the error update operation is rolled back, the lock information of the error update operation and the lock information of the operation belonging to the same transaction as the error update operation are lost, and the loss of the lock information may cause the related operation to have errors or obtain an error result, so that the new concurrent lock information is rewritten after the concurrent lock information on the tuple is deleted. Because the wrong updating operation needs to be rolled back, the new concurrent lock information does not need to retain the lock information of the wrong operation, so that the lock information of other concurrent operations except the lock information of the wrong operation is retained, and other operations after the rolling back can be normally executed.
In step S205, only the lock information of the erroneous operation is deleted. Specifically, if other concurrent operations and the error operation do not belong to the same transaction, when the error update operation is rolled back, the lock information of the error update operation is lost, and the lock information of the operation of other transactions is not affected, namely, only the lock information of the error operation is deleted.
Step S206, recovering the tuple for the error operation as old data information in the log information. Specifically, old data information is also recorded in the log information, and the tuple for which the updating operation is performed in error is restored to old data before updating according to the old data information, so that rollback is completed.
Referring to fig. 3, specifically, if the erroneous operation is a delete operation, the steps include:
in step S301, log information of the error operation is acquired. Specifically, the log information recorded before is obtained, and the log information corresponding to the deleting operation includes the position information, the old data information and the lock information of the tuple for which the operation is directed.
Step S302, recovering the tuple for the error operation as old data information in the log information. Specifically, the deleted tuples are restored into the data table.
Step S303, restoring the lock information. Specifically, although the errant delete operation is rolled back, the exclusive lock of the delete operation on the tuple is restored. Since the tuple cannot be processed any more after being deleted, although the deletion operation is in error and rolled back, logically, the subsequent operation cannot be processed by the tuple restored by the rollback of the deletion operation, so that the exclusive lock of the deletion operation is restored, and other operations cannot be processed by the tuple any more, thereby avoiding the occurrence of logical operation deviation.
Referring to fig. 4, specifically, if the error operation is an insert operation, the steps include:
In step S401, log information of the error operation is acquired. Specifically, the log information recorded before is obtained, and the log information corresponding to the insertion operation only includes the position information of the new tuple inserted.
Step S402, find the position of the tuple inserted by the error operation. Specifically, the newly inserted tuple is found from the position information of the new tuple inserted in the log information.
In step S403, the tuple inserted by the error operation is set to invisible. The newly inserted tuple is set to invisible, i.e. the rollback of the insert operation is completed.
In the scheme of the embodiment, corresponding log information is recorded according to the type of the executed operation in the process of executing the batch operation, and after detecting that the operation execution is wrong, the wrong operation is rolled back according to the type of the wrong operation and the corresponding log information. That is, after an error operation occurs, the database data can be restored to a state before the error operation is performed according to the log information, that is, the error operation is rolled back alone, thereby improving the efficiency of the batch operation. In addition, the log information corresponding to the update operation includes the position information, the old data information and the concurrent lock information of the tuple for which the operation is directed, so that in the process of the update operation of the rollback error, the position information and the old data information can be utilized to restore the data to a state before the update, and the lock information of other operations can be reserved, thereby ensuring the information integrity of the other operations, and avoiding that the lock information of the other operations concurrent with the update operation is flushed out due to the rollback of the update operation of the error, so that the subsequent execution of the other operations is influenced. Therefore, on the basis of being capable of independently rollback the error operation of batch operation, the method is beneficial to ensuring the accuracy of the related information of the database after rollback of the error operation, and is beneficial to the normal operation of the database.
Further, the log information corresponding to the delete operation includes location information, old data information, and lock information of the tuple for which the operation is directed. In the process of the deletion operation of the rollback error, the position information and the old data information can be utilized to restore the data to the state before deletion, namely, the deletion operation is singly rolled back, and the lock information of the deletion operation can be reserved, so that the subsequent operation can not take the tuple restored by the rollback of the deletion operation as an object, and the occurrence of logical operation deviation is avoided.
The log information corresponding to the insert operation includes location information of the new inserted tuple, and during the insert operation of the rollback error, the new inserted tuple may be set to be invisible according to the location information, thereby individually rollback the insert operation.
As shown in FIG. 5, in one embodiment, the error handling method for database batch operations generally includes:
In step S501, rollback is started. Specifically, a rollback of an erroneous operation is initiated.
Step S502, confirms whether the operation of rollback is an insert operation or an update operation or a delete operation.
In step S503, if the inserting operation is performed, the inserted tuple is set to be invisible. Specifically, log information recorded when the insert operation was previously performed is acquired, and the log information corresponding to the insert operation has the position information of the new tuple inserted. Finding a new inserted tuple according to the position information of the new tuple inserted in the log information, and setting the tuple inserted by the error operation to be invisible. Step S511 is performed.
In step S504, if the update operation is performed, the new tuple is rolled back. Specifically, the update operation modifies the existing database data, so in the rollback process, the new tuple is rolled back into the old tuple, that is, the tuple data modified by the update operation is rolled back to the tuple data before update. In particular, reference may be made first to the rollback operation of the insert operation, i.e. setting the new tuple to invisible. And then restoring the tuple data into the pre-update data according to the old data information in the log information.
In step S505, lock information of the old tuple is acquired. Specifically, lock information on old tuple data is obtained from log information.
Step S506, checking whether the concurrent lock and the lock of the update operation on the old tuple share the lock description information, if so, executing step S507, otherwise, executing step S508. Specifically, if the concurrent lock on the old tuple and the lock of the update operation share lock description information, the concurrent lock is flushed together when the update operation is rolled back; if the concurrent lock on the old tuple and the lock of the update operation do not share lock description information, the concurrent lock is not flushed together when the update operation is rolled back. It is necessary to check whether the concurrent lock on the old tuple and the lock of the update operation share lock description information to determine whether the rollback update operation has an effect on other locks.
Specifically, whether the lock of the concurrent lock on the old tuple and the lock of the update operation share the lock description information is checked by checking whether the operation corresponding to the concurrent lock and the update operation belong to the same transaction, the lock description information is shared by the same transaction, and the lock description information is not shared by the same transaction.
Step S507, the lock description information of the lock information without the update operation is rewritten. Specifically, if the lock description information is shared by the locks concurrently operated with the update operation on the old tuple, a new lock description information is rewritten after the lock description information is deleted, and the new lock description information is different from the original lock description information in that the lock information of the update operation with an error is removed. Step S511 is performed.
Step S508, deleting the lock description information of the lock information of the updating operation. Specifically, if the concurrent lock on the old tuple and the lock of the update operation do not share the lock description information, the lock description information where the lock of the update operation is located is deleted without affecting other lock description information, so that the rollback can be ended only by deleting the lock description information where the lock of the update operation is located. Step S511 is performed.
Step S509, if the operation is deleted, obtaining log information. Specifically, old data information before deletion and exclusive lock information on the old tuple are acquired from the log information.
Step S510, the old tuple data and the lock information are restored. Specifically, the deleted tuple is restored to the un-deleted state, but the exclusive lock of the delete operation is reserved.
Step S511, the rollback is ended. I.e. the erroneous operation rollback ends.
In the scheme of the embodiment, during the rollback error updating operation, the position information and the old data information recorded by the log are utilized to restore the data to the state before updating, and the lock information of other operations is reserved, so that the information integrity of the other operations is ensured, and the problem that the lock information of the other operations concurrent with the updating operation is flushed due to the rollback of the updating operation with errors is avoided, so that the subsequent execution of the other operations is influenced. Therefore, on the basis of being capable of independently rollback the error operation of batch operation, the method is beneficial to ensuring the accuracy of the related information of the database after rollback of the error operation, and is beneficial to the normal operation of the database.
The present embodiment also provides a computer-readable storage medium and a computer program product. Fig. 6 is a schematic diagram of a computer-readable storage medium 10 according to one embodiment of the invention. Fig. 7 is a schematic diagram of a computer program product 20 according to one embodiment of the invention.
The computer-readable storage medium 10 has stored thereon a computer-executable program 11, which when executed by a processor, implements the error handling method of database batch operations of any of the above embodiments. The computer program product 20 includes a computer executable program 11 that when executed by a processor implements any of the database batch operations error handling methods described above.
In particular, the computer program 11 for carrying out operations of the present invention may be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages.
For the purposes of this description of the embodiments, computer-readable storage medium 10 can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable storage medium 10 may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
As shown in fig. 8, a schematic diagram of a computer device 30 is provided. The computer device 30 may include a memory 310, a processor 320, and a computer executable program 11 stored on the memory 310 and running on the processor 320, and the processor 320 implements the error handling method for database batch operations of any of the embodiments described above when executing the computer executable program 11.
The computer device 30 may be, for example, a server, a desktop computer, a notebook computer, a tablet computer, or a smartphone. In some examples, computer device 30 may be a cloud computing node. The computer device 30 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer device 30 may be implemented in a distributed cloud computing environment where remote processing devices coupled via a communications network perform tasks. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including memory storage devices.
Computer device 30 may include a processor 320 adapted to execute stored instructions, a memory 310 providing temporary storage for the operation of the instructions during operation. Processor 320 may be a single core processor, a multi-core processor, a computing cluster, or any number of other configurations. Memory 310 may include Random Access Memory (RAM), read only memory, flash memory, or any other suitable storage system.
Processor 320 may be connected through a system interconnect (e.g., PCI-Express, etc.) to an I/O interface (input/output interface) adapted to connect computer device 30 to one or more I/O devices (input/output devices). The I/O devices may include, for example, a keyboard and a pointing device, which may include a touch pad or touch screen, among others. The I/O device may be a built-in component of the computer device 30 or may be a device externally connected to the computing device.
Processor 320 may also be linked through a system interconnect to a display interface suitable for connecting computer device 30 to a display device. The display device may include a display screen as a built-in component of the computer device 30. The display device may also include a computer monitor, television, projector, or the like, that is externally connected to the computer device 30. In addition, a network interface controller (network interface controller, NIC) may be adapted to connect the computer device 30 to a network through a system interconnect. In some embodiments, the NIC may use any suitable interface or protocol (such as an internet small computer system interface, etc.) to transfer data. The network may be a cellular network, a radio network, a Wide Area Network (WAN), a Local Area Network (LAN), or the internet, among others. The remote device may be connected to the computing device through a network.
By now it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been shown and described herein in detail, many other variations or modifications of the invention consistent with the principles of the invention may be directly ascertained or inferred from the present disclosure without departing from the spirit and scope of the invention. Accordingly, the scope of the present invention should be understood and deemed to cover all such other variations or modifications.

Claims (10)

1. An error handling method for database batch operations, comprising:
Sequentially executing all operations in the batch operation;
Recording corresponding log information according to the type of the executed operation, wherein the log information corresponding to the updating operation comprises position information, old data information and concurrent locking information of a tuple aimed by the operation;
detecting that an error occurs in operation execution;
and rolling back the error operation according to the type of the error operation and the corresponding log information.
2. The error handling method of database bulk operations of claim 1, wherein the step of rolling back the error operations according to the type of error operations and the corresponding log information comprises:
If the error operation is an updating operation, acquiring log information of the error operation;
detecting that other concurrent operation lock information is included in the concurrent lock information of the log information besides the error operation lock information;
and deleting and rewriting the concurrent lock information to obtain new concurrent lock information, wherein the new concurrent lock information reserves the lock information of other concurrent operations except for the lock information of the misoperation.
3. The error handling method of database bulk operations of claim 2, wherein the step of deleting the concurrent lock information is preceded by:
And checking whether the other concurrent operation and the error operation belong to the same transaction, if so, executing the step of deleting the concurrent lock information, and if not, deleting the lock information of the error operation.
4. The error handling method of database bulk operations of claim 2, wherein the step of rolling back the error operations according to the type of error operations and the corresponding log information comprises:
and if the error operation is an updating operation, recovering the tuple aimed by the error operation as old data information in the log information.
5. The error handling method of database batch operations according to claim 1, wherein, in the step of recording corresponding log information according to the type of the performed operations:
the log information corresponding to the delete operation includes location information, old data information, and lock information of the tuple for which the operation is directed.
6. The error handling method of database bulk operations of claim 5, wherein the step of rolling back the error operations according to the type of error operations and the corresponding log information comprises:
If the error operation is a deletion operation, acquiring log information of the error operation;
Recovering the tuple aimed by the error operation into old data information in the log information;
And restoring the lock information.
7. The error handling method of database batch operations according to claim 1, wherein, in the step of recording corresponding log information according to the type of the performed operations:
the log information corresponding to the insert operation includes location information of the new tuple inserted.
8. The error handling method of database bulk operations of claim 7, wherein the step of rolling back the error operations according to the type of error operations and the corresponding log information comprises:
If the error operation is an inserting operation, acquiring log information of the error operation;
Searching the position of the tuple inserted by the error operation;
The tuple inserted by the incorrect operation is set to invisible.
9. A computer-readable storage medium having stored thereon a computer-executable program which, when executed by a processor, implements the error handling method of database batch operation according to any one of claims 1 to 8.
10. A computer program product comprising a computer executable program which when executed by a processor implements the method of error handling for database batch operations according to any one of claims 1 to 8.
CN202410211631.1A 2024-02-26 2024-02-26 Error processing method, storage medium and product for database batch operation Pending CN118034982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410211631.1A CN118034982A (en) 2024-02-26 2024-02-26 Error processing method, storage medium and product for database batch operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410211631.1A CN118034982A (en) 2024-02-26 2024-02-26 Error processing method, storage medium and product for database batch operation

Publications (1)

Publication Number Publication Date
CN118034982A true CN118034982A (en) 2024-05-14

Family

ID=90998183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410211631.1A Pending CN118034982A (en) 2024-02-26 2024-02-26 Error processing method, storage medium and product for database batch operation

Country Status (1)

Country Link
CN (1) CN118034982A (en)

Similar Documents

Publication Publication Date Title
US10261869B2 (en) Transaction processing using torn write detection
US10437795B2 (en) Upgrading systems with changing constraints
CN108932338B (en) Data updating method, device, equipment and medium
US10048978B2 (en) Apparatus and method for identifying a virtual machine having changeable settings
US8799716B2 (en) Heap dump occurrence detection
EP4154125A1 (en) Distributed transaction execution in distributed databases
CN113157303A (en) Upgrading method, embedded system, terminal and computer storage medium
CN110865829B (en) Database upgrading method, system, equipment and storage medium
CN111694684A (en) Abnormal construction method and device of storage equipment, electronic equipment and storage medium
CN108664255B (en) Software upgrading method and device
US9015116B2 (en) Consistent replication of transactional updates
CN112579591B (en) Data verification method, device, electronic equipment and computer readable storage medium
CN105630625A (en) Method and device for detecting consistency between data copies
CN116089394A (en) Data rollback method, storage medium and device of database
CN118034982A (en) Error processing method, storage medium and product for database batch operation
CN116226195A (en) Partition automatic creation method, storage medium and device for database partition table
US9424261B2 (en) Techniques to take clean database file snapshot in an online database
CN117539960A (en) Database data synchronization method, storage medium and device
CN116226079A (en) Method for processing data operation errors of database, storage medium and equipment
CN112579139B (en) Multi-cluster patch updating method, system, server and storage medium
CN116204354A (en) Method for processing data writing error of database, storage medium and equipment
JP2014142741A (en) Job re-execution support system
CN113672277B (en) Code synchronization method, system, computer device and storage medium
CN118069745A (en) SQL SERVER increment acquisition method, storage medium and equipment based on transaction log
CN110838333B (en) Hash table repairing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination