CN110909012A - Method, device, equipment and storage medium for blocking database object - Google Patents

Method, device, equipment and storage medium for blocking database object Download PDF

Info

Publication number
CN110909012A
CN110909012A CN201911225671.7A CN201911225671A CN110909012A CN 110909012 A CN110909012 A CN 110909012A CN 201911225671 A CN201911225671 A CN 201911225671A CN 110909012 A CN110909012 A CN 110909012A
Authority
CN
China
Prior art keywords
lock
dictionary
dictionary lock
target
current
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.)
Granted
Application number
CN201911225671.7A
Other languages
Chinese (zh)
Other versions
CN110909012B (en
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.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database 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 Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN201911225671.7A priority Critical patent/CN110909012B/en
Publication of CN110909012A publication Critical patent/CN110909012A/en
Application granted granted Critical
Publication of CN110909012B publication Critical patent/CN110909012B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for blocking a database object. The method comprises the steps of obtaining a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to a current database object accessed by the current transaction; and if the current dictionary lock information table has a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state, determining the non-conflict dictionary lock as a target dictionary lock, marking the target dictionary lock in the unoccupied state as an occupied state, and blocking the current database object by adopting the target dictionary lock. By adopting the technical scheme, the embodiment of the invention can reduce the creation times of the dictionary lock, thereby reducing the times of occupying the global critical area object due to the creation of the dictionary lock, reducing the probability of global concurrent conflict of dictionary lockout and improving the execution efficiency of a database system.

Description

Method, device, equipment and storage medium for blocking database object
Technical Field
The invention relates to the technical field of database management, in particular to a method, a device, equipment and a storage medium for blocking database objects.
Background
Data blocking is an important technical means for the database management system to perform concurrency control, and is used for managing concurrent access of shared resources of the database and ensuring that a plurality of transactions can access correct and consistent database objects in the concurrent execution process. Locks used to lock database objects are called dictionary locks.
Before any database object is accessed, the dictionary lock is required to be adopted to seal the database object, otherwise, system exception can be caused due to the fact that definition of the database object is changed in a concurrent scene. For example, one user is performing an operation of updating C1 column data of the T1 data table, and another user simultaneously initiates an operation of deleting C1 column in the T1 data table, so that the definition of the database object changes during the execution of the update statement, which inevitably causes data access confusion and database system exception. In the prior art, when a certain database object needs to be accessed, a global critical area object is called first to create a dictionary lock for the database object, and after the current database object is accessed, the global critical area object is called to release the dictionary lock.
However, when a large number of concurrent operations exist in an application system, the dictionary lockout method in the prior art needs to apply and release the dictionary lock frequently, so that the global critical area object needs to be called repeatedly, and the global critical area object has mutual exclusivity and can only be called by a transaction at most at the same time, and therefore, the existing dictionary lockout method causes global concurrent conflicts to occur in the dictionary lockout, and further reduces the overall execution efficiency of the database system.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for blocking a database object, so as to reduce the probability of global concurrency conflict occurring in dictionary blocking and improve the execution efficiency of a database system.
In a first aspect, an embodiment of the present invention provides a method for blocking a database object, including:
acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction;
and if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, and marking the target dictionary lock in the unoccupied state as the occupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate locking conflict with the added dictionary lock of the current database object.
In a second aspect, an embodiment of the present invention provides a blocking apparatus for a database object, including:
the information acquisition module is used for acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction;
and the lock marking module is used for determining the non-conflict dictionary lock as a target dictionary lock when the non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, and marking the target dictionary lock as the occupied state from the unoccupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate locking conflict with the added dictionary lock of the current database object.
In a third aspect, an embodiment of the present invention provides a database management apparatus, including:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a blocking method for database objects according to an embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is used to implement, when executed by a processor, a method for blocking a database object according to an embodiment of the present invention.
In the technical scheme for blocking the database object, the current dictionary lock information table of the current transaction and the type information of the target dictionary lock which is required to be added to the current database object accessed by the current transaction are obtained, when a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, the non-conflict dictionary lock is determined as the target dictionary lock, the unoccupied state of the target dictionary lock is marked as an occupied state, and therefore the target dictionary lock is used for blocking the current database object. By adopting the technical scheme, the embodiment of the invention adopts the non-conflict dictionary lock which is applied to the current database object by the current transaction, is in accordance with the type of the target data lock to be added and is not in an occupied state to block the current database object, and does not re-create the target dictionary lock, so that the creation times of the dictionary lock can be reduced, the times of occupying the global critical area object due to the creation of the dictionary lock can be reduced, the probability of global concurrent conflict occurring in the dictionary blocking can be reduced, and the execution efficiency of the database system can be improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic flowchart illustrating a blocking method for database objects according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a blocking method for database objects according to a second embodiment of the present invention;
fig. 3 is a block diagram of a blocking apparatus for database objects according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a database management device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. In addition, the embodiments and features of the embodiments of the present invention may be combined with each other without conflict
Example one
The embodiment of the invention provides a method for blocking a database object. The method can be executed by a blocking device of the database object, wherein the device can be realized by software and/or hardware, can be generally integrated in a database management device and is suitable for the condition of dictionary blocking of the database object before accessing the database object in the database. Fig. 1 is a schematic flowchart of a blocking method for a database object according to an embodiment of the present invention, as shown in fig. 1, the blocking method for a database object includes:
s110, obtaining a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to a current database object accessed by the current transaction.
Specifically, when it IS determined that the current transaction needs to access the current database object, a current dictionary lock information table of the current transaction may be called, and type information of a target dictionary lock that needs to be added to the current database object IS determined based on an operation type that the current transaction needs to perform an operation when accessing the current database object, for example, when a Structured Query Language (SQL) statement IS executed, different types of dictionary blocking are performed on the current database object to which the current transaction requests to access according to the type of the SQL statement and the requested operation thereof, for example, when the SQL statement IS a Data Manipulation Language (DML) and the requested operation IS a read operation, it IS determined that the dictionary lock that the current transaction needs to be added to the current database object IS an intention sharing lock (IS); when the SQL statement is DML and the requested operation is write operation (namely insertion, deletion or update operation on the current database object is requested), determining that the dictionary lock which needs to be added for the current database object by the current transaction is an intention exclusive lock (IX); when the SQL statement is a Data Definition Language (DDL), since DDL generally occurs in the process of making definition modifications to Data, determining that the dictionary lock that the current transaction needs to add for the current database object is an exclusive lock (X), and so on.
Wherein, the current transaction can be understood as a currently executed transaction, which can be a transaction requested to be executed by a user; the current dictionary lock information table may be understood as a dictionary lock information table of a current transaction, which may specifically be a dictionary lock information table of a communication connection (i.e., a communication connection requesting execution of the current transaction) to which the current transaction belongs, and if the current transaction starts execution, the dictionary lock information table of the communication connection to which the current transaction belongs may be acquired as the current dictionary lock information table, and accordingly, after the current transaction is executed, the current dictionary lock information table may not be cleared, so that other subsequently executed transactions having the same communication connection (such as an account) may be called; the dictionary lock information table may be a linked list for recording lock information of all dictionary locks created by transactions belonging to the same communication connection but not yet released; the lock information of a dictionary lock may include state information (e.g., occupied/unoccupied state information, waiting/unsetting state information, etc.) of the dictionary lock, type information of the dictionary lock, an object ID of a database object blocked by the dictionary lock, and the like; the current database object is a database object that the current transaction needs to access, which may include all database objects that the current transaction needs to access in the execution process, or may only include a database object that the current transaction needs to access at the current execution node, and the following description will take the current database object as a database object that the current transaction needs to access at the current execution node as an example; the type of target dictionary lock may be shared lock (S), X, IS, or IX.
S120, if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, and marking the target dictionary lock in the unoccupied state as the occupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate a locking conflict with an added dictionary lock of the current database object.
In this step, after it is determined that a non-conflicting dictionary lock that matches the target dictionary lock type information and is in an unoccupied state exists in the current dictionary lock information table, the non-conflicting dictionary lock may be determined as a target dictionary lock, and the target dictionary lock is marked as an occupied state from the unoccupied state, for example, the unoccupied state mark of the target dictionary lock is deleted and/or an occupied state mark is added to the target dictionary lock, so as to add the target dictionary lock to the current database object. In addition, after the target dictionary lock is added to the current database object, a blocking success notification can be further returned to the current transaction so as to notify the current transaction that the current database object is successfully blocked, and the execution can be continued.
In this embodiment, when determining whether a non-conflicting dictionary lock that conforms to the type information of the target dictionary lock and is in an unoccupied state exists in the current dictionary lock information table, first, according to a requirement of the target dictionary lock on the type and occupied/unoccupied state of the dictionary lock, it may be queried whether the current transaction has applied a dictionary lock that conforms to the type information of the target dictionary lock and is in an occupied state to the current database object, if so, a successful blocking notification is returned to the current transaction, and the dictionary blocking process is ended; if not, further inquiring whether the current transaction applies a dictionary lock to be screened, which is consistent with the type information of the target dictionary lock and is in an unoccupied state, to the current database object, if so, further determining whether the inquired dictionary lock to be screened is in a blocking conflict with an added dictionary lock of the current database object, namely determining whether the dictionary lock to be screened is in a conflict with other dictionary locks added to the current database object, and if so, determining that a conflict dictionary lock which is consistent with the type information of the target dictionary lock and is in the unoccupied state exists in an information table of the current dictionary lock; and if the dictionary lock to be screened is not in conflict with other dictionary locks added to the current database object, determining that a non-conflict dictionary lock which is consistent with the type information of the target dictionary lock and is in an unoccupied state exists in the current dictionary lock information table.
In this embodiment, the method for determining whether the dictionary lock to be screened conflicts with other dictionary locks added to the current database object may be selected as needed, for example, whether the dictionary lock to be screened has a conflicting dictionary lock flag is detected, if so, it is determined that the dictionary lock to be screened conflicts with other dictionary locks added to the current database object, and if not, it is determined that the dictionary lock to be screened is compatible with other dictionary locks added to the current database object.
Whether a dictionary lock created by the database management system conflicts with another dictionary lock can be judged based on the type information of the dictionary lock and the other dictionary lock, for example, if the dictionary lock and the other dictionary lock are both an IS type dictionary lock, both an S type dictionary lock, both an IX type dictionary lock, one IS an IS type dictionary lock and the other IS an S type dictionary lock, or one IS an IS type dictionary lock and the other IS an IX type dictionary lock, the dictionary lock IS compatible with the other dictionary lock (i.e., does not conflict); if the dictionary lock and the other dictionary locks are both X type dictionary locks, one IS an X type dictionary lock and the other IS an IX type dictionary lock, one IS an X type dictionary lock and the other IS an IS type dictionary lock, one IS an X type dictionary lock and the other IS an S type dictionary lock, or one IS an IX type dictionary lock and the other IS an S type dictionary lock, the dictionary lock conflicts with the other dictionary locks.
Accordingly, when it is determined that there is no non-conflicting dictionary lock that matches the type information of the target dictionary lock and is in an unoccupied state in the current dictionary lock information table, the present embodiment may create a dictionary lock that matches the type information of the target dictionary lock as the target dictionary lock, and add the target dictionary lock to the current database object. In addition, if a conflicting dictionary lock exists in the current dictionary lock information table, the conflicting dictionary lock being in an unoccupied state and conforming to the type information of the target dictionary lock, because the created target dictionary lock and the conflicting dictionary lock are of the same type, and the conflicting dictionary lock is unoccupied and has collided with other dictionary locks on the current database object, it is preferable that the conflicting dictionary lock is deleted before the dictionary lock conforming to the type information of the target dictionary lock is created as the target dictionary lock, so as to reduce the storage space occupied by the current dictionary lock information. At this time, the blocking method for the database object provided by this embodiment may be optimized to further include: if a conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, calling a global critical area object to release the conflict dictionary lock, and adding a target dictionary lock for the current database object according to the type information; and if the current dictionary lock information table does not have the dictionary lock which is consistent with the type information and is in an unoccupied state, adding a target dictionary lock for the current database object according to the type information.
The method for blocking the database object provided by the embodiment of the invention obtains the current dictionary lock information table of the current transaction and the type information of the target dictionary lock which is required to be added to the accessed current database object by the current transaction, determines the non-conflict dictionary lock as the target dictionary lock when the non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, and marks the target dictionary lock in the unoccupied state as the occupied state, thereby blocking the current database object by adopting the target dictionary lock. By adopting the technical scheme, the present database object is blocked by adopting the non-conflict dictionary lock which is applied to the present database object by the present transaction, is in accordance with the type of the target data to be added and is not in an occupied state, and the target dictionary lock is not re-created, so that the creation times of the dictionary lock can be reduced, the times of occupying the global critical area object due to the creation of the dictionary lock can be reduced, the probability of global concurrent conflict occurring in the dictionary blocking can be reduced, and the execution efficiency of the database system can be improved.
On the basis of the above embodiment, the blocking method for the database object may further optimize the method including: when the current transaction is detected to finish accessing the current database object, judging whether the target dictionary lock belongs to a preset type of non-conflict dictionary lock, and if so, marking the target dictionary lock in an unoccupied state; if not, calling the global critical zone object to release the target dictionary lock. Wherein, the preset type can comprise an IS type and/or an IX type; whether the target dictionary lock is a non-conflicting dictionary lock can be determined by judging whether the target dictionary lock has a conflicting dictionary lock flag, if so, determining that the target dictionary lock is a conflicting dictionary lock, and if not, determining that the target dictionary lock is a non-conflicting dictionary lock.
Marking the dictionary LOCK IN an occupied state by LOCK _ IN _ USE, marking the dictionary LOCK IN an unoccupied state by LOCK _ allowed, marking the dictionary LOCK IN a blocking conflict with other dictionary LOCKs by LOCK _ RELEASE _ ASAP, and assuming that the preset types include an IS type and an IX type, the operation process after detecting that the current transaction ends accessing the current database object may be:
a1, checking the type of the target dictionary lock, and if the target dictionary lock IS an IS or IX type dictionary lock, executing a step a 2; otherwise, step a4 is executed.
a2, mark lock as negligible, i.e., mark lock as unoccupied.
a3, checking whether there is any dictionary LOCK (indicated by LOCK _ c 1) which is generated by other transaction blocking requests, has blocking conflict with LOCK and is in an occupied state, namely checking whether LOCK is set with a LOCK _ RELEASE _ ASAP flag, if yes, executing a step a 4; if not, the lock is not blocked and conflicts with other dictionary locks, and the operation is finished.
a4, entering the global critical section of the lock-out system, namely calling the global critical section object.
a5, deleting the lock from the global dictionary lock information table (such as the global locking HASH table).
a6, delete lock from the wait queue of lock _ c 1.
a7, if the lock is the last dictionary lock waiting for lock _ c1, waking up lock _ c1 to enable the transaction corresponding to lock _ c1 to continue to execute, and executing a 8; if lock is not the last dictionary lock that lock _ c1 waited, then a8 is performed.
a8, exiting locks the global critical section of the system, i.e. releases the call to the global critical section object.
a9, deleting the lock from the current dictionary lock information table (such as dictionary lock linked list) of the current transaction and releasing the storage space occupied by the lock.
In the optimization, when the current transaction finishes accessing the current database object, if the target dictionary lock does not generate blocking conflict with other dictionary locks blocking the current database object, the global critical area object is not called to release the target dictionary lock. According to the optimization, the characteristic that DML statement blocking types do not conflict (namely, the dictionary lock added by the DML statement does not have blocking conflict) is utilized, the probability of DDL statements in practical application is extremely low, most SQL statements are the characteristic of the DML statement, the existing database dictionary blocking process is optimized in a mode of delaying release of the dictionary lock, the number of times of creation of the dictionary lock can be reduced, the number of times of occupation of global critical area objects due to release of the dictionary lock is reduced, the probability of global concurrent conflict of the dictionary blocking is further reduced, and the execution efficiency of a database system is improved.
Example two
Fig. 2 is a schematic flow chart of a blocking method for a database object according to a second embodiment of the present invention, where in this embodiment, "add a target dictionary lock to the current database object according to the type information" is optimized as follows: calling a global critical area object to create a target dictionary lock conforming to the type information, marking the target dictionary lock as an occupied state, and adding the target dictionary lock into a global dictionary lock information table; and adding the target dictionary lock into the current dictionary lock information table so as to lock the current database object by adopting the target dictionary lock.
Further, before the adding the target dictionary lock to the global dictionary lock information table, the method further includes: determining that a target conflict dictionary lock in an occupied state does not exist in the global dictionary lock information table, wherein the target conflict dictionary lock is a conflict dictionary lock of the target dictionary lock.
Further, a target conflicting dictionary lock in an occupied state exists in the global dictionary lock information table, and before the adding the target dictionary lock to the global dictionary lock information table, the method further includes: and marking the target dictionary lock as a waiting state, and adding the target conflict dictionary lock in the occupied state to a waiting queue of the target dictionary lock.
Correspondingly, as shown in fig. 2, the blocking method for database objects provided in this embodiment includes:
s210, acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction, and executing S220, S230 or S240;
s220, if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, marking the target dictionary lock in the unoccupied state as the occupied state, and blocking the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate blocking conflict with an added dictionary lock of the current database object.
S230, if a conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, calling the global critical section object to release the conflict dictionary lock, executing S250,
s240, if the dictionary lock which is consistent with the type information and is in an unoccupied state does not exist in the current dictionary lock information table, executing S250.
And S250, calling the global critical zone object to create a target dictionary lock conforming to the type information, and marking the target dictionary lock as an occupied state.
Specifically, a global critical section of the lockout system may be entered, a target dictionary lock conforming to the above type of information is created in the global critical section, and an occupation state flag is added to the target dictionary lock.
S260, calling the global critical zone object to judge whether a target conflict dictionary lock in an occupied state exists in the global dictionary lock information table, and if so, executing S270; if not, executing S280, wherein the target conflict dictionary lock is a dictionary lock which generates a blocking conflict with the target dictionary lock.
S270, calling the global critical section object to mark the target dictionary lock in a waiting state, and adding the target conflict dictionary lock in the occupied state to a waiting queue of the target dictionary lock.
In this embodiment, after entering the global critical section, it may be further determined whether there is a target conflict dictionary lock in an occupied state added to the current database object, and when there is a target conflict dictionary lock in an occupied state, the target dictionary lock is marked as a wait state, a wait queue of the target dictionary lock is created, and the target conflict dictionary locks in all occupied states are added to the wait queue of the target dictionary lock, so that the target dictionary lock waits for the execution of the transaction corresponding to the target conflict dictionary lock in the occupied state, and after the execution of the transactions corresponding to the target conflict dictionary locks in all occupied states is completed, the current transaction is started, for example, after all the target conflict dictionary locks in all occupied states are all unoccupied, the wait state mark of the target dictionary lock is deleted, and the target dictionary lock is awakened to start executing the current transaction, to avoid introducing data access upsets.
The target conflict dictionary lock may be understood as a dictionary lock which is already added to the current database object and generates a blocking conflict with a target dictionary lock to be added to the current database object by the current transaction, and may include a dictionary lock in an occupied state and a dictionary lock not in an occupied state; the global dictionary lock information table may be an information table that records lock information of all dictionary locks that have been created but not yet released in the database at the current time, and may be a hash table.
It should be noted that, even if two dictionary locks added by the same transaction on the same database object conflict with respect to the dictionary lock type, the operations corresponding to the two dictionary locks can be executed simultaneously, therefore, the target conflicting dictionary lock in this embodiment may preferably only include the dictionary locks that are added by other transactions on the current database object and that generate blocking conflicts with the target dictionary lock that the current transaction intends to add on the current database object, that is, if a dictionary lock is a dictionary lock added to the current database object by the current transaction, no matter whether the dictionary lock type of the dictionary lock conflicts with the dictionary lock type of the target dictionary lock to be added to the current database object by the current transaction, the dictionary lock may not be determined as the target conflicting dictionary lock, therefore, the number of times of calling the global critical zone object in the database object blocking process is further reduced.
In this embodiment, the method for determining whether the target conflicting dictionary lock in the occupied state exists in the global dictionary lock information table may be selected as needed, for example, type information and state information of all dictionary locks added to the current database object may be first obtained by querying from the global dictionary lock information table according to the object ID of the current database object, then the target conflicting dictionary lock that generates a blocking conflict with the target dictionary lock is obtained according to the type information of each dictionary lock, and whether the target conflicting dictionary lock in the occupied state exists is determined according to the state information of each target conflicting dictionary lock.
Further, in this embodiment, before adding the target dictionary LOCK to the global dictionary LOCK information table, a conflicting dictionary LOCK flag, for example, a "LOCK _ RELEASE _ ASAP" flag, may be added to each target conflicting dictionary LOCK in the global dictionary LOCK information table, so that when adding a dictionary LOCK in a subsequent current transaction or other transactions, it may be determined whether each dictionary LOCK is a non-conflicting dictionary LOCK according to whether each dictionary LOCK has a conflicting dictionary LOCK flag. It should be noted that, when a certain mark of a certain dictionary lock is changed in the global dictionary lock information table and a current mark of a corresponding dictionary lock is changed in the corresponding transaction dictionary lock information table, the dictionary lock information table of the corresponding transaction of the dictionary lock is correspondingly changed in the same step, and vice versa.
S280, calling the global critical zone object to add the target dictionary lock to a global dictionary lock information table.
Specifically, the lock information of the target dictionary lock may be added to the global dictionary lock information table through the global critical section object, for example, the state information and the type information of the target dictionary lock and the object ID of the database object blocked by the dictionary lock are added to the global dictionary lock information table, so that when other transactions create the dictionary lock which needs to be added to the corresponding database object, whether a dictionary lock which conflicts with the dictionary lock requested to be added exists is determined by querying the global dictionary lock information table interface.
And S290, adding the target dictionary lock into the current dictionary lock information table so as to lock the current database object by adopting the target dictionary lock.
In this step, the lock information of the target dictionary lock may be added to the current dictionary lock information table of the current transaction, so that when the dictionary lock needs to be added to the current database object again in the subsequent execution process of the current transaction, it can be determined whether the global critical section object needs to be called to create the dictionary lock of the corresponding type based on the query of the dictionary lock information table of the current transaction (i.e., the current dictionary lock information table).
Illustratively, three state flags are newly added to the dictionary lock object in the database, which are respectively defined as follows:
# define LOCK _ IN _ USE 0/# LOCK is IN USE ++
# define LOCK _ IGNORABLE 1/# LOCK can ignore
The dictionary lockout procedure of the lockout method for database objects provided in this embodiment, in which # defined LOCK _ RELEASE _ ASAP 2/# LOCK has generated a lockout conflict, should be released as soon as possible, can be described as:
b1, acquiring the dictionary lock linked list of the communication connection of the current transaction as the dictionary lock linked list of the current transaction (namely, the current dictionary lock information table), scanning the dictionary lock linked list, checking whether the database management system executes dictionary blocking which is consistent with the type information of the target dictionary lock on the current database object, if so, executing the step b 2; if not, step b6 is executed.
b2, judging whether the dictionary lock is in an occupied state, if so, returning a blocking success notice to the current transaction, and ending the dictionary blocking process; if not, step b3 is executed.
b3, determining the added dictionary LOCK IN an unoccupied state as a target dictionary LOCK, executing LOCK- > ignore & -LOCK _ ignition, canceling the IGNORABLE mark (i.e. the unoccupied state mark) of the LOCK, and re-identifying the LOCK as IN USE, namely marking the LOCK as an occupied state, i.e. adding a LOCK _ IN _ USE mark to the LOCK.
b4, checking whether LOCK has a LOCK _ RELEASE _ ASAP mark (namely, conflict dictionary LOCK mark), if the LOCK does not have the LOCK _ RELEASE _ ASAP mark, returning a blocking success notice to the current transaction, and ending the dictionary blocking process; if the LOCK _ RELEASE _ ASAP flag is present, step b5 is executed.
b5, releasing lock.
b6, entering a global critical section of the lockout system.
b7, searching a global dictionary locking HASH table (namely a global dictionary lock information table) according to the current database object ID, checking whether a dictionary lock (represented by lock _ c 2) which conflicts with the type information of the target dictionary lock exists, and if no conflicting dictionary lock exists, executing b 8; otherwise, step b11 is executed.
b8, creating LOCK, adding a LOCK _ IN _ USE mark for the LOCK to identify that the LOCK is IN USE, and adding the newly created LOCK to the global dictionary lockout HASH table.
b9, exiting the global critical section of the lockout system.
b10, adding the newly created lock into the dictionary lock linked list of the current transaction, returning a blocking success notice to the current transaction, and ending the dictionary blocking process.
b11, execute LOCK _ c2- > align | ═ LOCK _ RELEASE _ ASAP, i.e. mark LOCK _ c2 as creating a blocking conflict with other transactions, i.e. add LOCK _ RELEASE _ ASAP mark to LOCK _ c 2.
b12, checking all the negligible flags of lock _ c2, if all the lock _ c2 are marked as negligible, returning to execute the step b 8; if there is lock _ c2 that is not marked as negligible, i.e. if there is lock _ c2 marked as in use, step b13 is performed.
b13, creating LOCK, executing LOCK- > align ═ LOCK _ IN _ USE to identify LOCK as IN USE, identify LOCK as IN wait state, and add all LOCK _ c2 marked as IN USE to the LOCK's wait queue.
b14, adding lock into the global dictionary locking HASH table.
b15, exiting the global critical section of the lockout system.
b16, adding the newly created lock into the lock linked list of the current transaction, returning a lock waiting notice to the current transaction, and making the current transaction enter a blocking waiting state until the lock is awakened, and continuing to execute the current transaction when the lock is awakened.
The dictionary locking process can be applied to any scene needing dictionary locking, taking two adjacent transactions which are requested to be executed by a user A by a transaction Q and the transaction P as examples, the transaction P of the user A inserts data into a table T to generate an IX dictionary LOCK _ P of a table T dictionary object, the IX dictionary LOCK _ P is marked as LOCK _ IN _ USE, the LOCK _ P is not released after the transaction P is ended, only the LOCK _ P is marked as LOCK _ IGNORABLE, then the user A needs the IX dictionary LOCK on the table T when the subsequent transaction Q needs to modify the data of the table T, at the moment, the LOCK chain table (namely the LOCK chain table when the transaction P is ended) on the communication connection which the transaction Q belongs to is obtained as the LOCK chain table of the transaction Q, the obtained LOCK chain table is scanned, the LOCK _ P is the IX dictionary LOCK of the table T, and the LOCK _ P is marked as LOCK _ IN _ USE again, and successful locking can be returned; if the general dictionary blocking and releasing method in the prior art is used, after the transaction P is finished, all locks including the lock _ P can be released (namely, the steps a4-a9 are executed, and the lock linked list is emptied), the dictionary lock needs to be applied again when the subsequent transaction Q modifies the table T data, and the global blocking critical area object needs to be called for both releasing and applying the dictionary lock, so that the global of the dictionary blocking has higher concurrency collision probability, and the overall efficiency of the database system is reduced.
For another example, the transaction N of the user a inserts data into the table T1 first, and generates an IX type dictionary LOCK _ N _ T1 for performing dictionary locking on the table T1, and marks the IX type dictionary LOCK as LOCK _ IN _ USE; modifying the table definition (which is a DDL statement) of the table T1 by using a transaction M of a user B, wherein an X-type dictionary LOCK on a dictionary object of the table T1 is required, the transaction M enters a global lockout critical zone when creating the dictionary LOCK, finds a conflicting dictionary LOCK _ n _ T1, adds a LOCK _ RELEASE _ ASAP mark to the LOCK _ n _ T1, checks that the LOCK _ IN _ USE mark exists IN the LOCK _ n _ T1, creates a LOCK _ M _ T1, marks the LOCK _ IN _ USE mark, adds a LOCK _ n _ T1 to a waiting queue of the LOCK _ M _ T1, exits the global critical zone, and enters a lockout waiting state; user A's transaction N commits, sets LOCK _ N _ t1 to LOCK _ IGNORABLE, checks to find that LOCK _ N _ t1 is set with LOCK _ RELEASE _ ASAP, enters the global lockout critical zone, deletes LOCK _ N _ t1 from the global lockout HASH table, then deletes LOCK _ N _ t1 from the wait queue of LOCK _ m _ t1, wakes up LOCK _ m _ t1, exits the global lockout critical zone, and deletes LOCK _ N _ t1 from the LOCK linked list of transaction P; user B's transaction M continues to execute, completing the modification to the table T1 table definition.
In the method for locking a database object provided in the second embodiment of the present invention, when a non-conflicting dictionary lock exists in the current dictionary lock information table, the non-conflicting dictionary lock corresponds to the type information of the target dictionary lock that the current transaction needs to add to the current database object and is in an unoccupied state, the dictionary lock is directly used to lock the current database object without entering the global critical section; when the non-conflict dictionary lock which is consistent with the type information of the target dictionary lock and is in an unoccupied state does not exist in the current dictionary lock information table, the target dictionary lock is created in the global critical area, and the creation times of the dictionary lock can be reduced, so that the times of occupation of the global critical area object due to the creation of the dictionary lock are reduced, the probability of global concurrent conflict of dictionary lock blocking is reduced, and the execution efficiency of the database system is improved.
EXAMPLE III
The third embodiment of the invention provides a blocking device for database objects. The device can be realized by software and/or hardware, can be generally integrated in database management equipment, is suitable for the condition of dictionary blocking of the database objects before accessing the database objects in the database, and can block the database objects by executing the blocking method of the database objects. Fig. 3 is a schematic structural diagram of a lockout device for a database object according to a third embodiment of the present invention, as shown in fig. 3, the lockout device includes an information obtaining module 301 and a lock determining module 302, wherein,
an information obtaining module 301, configured to obtain a current dictionary lock information table of a current transaction and type information of a target dictionary lock that needs to be added to an accessed current database object by the current transaction;
a lock determining module 302, configured to determine, when a non-conflicting dictionary lock that conforms to the type information and is in an unoccupied state exists in the current dictionary lock information table, the non-conflicting dictionary lock as a target dictionary lock, and mark the target dictionary lock as an occupied state from the unoccupied state, so as to lock the current database object with the target dictionary lock, where the non-conflicting dictionary lock is a dictionary lock that is applied to the current database object and does not generate a locking conflict with an added dictionary lock of the current database object.
In the locking device for the database object provided by the third embodiment of the present invention, the information obtaining module obtains the current dictionary lock information table of the current transaction and the type information of the target dictionary lock that the current transaction needs to add to the current database object to be accessed, and the lock determining module determines the non-conflict dictionary lock as the target dictionary lock when the non-conflict dictionary lock that conforms to the type information and is in an unoccupied state exists in the current dictionary lock information table, and marks the target dictionary lock as the occupied state from the unoccupied state, so that the target dictionary lock is used to lock the current database object. By adopting the technical scheme, the present database object is blocked by adopting the non-conflict dictionary lock which is applied to the present database object by the present transaction, is in accordance with the type of the target data to be added and is not in an occupied state, and the target dictionary lock is not re-created, so that the creation times of the dictionary lock can be reduced, the times of occupying the global critical area object due to the creation of the dictionary lock can be reduced, the probability of global concurrent conflict occurring in the dictionary blocking can be reduced, and the execution efficiency of the database system can be improved.
Further, the blocking device of the database object may further include: a lock creation module, configured to, when a conflict dictionary lock that conforms to the type information and is in an unoccupied state exists in the current dictionary lock information table, call a global critical section object to release the conflict dictionary lock, and add a target dictionary lock to the current database object according to the type information; and when the dictionary lock which is consistent with the type information and is in an unoccupied state does not exist in the current dictionary lock information table, adding a target dictionary lock for the current database object according to the type information.
In the foregoing solution, the lock creation module may include: the lock creating unit is used for calling a global critical area object to create a target dictionary lock conforming to the type information, marking the target dictionary lock as an occupied state and adding the target dictionary lock to a global dictionary lock information table; and the lock adding unit is used for adding the target dictionary lock into the current dictionary lock information table so as to lock the current database object by adopting the target dictionary lock.
In the foregoing solution, the lock creation module may further include: and a conflict determination unit, configured to determine that no target conflicting dictionary lock in an occupied state exists in the global dictionary lock information table before the target dictionary lock is added to the global dictionary lock information table, where the target conflicting dictionary lock is a conflicting dictionary lock of the target dictionary lock.
In the foregoing solution, the global dictionary lock information table may include a target conflicting dictionary lock in an occupied state, and the lock creation module may further include: and the lock waiting unit is used for marking the target dictionary lock as a waiting state before adding the target dictionary lock into the global dictionary lock information table, and adding the target conflict dictionary lock in the occupied state into a waiting queue of the target dictionary lock.
In the foregoing solution, the lock creation module may further include: and the conflict marking unit is used for adding a conflict dictionary lock mark to the target conflict dictionary lock in the global dictionary lock information table before the target dictionary lock is added to the global dictionary lock information table.
Further, the blocking device of the database object may further include: the lock release module is used for judging whether the target dictionary lock belongs to a preset type of non-conflict dictionary lock or not when the current transaction is detected to finish accessing the current database object, and if so, marking the target dictionary lock as an unoccupied state; if not, calling the global critical zone object to release the target dictionary lock.
The blocking device for the database object provided by the third embodiment of the invention can execute the blocking method for the database object provided by any embodiment of the invention, and has the corresponding functional module and the beneficial effect of executing the blocking method for the database object. For technical details that are not described in detail in this embodiment, reference may be made to a blocking method for database objects provided in any embodiment of the present invention.
Example four
Fig. 4 is a schematic structural diagram of a database management apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the database management apparatus includes a processor 40 and a memory 41; the number of processors 40 in the database management device may be one or more, and one processor 40 is taken as an example in fig. 4; the processor 40 and the memory 41 in the database management apparatus may be connected by a bus or other means, and fig. 4 illustrates the connection by a bus as an example.
The memory 41 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the database object blocking method in the embodiment of the present invention (for example, the information acquisition module 301 and the lock determination module 302 in the database object blocking apparatus). The processor 40 executes various functional applications of the database management device and data processing, i.e., implements the blocking method of the database object described above, by executing software programs, instructions, and modules stored in the memory 41.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to a database management device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
A fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for blocking a database object, the method including:
acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction;
and if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, and marking the target dictionary lock in the unoccupied state as the occupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate locking conflict with the added dictionary lock of the current database object.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the database object blocking method provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the blocking apparatus for database objects, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for blocking database objects, comprising:
acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction;
and if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, and marking the target dictionary lock in the unoccupied state as the occupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate locking conflict with the added dictionary lock of the current database object.
2. The method of claim 1, further comprising:
if a conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, calling a global critical area object to release the conflict dictionary lock, and adding a target dictionary lock for the current database object according to the type information;
and if the current dictionary lock information table does not have the dictionary lock which is consistent with the type information and is in an unoccupied state, adding a target dictionary lock for the current database object according to the type information.
3. The method of claim 2, wherein adding a target dictionary lock to the current database object according to the type information comprises:
calling a global critical area object to create a target dictionary lock conforming to the type information, marking the target dictionary lock as an occupied state, and adding the target dictionary lock into a global dictionary lock information table;
and adding the target dictionary lock into the current dictionary lock information table so as to lock the current database object by adopting the target dictionary lock.
4. The method of claim 3, prior to said adding said target dictionary lock to a global dictionary lock information table, further comprising:
determining that a target conflict dictionary lock in an occupied state does not exist in the global dictionary lock information table, wherein the target conflict dictionary lock is a conflict dictionary lock of the target dictionary lock.
5. The method of claim 3, wherein the target conflicting dictionary lock exists in an occupied state in the global dictionary lock information table, and prior to said adding the target dictionary lock to the global dictionary lock information table, further comprising:
and marking the target dictionary lock as a waiting state, and adding the target conflict dictionary lock in the occupied state to a waiting queue of the target dictionary lock.
6. The method of claim 3 or 4, further comprising, prior to said adding said target dictionary lock to a global dictionary lock information table:
and adding a conflict dictionary lock mark for the target conflict dictionary lock in the global dictionary lock information table.
7. The method of any of claims 1-5, further comprising:
when the current transaction is detected to finish accessing the current database object, judging whether the target dictionary lock belongs to a preset type of non-conflict dictionary lock, and if so, marking the target dictionary lock in an unoccupied state; if not, calling the global critical zone object to release the target dictionary lock.
8. A containment system for database objects, comprising:
the information acquisition module is used for acquiring a current dictionary lock information table of a current transaction and type information of a target dictionary lock which needs to be added to an accessed current database object by the current transaction;
and the lock determination module is used for determining the non-conflict dictionary lock as a target dictionary lock when the non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, and marking the target dictionary lock as the occupied state from the unoccupied state so as to lock the current database object by adopting the target dictionary lock, wherein the non-conflict dictionary lock is a dictionary lock which is applied to the current database object and does not generate locking conflict with the added dictionary lock of the current database object.
9. A database management apparatus, comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a containment method for a database object in accordance with any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of blocking a database object according to any one of claims 1 to 7.
CN201911225671.7A 2019-12-04 2019-12-04 Method, device, equipment and storage medium for blocking database object Active CN110909012B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911225671.7A CN110909012B (en) 2019-12-04 2019-12-04 Method, device, equipment and storage medium for blocking database object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911225671.7A CN110909012B (en) 2019-12-04 2019-12-04 Method, device, equipment and storage medium for blocking database object

Publications (2)

Publication Number Publication Date
CN110909012A true CN110909012A (en) 2020-03-24
CN110909012B CN110909012B (en) 2020-09-04

Family

ID=69822226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911225671.7A Active CN110909012B (en) 2019-12-04 2019-12-04 Method, device, equipment and storage medium for blocking database object

Country Status (1)

Country Link
CN (1) CN110909012B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242372A1 (en) * 2021-05-19 2022-11-24 腾讯科技(深圳)有限公司 Object processing method and apparatus, computer device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909434A (en) * 2005-08-03 2007-02-07 威盛电子股份有限公司 Data bus mechanism for dynamic source synchronized sampling adjust
CN101576830A (en) * 2009-06-04 2009-11-11 中兴通讯股份有限公司 Deadlock detection method and device of database transaction lock mechanism
CN101615203A (en) * 2009-07-23 2009-12-30 中兴通讯股份有限公司 Concurrency control method and device
CN102831156A (en) * 2012-06-29 2012-12-19 浙江大学 Distributed transaction processing method on cloud computing platform
CN103886109A (en) * 2014-04-18 2014-06-25 北京搜狐新媒体信息技术有限公司 Method and device for realizing row lock of database
CN104252545A (en) * 2014-10-11 2014-12-31 南京国电南自美卓控制系统有限公司 Method for realizing object type attribute type lock of real-time memory database
CN104679881A (en) * 2015-03-13 2015-06-03 华为技术有限公司 Concurrency control method and concurrency control device
CN108762940A (en) * 2018-04-12 2018-11-06 武汉斗鱼网络科技有限公司 Multi-threaded Access Methods and device
CN109783747A (en) * 2018-12-25 2019-05-21 北京字节跳动网络技术有限公司 A kind of method for page jump, terminal device and computer storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909434A (en) * 2005-08-03 2007-02-07 威盛电子股份有限公司 Data bus mechanism for dynamic source synchronized sampling adjust
CN101576830A (en) * 2009-06-04 2009-11-11 中兴通讯股份有限公司 Deadlock detection method and device of database transaction lock mechanism
CN101615203A (en) * 2009-07-23 2009-12-30 中兴通讯股份有限公司 Concurrency control method and device
CN102831156A (en) * 2012-06-29 2012-12-19 浙江大学 Distributed transaction processing method on cloud computing platform
CN103886109A (en) * 2014-04-18 2014-06-25 北京搜狐新媒体信息技术有限公司 Method and device for realizing row lock of database
CN104252545A (en) * 2014-10-11 2014-12-31 南京国电南自美卓控制系统有限公司 Method for realizing object type attribute type lock of real-time memory database
CN104679881A (en) * 2015-03-13 2015-06-03 华为技术有限公司 Concurrency control method and concurrency control device
CN108762940A (en) * 2018-04-12 2018-11-06 武汉斗鱼网络科技有限公司 Multi-threaded Access Methods and device
CN109783747A (en) * 2018-12-25 2019-05-21 北京字节跳动网络技术有限公司 A kind of method for page jump, terminal device and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022242372A1 (en) * 2021-05-19 2022-11-24 腾讯科技(深圳)有限公司 Object processing method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN110909012B (en) 2020-09-04

Similar Documents

Publication Publication Date Title
US6772155B1 (en) Looking data in a database system
US7080074B2 (en) Method and system for reduced lock contention in SQL transactions
CN108363806B (en) Multi-version concurrency control method and device for database, server and storage medium
EP3117348B1 (en) Systems and methods to optimize multi-version support in indexes
AU2016244128B2 (en) Processing database transactions in a distributed computing system
CN108572876B (en) Method and device for realizing read-write lock
CN108376156B (en) Method, device, server and storage medium for creating database index
WO2011009274A1 (en) Method and apparatus of concurrency control
CN109144978B (en) Authority management method and device
US7818749B2 (en) Data processing method, data processing apparatus, and data processing program
US20080270407A1 (en) System for ensuring referential integrity in highly concurrent database environments
CN109299101B (en) Data retrieval method, device, server and storage medium
US7752399B2 (en) Exclusion control method and information processing apparatus
CN110909012B (en) Method, device, equipment and storage medium for blocking database object
CN112988777B (en) Object processing method and device, computer equipment and storage medium
EP3824397B1 (en) Version-based table locking
CN113342507A (en) Distributed lock service implementation method and device and computer equipment
CN106776702B (en) Method and device for processing indexes in master-slave database system
CN116303661B (en) Processing method, device and system for sequences in distributed database
CN114282074B (en) Database operation method, device, equipment and storage medium
CN109376097A (en) Method for solving hash search learning and address aging conflict of multiple microengines
US11829342B2 (en) Managing lock information associated with a lock operation
CN117348977A (en) Method, device, equipment and medium for controlling transaction concurrency in database
CN109325031B (en) Data statistical method, device, equipment and storage medium
CN116501812A (en) DDL statement execution 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
GR01 Patent grant
GR01 Patent grant