CN102945278A - Method and device for redoing logs of database records - Google Patents

Method and device for redoing logs of database records Download PDF

Info

Publication number
CN102945278A
CN102945278A CN201210447189XA CN201210447189A CN102945278A CN 102945278 A CN102945278 A CN 102945278A CN 201210447189X A CN201210447189X A CN 201210447189XA CN 201210447189 A CN201210447189 A CN 201210447189A CN 102945278 A CN102945278 A CN 102945278A
Authority
CN
China
Prior art keywords
transaction
cache
log information
redo
log
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
CN201210447189XA
Other languages
Chinese (zh)
Other versions
CN102945278B (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.)
Shenzhen Huawei Cloud Computing Technology Co ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210447189.XA priority Critical patent/CN102945278B/en
Publication of CN102945278A publication Critical patent/CN102945278A/en
Application granted granted Critical
Publication of CN102945278B publication Critical patent/CN102945278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a method and device for redoing logs of database records, and belongs to the technical field of computers. The method comprises the following steps of receiving a log record request, wherein the log record request carries a transaction identifier and log information; judging the log record request to determine whether the log record request is the first log record request corresponding to the transaction identifier; if the log record request is the first log record request, selecting part of buffer space from a redone buffer, establishing an transaction buffer block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction buffer block; if the log record request is not the first log record request, determining the transaction buffer block currently used in the established transaction buffer block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction buffer block; and during occurrence of the preset trigger transaction, sustaining the log information in the redone buffer. The method and the device have the advantage that the processing speed of a database system can be increased.

Description

Method and device for redoing log in database record
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for redoing logs by database records.
Background
Data persistence is a very extensive and commonly used technique in the software field, especially in the database field. The operations on the database are performed in the form of transactions, which refer to a series of operations performed as a single logical unit of work. Transaction processing can ensure that data in a database is not permanently updated unless all operations within the logical unit of work that processed the transaction are successfully completed. By combining a set of related operations into one transaction that is either all successful or all failed, the error recovery process can be simplified and the reliability of the application can be improved.
In order to ensure the recoverability of the database, all modifications to the database record redo logs in the redo cache, and the redo logs are persisted to log files of the disk. When data recovery is carried out, the operation recorded by the redo log only needs to be executed reversely.
In the prior art, in the process of recording redo logs in a redo cache, a mutual exclusion lock is adopted, only one operation record is allowed to be redo logs each time, and after the recording of one log is finished, the log is recorded for the next operation.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the process of database application, the situation of parallel execution of multiple transactions often occurs, at this time, multiple threads (or processes) may request to record logs at the same time, or other log recording requests may also be received in the process of recording one log in a redo cache.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for redoing a log in a database record, so as to improve the processing speed of a database system. The technical scheme is as follows:
in one aspect, a method for redoing a log of a database record is provided, the method comprising:
receiving a log recording request, wherein the log recording request carries a transaction identifier and log information;
judging whether the log recording request is a first log recording request corresponding to the transaction identifier; if yes, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; otherwise, determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; the global sequence information records the time sequence of the log information in all log information;
and when a preset trigger event occurs, the log information in the redo cache is persisted.
Preferably, the method further comprises the following steps: dividing the redo cache into a plurality of cache blocks in advance;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache block which is divided in advance from the redo cache, and establishing a transaction cache block corresponding to the transaction identifier.
Preferably, the log record request further carries capacity information of the transaction cache block;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache space with corresponding capacity in the redo cache according to the capacity information, and establishing a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the currently used transaction cache block in the established transaction cache block corresponding to the transaction identifier, the method further includes:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persisting the log information in the redo cache specifically includes:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the method further comprises the following steps:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
In another aspect, a method of redoing a log of a database record is provided, the method comprising:
when a transaction starting notice carrying a transaction identifier is received, selecting a part of cache space in a redo cache, and establishing a transaction cache block corresponding to the transaction identifier; the global sequence information records the time sequence of the log information in all log information;
when a log recording request carrying a transaction identifier and log information is received, determining a currently used transaction cache block in established transaction cache blocks corresponding to the transaction identifier, and recording the log information and corresponding global sequence information into the transaction cache block;
and when a preset trigger event occurs, the log information in the redo cache is persisted.
Preferably, the method further comprises the following steps: dividing the redo cache into a plurality of cache blocks in advance;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache block which is divided in advance from the redo cache, and establishing a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the currently used transaction cache block in the established transaction cache block corresponding to the transaction identifier, the method further includes:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persisting the log information in the redo cache specifically includes:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the method further comprises the following steps:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
In another aspect, an apparatus for redoing a log of a database record is provided, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a log recording request which carries a transaction identifier and log information;
the judging module is used for judging whether the log recording request is a first log recording request corresponding to the transaction identifier; if yes, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; otherwise, determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; the global sequence information records the time sequence of the log information in all log information;
and the persistence module is used for persisting the log information in the redo cache when a preset trigger event occurs.
Preferably, the apparatus further includes a dividing module, configured to divide the redo cache into a plurality of cache blocks in advance;
the determining module is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, the log record request further carries capacity information of the transaction cache block;
the judging module is specifically configured to select a cache space with a corresponding capacity from the redo cache according to the capacity information, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, the determining module is further configured to:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persistence module is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the persistence module is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
In another aspect, an apparatus for redoing a log of a database record is provided, the apparatus comprising:
the establishment module is used for selecting part of cache space in the redo cache and establishing a transaction cache block corresponding to the transaction identifier when receiving a transaction starting notice carrying the transaction identifier; the global sequence information records the time sequence of the log information in all log information;
a recording module, configured to determine, when a log recording request carrying a transaction identifier and log information is received, a currently used transaction cache block in an established transaction cache block corresponding to the transaction identifier, and record the log information and corresponding global sequence information into the transaction cache block;
and the persistence module is used for persisting the log information in the redo cache when a preset trigger event occurs.
Preferably, the apparatus further includes a dividing module, configured to divide the redo cache into a plurality of cache blocks in advance;
the establishing module is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, the recording module is further configured to:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persistence module is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the persistence module is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, the corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for redoing a log of a database record according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for redoing a log of a database record according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for redoing a log of a database record according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for redoing a log in a database record, and with reference to fig. 1, a processing flow of the method may include:
step 101, receiving a log recording request, wherein the log recording request carries a transaction identifier and log information.
Step 102, judging whether the log recording request is the first log recording request corresponding to the transaction identifier, if so, executing step 103, otherwise, executing step 104.
Step 103, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block. The global sequence information records the time sequence of the log information in all log information.
Step 104, determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block.
And 105, when a preset trigger event occurs, persisting the log information in the redo cache.
In the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, a corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art.
Example two
An embodiment of the present invention provides a method for redoing a log recorded in a database, where a Processing flow may be as shown in fig. 1, an execution subject of the method may be a Central Processing Unit (CPU), and the following describes the flow in fig. 1 in detail, specifically, the following contents are as follows:
step 101, receiving a log recording request, wherein the log recording request carries a transaction identifier and log information.
The transaction can comprise one or more operations, when the transaction operates on the database, a corresponding log needs to be recorded, and a log recording request can be sent to the CPU. The transaction identifier is used to identify the transaction corresponding to the log, and the log information is the content of the operation corresponding to the log, for example, the value1 (value 1) corresponding to the key1 (primary key 1) is modified to value 1'.
Step 102, determining whether the log recording request is the first log recording request corresponding to the transaction identifier (i.e. the first log recording request of the transaction), if so, executing step 103, otherwise, executing step 104.
Specifically, it may be determined whether a log recording request carrying the transaction identifier is received before, and if so, it indicates that the log recording request is not the first log recording request corresponding to the transaction identifier, otherwise, it indicates that the log recording request is the first log recording request corresponding to the transaction identifier.
Specifically, whether an established transaction cache block corresponding to the transaction identifier exists in the redo cache may be queried, and if yes, it indicates that the log recording request is not the first log recording request corresponding to the transaction identifier, otherwise, it indicates that the log recording request is the first log recording request corresponding to the transaction identifier.
Specifically, an identification bit may be further set in the logging request, so as to identify that the logging request is the second logging request of the transaction, or to identify whether the logging request is the first logging request of the transaction.
Step 103, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block. After the transactional cache block is created, the newly created transactional cache block may be set as the currently used transactional cache block. Specifically, a corresponding state flag may be set for each transaction cache block to identify whether the transaction cache block is currently used or not currently used.
Specifically, the method for selecting a part of cache space in the redo cache and establishing the transaction cache block corresponding to the transaction identifier may be as follows:
one method is to divide the redo cache into a plurality of cache blocks in advance, select one of the cache blocks divided in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, the spatial sizes of the plurality of cache blocks divided in advance may be the same. Two lists may be maintained, one list may be a used list in which the identity of used cache blocks may be recorded, and the other list may be an unused list in which the identity of unused cache blocks may be recorded. When selecting the cache block, one cache block can be selected randomly or sequentially from the unused list, the identifier of the selected cache block is deleted from the unused list and is added to the used list, and the transaction identifier corresponding to the cache block can be recorded in the used list. In addition, a transaction identification bit may also be set for each cache block, and a corresponding transaction identification is recorded.
The other method is that the log record request carries the capacity information of the transaction cache block, and according to the capacity information, a cache space with corresponding capacity is selected from the redo cache, and the transaction cache block corresponding to the transaction identifier is established.
Specifically, different transactions may request cache spaces of different capacities according to different requirements, and establish corresponding transaction cache blocks for recording log information corresponding to each operation of the transaction cache blocks. A transaction identification bit may be set for each cache block, and a corresponding transaction identification may be recorded.
In this step, the global sequence information is used to record the time sequence of the log information in all log information. When the database system stores the log information, it may maintain a piece of global sequence information (e.g., a global sequence number) for all log information, and record the recording timing sequence of each log, where the global sequence number may reflect the execution sequence of the operation corresponding to the log. When data recovery is performed, the system may perform operations recorded in the log in a reverse direction according to the global sequence number and the content of the corresponding operation recorded in the log.
Step 104, determining the currently used transaction cache block in the established transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block.
In some cases, the redo cache may be pre-divided into a plurality of cache blocks with a large enough space, which is enough for each transaction to record all log information of the transaction, or the space size corresponding to the capacity information carried in the log recording request is enough for storing all log information of the corresponding transaction. Thus, only one transaction cache block needs to be established for each transaction to record corresponding log information. Then, for a non-first logging request of a certain transaction, it and the corresponding global sequence information can be directly recorded into the transaction cache block established for the transaction.
In some other cases, in order to improve the space utilization of the redo cache, the redo cache may be pre-divided into a plurality of cache blocks with smaller space, one transaction may correspond to a plurality of transaction cache blocks, and a plurality of log information of one transaction may be recorded in different transaction cache blocks. Thus, for a non-first log recording request of a certain transaction, after a currently used transaction cache block in an established transaction cache block corresponding to a transaction identifier is determined, if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in a redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and corresponding global sequence information into the transaction cache block; if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block. After the transaction cache block is created, the newly created transaction cache block may be set as a new currently used transaction cache block to replace the original transaction cache block that has been recorded to be full.
The space required for recording the log information is the space of the redo cache actually occupied when the log information is recorded into the redo cache, and may include the space occupied by the log information itself, the space occupied by the corresponding global sequence information, the space occupied by some corresponding identification bits, and the like.
In this way, the system may set a first threshold for storing log information for each cache block, which may preferably be a proportional threshold, such as 90% of the cache block space, corresponding to a transaction, and if the sum of the used space of the currently used transaction cache block and the space required for recording the log information exceeds 90% of the transaction cache block space, create a new transaction cache block and record the log information in the new transaction cache block, and if the sum of the used space of the currently used transaction cache block and the space required for recording the log information does not exceed 90% of the transaction cache block space, record the log information in the transaction cache block. Preferably, the first threshold may be set to 100% of the cache block space. Thus, for a transaction, the process of recording log information may be to establish a first transaction cache block and record log information therein, when the first transaction cache block is full (exceeds a first threshold), establish a second transaction cache block and record log information therein, and so on until the last log of the transaction is recorded.
And 105, when a preset trigger event occurs, persisting the log information in the redo cache.
The preset trigger event may be that the last log of the transaction is recorded in the redo cache, that is, when each transaction finishes recording the last log in the redo cache, the process of persisting the log information in the redo cache is triggered. An identification bit may be set in the logging request to identify that the logging request is the last logging request of the transaction. Or, after the transaction sends the last log recording request, a notification of completion of the transaction processing may be separately sent, and after the system receives the notification, it may be determined that the last log of the transaction is already recorded in the redo cache.
The preset trigger event may also be that a preset time period is reached, that is, the log information in the redo cache is periodically persisted.
The preset trigger event may also be that the used space of the redo cache exceeds a preset second threshold, that is, a persistence process is performed when the space of the redo cache is used to a certain extent, so that data overflow of the redo cache can be prevented.
When the log information in the redo cache is persisted, all the log information in the redo cache may be written into the disk, or part of the log information may be written into the disk, for example, all the log information corresponding to the transaction in which the last log has been recorded may be written into the disk. The log information written into the disk may be written into the disk in time sequence or out of sequence according to the corresponding global sequence information, and the global sequence information of each log information is also recorded in the disk, and may be performed according to the global sequence information when performing data recovery. After the work of writing the log information into the disk is completed, the log information written into the disk in the redo cache can be deleted, all the log information written into the disk can be deleted, or only a part of the log information can be deleted, for example, all the log information corresponding to the transaction in which the last log is recorded can be deleted, and in the case of partial deletion, the log information written into the disk but not deleted in the redo cache can be labeled to note that the log information has been written into the disk.
Preferably, the method for persisting the log information in the redo cache may be as follows: firstly, obtaining log information which is not subjected to persistence in a redo cache; then, according to global sequence information corresponding to the acquired log information, recording the acquired log information on a magnetic disk in a time sequence; and finally, releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
In the preferable persistence method, all log information which is not subjected to persistence in the redo cache is written into the disk, and the log information is written according to the time sequence, so that the log information written into the disk is ensured to be arranged according to the time sequence, and the data recovery speed can be improved to a certain extent when data recovery is carried out. When the log information written into the disk is deleted, the log information in each transaction cache block corresponding to the transaction in which the last log is recorded is deleted, and the log information corresponding to the transaction in which the last log is not recorded can be temporarily not deleted. In this case, the persistent identifier may be added to the log information that has been written to the disk but not deleted in the redo cache, and the log information that has been added with the persistent identifier may not be written to the disk in the persistence process triggered next time.
In the persistence process triggered by a trigger event, when the log information is written into the disk, a write operation needs to be initiated, and the write operation needs a certain execution time, so that in the execution process of the write operation, one or more subsequent persistence processes may have been triggered, and a corresponding write request is sent, at this time, in order to increase the processing speed, the following processing method may be adopted: when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
The system can maintain a waiting queue, when a new write request is received in the process of one-time write operation of the disk, the log information corresponding to the write request is put into the waiting queue, a plurality of subsequent write requests can be received in the process of one-time write operation, and when the execution of the write operation is finished, one-time write operation can be initiated on all the log information in the waiting queue. The processing method does not need to respectively initiate one writing operation for each writing request in waiting, but initiates one total writing operation, thereby improving the persistence speed to a certain extent.
In the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, a corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art. Moreover, through the recording of the global sequence information, the time sequence of the log information can be ensured, namely the recoverability of the database is ensured.
EXAMPLE III
The embodiment of the invention provides a method for recording redo logs by a database, wherein an execution main body of the method can be a CPU, and the specific content of the method can be as follows:
when a transaction starting notice carrying a transaction identifier is received, selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier. And the global sequence information records the time sequence of the log information in all log information. After the transactional cache block is created, the newly created transactional cache block may be set as the currently used transactional cache block. Specifically, the specific content of step 103 in the second embodiment may be referred to in the process of creating the transaction cache block, and will not be described herein in detail.
When a log recording request carrying a transaction identifier and log information is received, determining a currently used transaction cache block in an established transaction cache block corresponding to the transaction identifier, and recording the log information and corresponding global sequence information into the transaction cache block. Specifically, the process of logging information can refer to the specific content of step 104 in embodiment two, and will not be described herein in a repeated manner.
And when a preset trigger event occurs, the log information in the redo cache is persisted. Specifically, the process of persisting the log information may refer to the specific content of step 105 in embodiment two, and will not be described herein in detail.
In the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, a corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art. Moreover, through the recording of the global sequence information, the time sequence of the log information can be ensured, namely the recoverability of the database is ensured.
Example four
Based on the same technical concept, an embodiment of the present invention provides an apparatus for redoing a log in a database, and referring to fig. 2, the apparatus includes:
a receiving module 210, configured to receive a log recording request, where the log recording request carries a transaction identifier and log information;
a determining module 220, configured to determine whether the log recording request is a first log recording request corresponding to the transaction identifier; if yes, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; otherwise, determining the established transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; the global sequence information records the time sequence of the log information in all log information;
the persistence module 230 is configured to, when a preset trigger event occurs, persist the log information in the redo cache.
Preferably, the apparatus further includes a dividing module, configured to divide the redo cache into a plurality of cache blocks in advance;
the determining module 220 is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, the log record request further carries capacity information of the transaction cache block;
the determining module 220 is specifically configured to select a cache space with a corresponding capacity from the redo cache according to the capacity information, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the established transaction cache block corresponding to the transaction identifier, the determining module 220 is further configured to:
if the used space of each established transaction cache block corresponding to the transaction identifier exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the transaction cache block with the used space not exceeding a preset first threshold exists in the established transaction cache blocks corresponding to the transaction identifier, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persistence module 230 is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the persistence module 230 is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
In the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, a corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art. Moreover, through the recording of the global sequence information, the time sequence of the log information can be ensured, namely the recoverability of the database is ensured.
EXAMPLE five
Based on the same technical concept, an embodiment of the present invention provides an apparatus for redoing a log in a database, and referring to fig. 3, the apparatus includes:
an establishing module 310, configured to select a part of cache space in a redo cache when receiving a transaction start notification carrying a transaction identifier, and establish a transaction cache block corresponding to the transaction identifier; the global sequence information records the time sequence of the log information in all log information;
a recording module 320, configured to determine, when a log recording request carrying a transaction identifier and log information is received, a currently used transaction cache block in an established transaction cache block corresponding to the transaction identifier, and record the log information and corresponding global sequence information into the transaction cache block;
the persistence module 330 is configured to persist the log information in the redo cache when a preset trigger event occurs.
Preferably, the apparatus further includes a dividing module, configured to divide the redo cache into a plurality of cache blocks in advance;
the establishing module 310 is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
Preferably, after determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, the recording module 320 is further configured to:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
Preferably, the preset trigger event specifically includes:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
Preferably, the persistence module 330 is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
Preferably, the persistence module 330 is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
In the embodiment of the invention, for each transaction, an independent space is allocated in the redo cache, a corresponding transaction cache block is established, the log information of the transaction is stored, and a plurality of transactions can be allowed to record logs in the redo cache at the same time, so that the processing speed of a database system can be improved compared with the prior art. Moreover, through the recording of the global sequence information, the time sequence of the log information can be ensured, namely the recoverability of the database is ensured.
It should be noted that: in the above embodiment, when the apparatus for recording redo logs in the database records redo logs, only the division of the functional modules is used for illustration, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for recording redo logs in a database and the method for recording redo logs in a database provided by the above embodiments belong to the same technical concept, and the specific implementation process is detailed in the method embodiments and will not be described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (26)

1. A method of redoing a log of a database record, the method comprising:
receiving a log recording request, wherein the log recording request carries a transaction identifier and log information;
judging whether the log recording request is a first log recording request corresponding to the transaction identifier; if yes, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; otherwise, determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; the global sequence information records the time sequence of the log information in all log information;
and when a preset trigger event occurs, the log information in the redo cache is persisted.
2. The method of claim 1, further comprising: dividing the redo cache into a plurality of cache blocks in advance;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache block which is divided in advance from the redo cache, and establishing a transaction cache block corresponding to the transaction identifier.
3. The method of claim 1, wherein the log record request further carries capacity information of a transaction cache block;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache space with corresponding capacity in the redo cache according to the capacity information, and establishing a transaction cache block corresponding to the transaction identifier.
4. The method of claim 1, wherein after determining a currently used transaction cache block of the established transaction cache blocks corresponding to the transaction identifier, further comprising:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
5. The method according to claim 1, wherein the preset trigger event is specifically:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
6. The method according to claim 1, wherein the persisting the log information in the redo cache specifically comprises:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
7. The method of claim 6, further comprising:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
8. A method of redoing a log of a database record, the method comprising:
when a transaction starting notice carrying a transaction identifier is received, selecting a part of cache space in a redo cache, and establishing a transaction cache block corresponding to the transaction identifier; the global sequence information records the time sequence of the log information in all log information;
when a log recording request carrying a transaction identifier and log information is received, determining a currently used transaction cache block in established transaction cache blocks corresponding to the transaction identifier, and recording the log information and corresponding global sequence information into the transaction cache block;
and when a preset trigger event occurs, the log information in the redo cache is persisted.
9. The method of claim 8, further comprising: dividing the redo cache into a plurality of cache blocks in advance;
selecting a part of cache space in the redo cache, and establishing a transaction cache block corresponding to the transaction identifier, specifically: and selecting a cache block which is divided in advance from the redo cache, and establishing a transaction cache block corresponding to the transaction identifier.
10. The method of claim 8, wherein after determining a currently used transaction cache block of the established transaction cache blocks corresponding to the transaction identifier, further comprising:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
11. The method according to claim 8, wherein the preset trigger event is specifically:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
12. The method according to claim 8, wherein the persisting the log information in the redo cache specifically comprises:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
13. The method of claim 12, further comprising:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
14. An apparatus for database logging redo, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a log recording request which carries a transaction identifier and log information;
the judging module is used for judging whether the log recording request is a first log recording request corresponding to the transaction identifier; if yes, selecting a part of cache space in the redo cache, establishing a transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; otherwise, determining the currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block; the global sequence information records the time sequence of the log information in all log information;
and the persistence module is used for persisting the log information in the redo cache when a preset trigger event occurs.
15. The apparatus of claim 14, further comprising a partitioning module configured to partition the redo cache into a plurality of cache blocks in advance;
the determining module is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
16. The apparatus of claim 14, wherein the log record request further carries capacity information of a transaction cache block;
the judging module is specifically configured to select a cache space with a corresponding capacity from the redo cache according to the capacity information, and establish a transaction cache block corresponding to the transaction identifier.
17. The apparatus of claim 14, wherein the determining module, after determining a currently used transaction cache block in the established transaction cache blocks corresponding to the transaction identifier, is further configured to:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
18. The device according to claim 14, wherein the predetermined trigger event is specifically:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
19. The apparatus of claim 14, wherein the persistence module is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
20. The apparatus of claim 19, wherein the persistence module is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
21. An apparatus for database logging redo, the apparatus comprising:
the establishment module is used for selecting part of cache space in the redo cache and establishing a transaction cache block corresponding to the transaction identifier when receiving a transaction starting notice carrying the transaction identifier; the global sequence information records the time sequence of the log information in all log information;
a recording module, configured to determine, when a log recording request carrying a transaction identifier and log information is received, a currently used transaction cache block in an established transaction cache block corresponding to the transaction identifier, and record the log information and corresponding global sequence information into the transaction cache block;
and the persistence module is used for persisting the log information in the redo cache when a preset trigger event occurs.
22. The apparatus of claim 21, further comprising a partitioning module configured to partition the redo cache into a plurality of cache blocks in advance;
the establishing module is specifically configured to select a cache block partitioned in advance from the redo cache, and establish a transaction cache block corresponding to the transaction identifier.
23. The apparatus of claim 21, wherein the logging module, after determining a currently used transaction cache block of the established transaction cache blocks corresponding to the transaction identifier, is further configured to:
if the used space of the currently used transaction cache block plus the space required for recording the log information exceeds a preset first threshold value, selecting a part of cache space in the redo cache, establishing a new transaction cache block corresponding to the transaction identifier, and recording the log information and the corresponding global sequence information into the transaction cache block;
and if the used space of the currently used transaction cache block plus the space required for recording the log information does not exceed a preset first threshold value, recording the log information and the corresponding global sequence information into the transaction cache block.
24. The apparatus according to claim 21, wherein the preset trigger event is specifically:
the last log of the transaction is recorded in the redo cache; or,
reaching a preset time period; or,
the used space of the redo cache exceeds a preset second threshold.
25. The apparatus of claim 21, wherein the persistence module is specifically configured to:
obtaining log information which is not subjected to persistence in the redo cache;
recording the acquired log information on a magnetic disk according to time sequence according to global sequence information corresponding to the acquired log information;
and releasing the transaction cache block corresponding to the transaction which has recorded the last log in the redo cache.
26. The apparatus of claim 25, wherein the persistence module is further configured to:
when the persistence process triggered by one trigger event is completed, if the subsequent triggered persistence process is waiting, recording all the log information waiting to the disk according to the global sequence information corresponding to all the log information waiting to the disk according to the time sequence.
CN201210447189.XA 2012-11-09 2012-11-09 A kind of method and apparatus of data-base recording redo log Active CN102945278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210447189.XA CN102945278B (en) 2012-11-09 2012-11-09 A kind of method and apparatus of data-base recording redo log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210447189.XA CN102945278B (en) 2012-11-09 2012-11-09 A kind of method and apparatus of data-base recording redo log

Publications (2)

Publication Number Publication Date
CN102945278A true CN102945278A (en) 2013-02-27
CN102945278B CN102945278B (en) 2015-12-09

Family

ID=47728222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210447189.XA Active CN102945278B (en) 2012-11-09 2012-11-09 A kind of method and apparatus of data-base recording redo log

Country Status (1)

Country Link
CN (1) CN102945278B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198159A (en) * 2013-04-27 2013-07-10 国家计算机网络与信息安全管理中心 Transaction-redo-based multi-copy consistency maintaining method for heterogeneous clusters
CN103412803A (en) * 2013-08-15 2013-11-27 华为技术有限公司 Data recovering method and device
CN103856353A (en) * 2014-03-06 2014-06-11 上海爱数软件有限公司 Service log data access and statistic analysis method and device
WO2014153940A1 (en) * 2013-03-26 2014-10-02 华为技术有限公司 Method and apparatus for processing redo data of database
CN104424351A (en) * 2013-08-22 2015-03-18 国际商业机器公司 Log data store that stores data across a plurality of storage devices using non-disjoint layers
CN105760283A (en) * 2014-12-18 2016-07-13 阿里巴巴集团控股有限公司 Log output method and device
CN108874588A (en) * 2018-06-08 2018-11-23 郑州云海信息技术有限公司 A kind of database instance restoration methods and device
CN110245006A (en) * 2019-05-07 2019-09-17 深圳壹账通智能科技有限公司 Processing method, device, equipment and the storage medium of block chain affairs
CN110955556A (en) * 2018-09-27 2020-04-03 阿里巴巴集团控股有限公司 Database recovery method and device, storage medium and database system
CN111125040A (en) * 2018-10-31 2020-05-08 华为技术有限公司 Method, apparatus and storage medium for managing redo log
CN111290881A (en) * 2020-01-21 2020-06-16 上海达梦数据库有限公司 Data recovery method, device, equipment and storage medium
CN111694806A (en) * 2020-06-05 2020-09-22 上海达梦数据库有限公司 Transaction log caching method, device, equipment and storage medium
CN112015827A (en) * 2019-05-30 2020-12-01 中兴通讯股份有限公司 Database processing method and device and computer readable storage medium
CN112596953A (en) * 2020-12-25 2021-04-02 上海达梦数据库有限公司 Database log replay method, device, equipment and storage medium
CN113434296A (en) * 2021-07-01 2021-09-24 曙光信息产业股份有限公司 Cache back-brushing method and device, electronic equipment and storage medium
CN114489480A (en) * 2021-12-23 2022-05-13 深圳市世强元件网络有限公司 Method and system for high-concurrency data storage
CN110990363B (en) * 2019-11-29 2023-07-14 交通银行股份有限公司 Distributed database multithreading collaborative transaction log playback method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426410B (en) * 2015-11-02 2018-11-09 东软集团股份有限公司 Data collecting system and analysis method for data collecting system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073856A1 (en) * 2005-09-27 2007-03-29 Benjamin Tsien Early issue of transaction ID
US20080189339A1 (en) * 2006-12-20 2008-08-07 International Business Machines Corporation Method and system for scheduling workload in databases
CN102760161A (en) * 2012-06-12 2012-10-31 天津神舟通用数据技术有限公司 Log organization structure clustered based on transaction aggregation and method for realizing corresponding recovery protocol thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073856A1 (en) * 2005-09-27 2007-03-29 Benjamin Tsien Early issue of transaction ID
US20080189339A1 (en) * 2006-12-20 2008-08-07 International Business Machines Corporation Method and system for scheduling workload in databases
CN102760161A (en) * 2012-06-12 2012-10-31 天津神舟通用数据技术有限公司 Log organization structure clustered based on transaction aggregation and method for realizing corresponding recovery protocol thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XABC3000: "漫谈PostgreSQL的日志实现机制", 《HTTP://WEB.ARCHIVE.ORG/WEB/20120620042541/HTTP://WWW.LINUXIDC.COM/LINUX/2012-06/62749.HTM》 *
大唐 三枝花: "一个简单又高效的日志系统", 《HTTP://WEB.ARCHIVE.ORG/WEB/20101024045404/HTTP://TECH.DDVIP.COM/2009-05/1242610013119586.HTML》 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10387258B2 (en) 2013-03-26 2019-08-20 Huawei Technologies Co., Ltd. Method and apparatus for processing redo data in database
WO2014153940A1 (en) * 2013-03-26 2014-10-02 华为技术有限公司 Method and apparatus for processing redo data of database
CN103198159B (en) * 2013-04-27 2016-01-06 国家计算机网络与信息安全管理中心 A kind of many copy consistency maintaining methods of isomeric group reformed based on affairs
CN103198159A (en) * 2013-04-27 2013-07-10 国家计算机网络与信息安全管理中心 Transaction-redo-based multi-copy consistency maintaining method for heterogeneous clusters
CN103412803A (en) * 2013-08-15 2013-11-27 华为技术有限公司 Data recovering method and device
CN103412803B (en) * 2013-08-15 2016-08-10 华为技术有限公司 The method and device that data are recovered
CN104424351B (en) * 2013-08-22 2017-11-24 国际商业机器公司 Across the method and system of the daily record data thesaurus of multiple storage device data storages
CN104424351A (en) * 2013-08-22 2015-03-18 国际商业机器公司 Log data store that stores data across a plurality of storage devices using non-disjoint layers
CN103856353B (en) * 2014-03-06 2018-01-26 上海爱数信息技术股份有限公司 A kind of business diary data access and the method and device of statistical analysis
CN103856353A (en) * 2014-03-06 2014-06-11 上海爱数软件有限公司 Service log data access and statistic analysis method and device
CN105760283A (en) * 2014-12-18 2016-07-13 阿里巴巴集团控股有限公司 Log output method and device
CN105760283B (en) * 2014-12-18 2018-11-09 阿里巴巴集团控股有限公司 A kind of log-output method and device
CN108874588A (en) * 2018-06-08 2018-11-23 郑州云海信息技术有限公司 A kind of database instance restoration methods and device
CN110955556A (en) * 2018-09-27 2020-04-03 阿里巴巴集团控股有限公司 Database recovery method and device, storage medium and database system
CN110955556B (en) * 2018-09-27 2023-05-02 阿里云计算有限公司 Database recovery method and device, storage medium and database system
CN111125040A (en) * 2018-10-31 2020-05-08 华为技术有限公司 Method, apparatus and storage medium for managing redo log
CN111125040B (en) * 2018-10-31 2023-09-08 华为技术有限公司 Method, device and storage medium for managing redo log
CN110245006B (en) * 2019-05-07 2023-05-02 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for processing block chain transaction
CN110245006A (en) * 2019-05-07 2019-09-17 深圳壹账通智能科技有限公司 Processing method, device, equipment and the storage medium of block chain affairs
CN112015827A (en) * 2019-05-30 2020-12-01 中兴通讯股份有限公司 Database processing method and device and computer readable storage medium
CN110990363B (en) * 2019-11-29 2023-07-14 交通银行股份有限公司 Distributed database multithreading collaborative transaction log playback method and system
CN111290881A (en) * 2020-01-21 2020-06-16 上海达梦数据库有限公司 Data recovery method, device, equipment and storage medium
CN111290881B (en) * 2020-01-21 2023-09-19 上海达梦数据库有限公司 Data recovery method, device, equipment and storage medium
CN111694806A (en) * 2020-06-05 2020-09-22 上海达梦数据库有限公司 Transaction log caching method, device, equipment and storage medium
CN111694806B (en) * 2020-06-05 2023-10-27 上海达梦数据库有限公司 Method, device, equipment and storage medium for caching transaction log
CN112596953B (en) * 2020-12-25 2023-08-29 上海达梦数据库有限公司 Database log replay method, device, equipment and storage medium
CN112596953A (en) * 2020-12-25 2021-04-02 上海达梦数据库有限公司 Database log replay method, device, equipment and storage medium
CN113434296A (en) * 2021-07-01 2021-09-24 曙光信息产业股份有限公司 Cache back-brushing method and device, electronic equipment and storage medium
CN114489480A (en) * 2021-12-23 2022-05-13 深圳市世强元件网络有限公司 Method and system for high-concurrency data storage

Also Published As

Publication number Publication date
CN102945278B (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN102945278B (en) A kind of method and apparatus of data-base recording redo log
US9377959B2 (en) Data storage method and apparatus
US11709803B2 (en) Data transaction processing method, apparatus, and electronic device
CN110442560B (en) Log replay method, device, server and storage medium
US9251233B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
US10467044B2 (en) Transaction processing method and apparatus, and computer system
CN110188110B (en) Method and device for constructing distributed lock
US11366788B2 (en) Parallel pipelined processing for snapshot data deletion
CN103150149A (en) Method and device for processing redo data of database
US20160162366A1 (en) A method for a logging process in a data storage system
CN103605657A (en) Method and device for reconstructing index online
JPWO2016117022A1 (en) Log management method and computer system
CN113778338A (en) Distributed storage data reading efficiency optimization method, system, device and medium
US10452496B2 (en) System and method for managing storage transaction requests
CN110806942B (en) Data processing method and device
US20180011897A1 (en) Data processing method having structure of cache index specified to transaction in mobile environment dbms
CN114489480A (en) Method and system for high-concurrency data storage
CN106528876B (en) The information processing method and distributed information processing system of distributed system
CN107422990B (en) Dynamic migration method and device
CN104216666A (en) Method and device for managing writing of disk data
US20170090790A1 (en) Control program, control method and information processing device
CN110716814B (en) Performance optimization method and device for inter-process large-data-volume communication
CN108536393B (en) Disk initialization method and device
CN112559457A (en) Data access method and device
CN108255848B (en) Method, equipment and system for realizing condition updating

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220214

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221208

Address after: 518129 Huawei Headquarters Office Building 101, Wankecheng Community, Bantian Street, Longgang District, Shenzhen, Guangdong

Patentee after: Shenzhen Huawei Cloud Computing Technology Co.,Ltd.

Address before: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee before: Huawei Cloud Computing Technologies Co.,Ltd.

TR01 Transfer of patent right