CN116302696A - Archive log generation method of database system, storage medium and computer device - Google Patents

Archive log generation method of database system, storage medium and computer device Download PDF

Info

Publication number
CN116302696A
CN116302696A CN202310257154.8A CN202310257154A CN116302696A CN 116302696 A CN116302696 A CN 116302696A CN 202310257154 A CN202310257154 A CN 202310257154A CN 116302696 A CN116302696 A CN 116302696A
Authority
CN
China
Prior art keywords
conflict
archive
record
log
archive 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.)
Pending
Application number
CN202310257154.8A
Other languages
Chinese (zh)
Inventor
邱扬帆
李翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingbase Information Technologies Co Ltd
Original Assignee
Beijing Kingbase Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingbase Information Technologies Co Ltd filed Critical Beijing Kingbase Information Technologies Co Ltd
Priority to CN202310257154.8A priority Critical patent/CN116302696A/en
Publication of CN116302696A publication Critical patent/CN116302696A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present invention relates to the field of database management technologies, and in particular, to a method for generating an archive log of a database system, a storage medium, and a computer device, where the method includes: acquiring archive logs generated by each database node during a split brain fault in response to split brain fault repair of the database system; and merging each of the archive logs to generate a total archive log. Because the general filing log in the technical scheme of the invention combines the filing log generated by each database node in the brain fracture fault period, the integrity of the modification record can be ensured, and further, the loss of data can be avoided when the general filing log is adopted to recover the data in the database system, thereby improving the reliability of the database system for generating the filing log.

Description

Archive log generation method of database system, storage medium and computer device
Technical Field
The present invention relates to the field of database management technologies, and in particular, to a method for generating an archive log of a database system, a storage medium, and a computer device.
Background
In order to ensure data security, the database is backed up periodically in the process of using the database, the archive log is a common technology related to backup and recovery, and the modification of the database is recorded in sequence in the archive log. The generation process of the archive log comprises the following steps: performing basic backup on data in the time T database system, starting an archiving log function, and storing the data in the time T database system to a remote disk; as the business progresses, modifications to the data are also continually saved to the archive directory of the backup disk in the form of archive logs. When the database system has serious faults and needs to be rebuilt, the basic backup is used for restoring the data in the database system to the data at the moment T, and then the archive log is replayed to restore the data to the latest moment.
The distributed database is provided with a plurality of database nodes which are arranged in a distributed mode, each database node is arranged in a one-write-multiple-read mode, namely one database node is arranged as a write database node, the other database nodes are arranged as read database nodes, wherein the write database node can write data and copy the data to the other plurality of read database nodes, and the stored data can be read according to a user request. The reading database node can only provide data reading service for users and cannot write data into the database. The write-once read-many setting mode can ensure the safety of data storage on one hand and can enhance the read service performance of the database system on the other hand. Since only the write database node is able to provide write services, the archive log is also based on what was generated on the write database node.
Brain cracking is a common failure of a distributed database system, and the reason for the failure is that communication between database nodes is interrupted, so that a read database node cannot acquire an archive log generated by a write database node, and cannot modify stored data. In order to ensure the normal operation of the database system, during a split brain fault, reading database nodes in the database system are lifted to writing database nodes, so that a plurality of archive logs can appear in the database system.
After the brain fracture fault is repaired, the method for acquiring the archive logs during the brain fracture selects one archive log which is most suitable for the service requirement for storage, and discards other archive logs. The problem with this approach is that the modification records in the discarded archive log are lost, and when the archive log is used to recover the data in the database system, part of the data is lost, resulting in a reduced reliability of the database system.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide an archive log generating method, a storage medium, and a computer device for a database system that overcome or at least partially solve the above problems, and can solve the problem that the existing database system loses a modification record when acquiring an archive log during a brain fracture, thereby achieving the purpose of improving the reliability of the database system.
In order to solve at least the above technical problems, an aspect of the present invention provides a method for generating an archive log of a database system, including:
acquiring archive logs generated by each database node during a split brain fault in response to split brain fault repair of the database system; and
and merging the archive logs to generate a total archive log.
According to one embodiment of the present invention, the merging each of the archive logs to generate a total archive log includes:
according to a preset conflict identification rule, identifying conflict records and non-conflict records in each archive log; and
and merging the non-conflict records into the total profile log, and processing the conflict records according to a preset processing rule.
According to one embodiment of the present invention, the identifying the conflict record and the non-conflict record in each archive log according to the preset conflict identification rule includes:
and responding to the modification of the same data recorded in a plurality of archive logs, wherein the modification record corresponding to the data is the conflict record.
According to one embodiment of the present invention, the identifying the conflict record and the non-conflict record in each archive log according to the preset conflict identification rule includes:
and responding to the existence of a dependency relationship among the modified data recorded in the archive logs, wherein the modified record corresponding to the data is the conflict record.
According to an embodiment of the present invention, the processing the data with the conflict according to a preset processing rule includes:
acquiring a corresponding conflict processing method according to the conflict type of the conflict record; and
and processing the conflict record by adopting the conflict processing method.
According to one embodiment of the present invention, the method for obtaining a corresponding conflict processing according to the conflict type of the conflict record includes:
the conflict processing method comprises the following steps of: and merging corresponding data in the archive log of the set database node into the total archive log.
According to one embodiment of the present invention, the method for obtaining a corresponding conflict processing according to the conflict type of the conflict record includes:
the conflict processing method comprises the following steps of:
processing the conflict record by adopting a preset algorithm to generate a new modification record; and
and merging the new modification record into the general profile log.
According to one embodiment of the present invention, the method for obtaining a corresponding conflict processing according to the conflict type of the conflict record includes:
the conflict type is a third preset conflict type, and the conflict processing method comprises the following steps: and storing the conflict record.
In another aspect, the present invention also provides a machine-readable storage medium, on which a machine-executable program is stored, where the machine-executable program, when executed by a processor, implements an archive log generation method according to any one of the above embodiments.
In yet another aspect, the present invention further provides a computer device, including a memory, a processor, and a machine executable program stored on the memory and running on the processor, where the processor implements the archive log generation method according to any one of the embodiments above when executing the machine executable program.
After the cerebral fracture fault of the database system is repaired, the archive logs generated by all database nodes in the cerebral fracture fault period are combined to generate a total archive log so as to update the archive log of all database nodes. Because the general filing log in the technical scheme of the invention combines the filing log generated by each database node in the brain fracture fault period, compared with the mode of selecting the filing log generated by one database node in the prior art, the method can ensure the integrity of the modified record, and further can avoid the loss of data when the general filing log is adopted to recover the data in the database system, thereby improving the reliability of the database system for generating the filing log.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter by way of example and not by way of limitation with reference to the accompanying drawings. The same reference numbers will be used throughout the drawings to refer to the same or like parts or portions. It will be appreciated by those skilled in the art that the drawings are not necessarily drawn to scale. In the accompanying drawings:
FIG. 1 is a flow chart of a method of archive log generation of a database system in accordance with one embodiment of the present invention;
FIG. 2 is a flow chart of merging archive logs generated by database nodes during a split brain fault in accordance with one embodiment of the present invention;
FIG. 3 is a flow chart of a method of identifying conflicting and non-conflicting records in an archive log in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of another method of identifying conflicting and non-conflicting records in an archive log in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of a method of processing conflicting records in accordance with preset processing rules in accordance with one embodiment of the present invention;
FIG. 6 is a schematic diagram of a machine-readable storage medium according to one embodiment of the invention;
fig. 7 is a schematic structural view of a computer device according to an embodiment of the present invention.
Detailed Description
Referring to fig. 1, fig. 1 is a flowchart of an archive log generation method of a database system, where the archive log generation method is used for processing archive logs generated by database nodes in the database system during a brain fracture fault to prevent data loss during the brain fracture fault, so as to achieve the purpose of improving the reliability of the database system. The method for generating the archive log of the database system of the present application will be described in detail with reference to the flow shown in fig. 1.
For the sake of clarity and completeness of the description of the technical solution of the present application, a database node having both data writing and data reading functions in a database system is referred to herein as a writing database node, and a database node having only data reading functions in a database system is referred to herein as a reading database node. When the database system does not have a brain fracture fault, the database system is provided with a database writing node and at least one database reading node; when the database system has a brain-crack fault, the database system is provided with at least two database writing nodes.
As shown in fig. 1, the archive log generating method of the database system of the present application includes the steps of:
step S1: and after the cerebral infarction fault of the database system is repaired, acquiring archive logs generated by each database node in the cerebral infarction fault period.
When the database system has a brain-crack fault, at least two database writing nodes appear in the database system, and when a user modifies data in the database, the corresponding database writing nodes record the modification of the user and generate corresponding archive logs. Therefore, the archive log generated by each database node in the database during the brain-crack fault obtained in this embodiment refers to an archive log generated by each write data amount node during the brain-crack fault, and at least two archive logs are generated due to at least two write database nodes.
After the brain fracture fault of the database system is repaired, the database system is restored to a setting mode of one writing database node and a plurality of reading database nodes, and at the moment, an archiving log generated by each writing database node needs to be obtained.
Step S2: and merging the archive logs generated by the database nodes in the brain fracture fault period to obtain a total archive log.
When the archive logs are combined, the data in the archive logs can be integrated according to a preset sequence, for example, the modification records in the archive logs can be integrated according to a time sequence to obtain a new archive log, and the new archive log is used as the overall archive log.
In summary, according to the technical scheme provided by the application, after the cerebral infarction fault of the database system is repaired, the archive logs generated by each database node in the cerebral infarction fault period are combined to generate the total archive log so as to update the archive log of each database node. Because the general filing log in the technical scheme of the invention combines the filing log generated by each database node in the brain fracture fault period, compared with the mode of selecting the filing log generated by one database node in the prior art, the method can ensure the integrity of the modified record, and further can avoid the loss of data when the general filing log is adopted to recover the data in the database system, thereby improving the reliability of the database system for generating the filing log.
Because each database node in the database system is distributed, the archive log generation method of the database system can be respectively implemented by each database node so that each database node generates a corresponding total archive log. Or the archive log generating method of the database system is executed by the write database nodes in the database system, and after the total archive log is obtained, the total archive log is copied to the read database nodes so as to update the archive log of each database node in the database system.
While the foregoing has been presented in detail with respect to the technical solutions of the present application, and the following details are set forth in the foregoing method of merging archive logs generated by database nodes during a brain fracture fault in step S2 in conjunction with specific application scenarios, it should be understood that the method shown in the following is exemplary and not limiting, and the foregoing description of step S2 applies equally to the following.
In one embodiment, in the step S2, a flow of merging archive logs generated by each database node in the period of the split brain fault is shown in fig. 2, and the method includes the following steps:
step S201: and identifying conflict records and non-conflict records in each archive log according to a preset conflict identification rule.
Since each archive log is generated by a different write database node, there may be a conflict in the modification records in each archive log, e.g., different modifications have been recorded in at least two archive logs for the same data in the database system, etc. Therefore, in this embodiment, a preset conflict recognition rule is set first, and then the modification records in each archive log are processed according to the preset conflict recognition rule to recognize the conflict records and the non-conflict records in each archive log.
Step S202: and merging the non-conflict records to obtain a total profile log, and processing the conflict records according to a preset processing rule.
When the non-conflict records are combined, the non-conflict records can be modified according to a preset modification method, for example, the formats of the non-conflict records are sorted; and then integrating the non-conflict records according to a preset sequence, for example, the non-conflict records can be integrated according to a modified time sequence to obtain a new archive log, and the new archive log is used as the total archive log.
Because of the contradiction between the conflicting records, if the conflicting records are directly incorporated into the overall profile log, confusion may occur in using the overall profile log to recover the data in the database system, such as the recovery of the conflicting data into the database. Therefore, in this embodiment, the conflict record is processed by using a preset processing rule.
The conflict record is processed according to a preset processing rule, and the conflict in the conflict record can be eliminated and then combined into the general ranking log, or the conflict record can be deleted, and the specific processing method can be set according to the requirement of a user.
Due to the arrangement mode of the embodiment, the conflict records and the non-conflict records in each archive log are identified, and the conflict records and the non-conflict records are correspondingly processed, so that on one hand, the data loss caused by the lack of the modified records in the total archive log when the database system is restored can be prevented, and on the other hand, the accuracy of the data in the total archive log can be prevented from being influenced by the conflict records, thereby further improving the reliability of the total archive log of the database system.
The method of merging the archive logs generated by the database nodes in the brain-crack fault period in step S2 is described in detail above, and the method of identifying the conflict record and the non-conflict record in the archive log in step S201 is described in detail below in combination with a specific application scenario.
As shown in fig. 3, in one embodiment, the method for identifying conflicting records and non-conflicting records in the archive log in step S201 includes the steps of:
step S211: judging whether a plurality of archive logs record the modification of the same data or not;
step S212: if yes, the modification record corresponding to the data is regarded as the conflict record.
If only one archive log records that one data is modified, only one modification record of the data in the archive log after merging the archive logs will not conflict with other modification records, so that the modification record corresponding to the data is not a conflict record. On the contrary, if two or more archive logs record the modification of the same data, after merging the archive logs, the archive logs record a plurality of modification records of the data, and a contradiction exists between the data, so that the modification record corresponding to the data can be used as a conflict record.
By the setting mode of the embodiment, the modification records of the same data in a plurality of archive logs can be used as conflict records, and further after the modification records of the data are processed according to the preprocessing rule, the phenomenon that the plurality of modification records of the same data appear in the total archive log can be avoided, so that the aim of improving the reliability of the archive log of the database system is fulfilled.
In another embodiment, as shown in fig. 4, the method for identifying conflicting records and non-conflicting records in the archive log in step S201 includes the following steps:
step S221: judging whether a dependency relationship exists between data corresponding to the modification records in the plurality of archive logs;
step S222: if yes, the modified record is a conflict record.
When there is a dependency relationship between the data corresponding to the modification records in the plurality of archive logs, if the modification records are directly combined into the overall archive log, the data with the dependency relationship is confused when the data in the database system is restored according to the overall archive log. For example, for data "lesson time of X is Y", which depends on lesson ID, if modification of the lesson ID from X to Z is recorded in one archive log and modification of lesson time from Y to a is recorded in the other archive log, when the two archive logs are combined, the lesson may not have corresponding lesson time or may also correspond to erroneous lesson time.
Therefore, in this embodiment, when there is a dependency relationship between the data corresponding to the modification records in the plurality of archive logs, the modification record corresponding to the data having the dependency relationship is taken as the conflict record. When executing the above step S221, it may be first queried whether modification to the setting data is recorded in the archive log, if so, it may be further queried whether modification to the data dependent on the setting data is recorded in another archive log, and if so, it may be determined that there is a dependency relationship between the data corresponding to the modification record in the plurality of archive logs. For example, for the data "lesson time with lesson ID X is Y", it may be determined whether modification to lesson ID is recorded in the archive log, if so, it may be determined whether modification to lesson time is recorded in the other archive log, and if so, the modification record of lesson ID and the modification record of lesson time are regarded as conflict records.
By the arrangement mode of the embodiment, the modification record of the data with the dependency relationship can be used as the conflict record, and further, after the conflict record is processed according to the preprocessing rule, the phenomenon that the modification record in the total filing log is disordered can be avoided, so that the aim of improving the reliability of the total filing log of the database system is fulfilled.
In the above embodiment, the method for identifying the conflict record and the non-conflict record in the archive log in step S201 is described in detail, and the method for processing the conflict record in step S202 according to the preset processing rule is described in detail below in conjunction with a specific application scenario.
As shown in fig. 5, in one embodiment, the method for processing the conflict record according to the preset processing rule in the step S202 includes the following steps:
step S301: acquiring a conflict type of the conflict record;
step S302: obtaining a corresponding conflict processing method according to the conflict type of the conflict record;
step S303: and processing the conflict record by adopting the obtained conflict processing method.
In this embodiment, a manager of the database system may set a corresponding conflict processing method for each conflict type, and store the conflict processing method, after identifying a conflict record in the archive log, first identify the conflict type of the conflict record, then query the conflict processing method corresponding to the conflict type, and process the conflict record by adopting the conflict processing method. For example, the conflict record may be deleted such that only non-conflict records remain in the overall profile log to prevent the conflict record from affecting the accuracy and reliability of the overall profile log.
By the setting mode of the embodiment, different conflict processing methods can be set for different conflict types so as to correspondingly process various conflict records, thereby improving the comprehensiveness of conflict record processing.
The conflict processing method of the conflict records of each conflict type is described in detail below in connection with the specific embodiments.
In one embodiment, the conflict type of the conflict record is a first preset conflict type, and the corresponding conflict processing method includes: and merging corresponding modification records in archive logs of set database nodes in the database system into the total archive log.
For example, the first preset conflict type may be that modifications to the same data are recorded in a plurality of archive logs, and the conflict processing method of the first preset conflict type may be that: and merging the corresponding modification record in the archive log of the set database node into the total archive log based on the archive log of the set database node.
In this embodiment, the setting database node may be obtained according to a priority of each database node, or may be obtained according to a generation time of a corresponding modification record, where obtaining according to a priority of each database node refers to setting a priority of each database node first, and when the same data is modified in a plurality of archive logs, obtaining priorities of database nodes corresponding to a plurality of archive logs, and taking a database node with a highest priority as the setting database node. The obtaining according to the modification time of the corresponding data means that when there are multiple archive logs in which the modification to the same data is recorded, the generating of the modification records corresponding to the multiple archive logs is first obtained, and the database node with the latest generation time is used as the set database node.
By means of the setting mode of the embodiment, when the conflict type is the first preset conflict type, the corresponding modification records in the archive log of the set database node can be combined into the total priority log, so that on one hand, loss of the modification records is reduced as much as possible, on the other hand, the conflict records in the obtained total priority log can be prevented, and the completeness and reliability of the total priority log of the database system are improved.
It will be appreciated that the first preset conflict type and the corresponding conflict processing method in the above embodiment are exemplary and not limiting, and in other embodiments, other conflict manners may be used as the first preset conflict type, and in the corresponding conflict processing method, the setting database node may be determined according to other manners.
In another embodiment, the conflict type of the conflict record is a second preset conflict type, and the corresponding conflict processing method includes: and processing the conflict record by adopting a preset algorithm to generate a new modification record, and merging the generated new modification record into the general profile log.
For example, the second preset conflict type may be that a dependency relationship exists between data corresponding to the modification records in the archive logs, and the preset algorithm in the corresponding conflict processing method may be: and acquiring the modification time of the conflict record in the corresponding archive log, and combing the conflict record according to the modification time to generate a corresponding new modification record.
For example, for the data "lesson time with lesson ID X is Y", the lesson time in the data depends on lesson ID, and the lesson ID is modified to Z at a first time in one archive log, and the lesson time is modified to a at a second time in another archive log, it is first determined whether the first time is later than the second time.
If so, the generated new modification record includes "modify lesson time with lesson ID X from Y to A at the second time" and "modify lesson ID from X to Z at the first time" and when data in the database system is restored from the new modification record, the resulting data is "lesson time with lesson ID Z is A".
If not, the generated new modification record includes "modify lesson ID by X at a first time as Z" and "modify lesson time of lesson ID by X at a second time as A" and when data in the database system is restored from the new modification record, the resulting data includes "lesson time of lesson ID by Z is Y" and "lesson time of lesson ID by X is A".
By the setting mode of the embodiment, a preset algorithm can be adopted to process the conflict record so as to generate a new modification record, and the new modification record is combined into the total logging log, so that on one hand, loss of the modification record is reduced as much as possible, and on the other hand, the conflict record in the obtained total logging log can be prevented, and the completeness and reliability of the total logging log of the database system are improved.
It will be appreciated that the second preset conflict type and the corresponding conflict processing method in the above embodiment are exemplary and not limiting, and in other embodiments, other conflict modes may be used as the second preset conflict type, and an algorithm obtained based on other conditions may be used as the preset algorithm, for example, the preset algorithm may be modifying the conflict record into set data. With the data "lesson time with lesson ID X is Y", if the lesson ID is modified to Z at a first time in one archive log and the lesson time is modified to a at a second time in another archive log, the preset algorithm may set the lesson ID for lesson ID modification and the lesson time for setting time, thereby generating a new modification record.
In one embodiment, when the conflict type of the conflict record is a third preset conflict type, the corresponding conflict processing method includes: and storing the conflict record.
In this embodiment, the third preset conflict type may be that modifications to the same data are recorded in a plurality of archive logs, or that a dependency relationship exists between data corresponding to modification records in a plurality of archive logs. The conflict processing method corresponding to the third preset conflict type is to store the conflict record so as to facilitate subsequent manual inspection or processing, and the conflict record can be merged into the total profile log after being manually processed to eliminate the conflict in the conflict record.
In the setting manner of the embodiment, when the conflict type of the conflict record is the third preset conflict type, the conflict record can be recorded so as to facilitate subsequent manual inspection or processing, thereby enabling manual intervention to process the conflict record and improving the reliability of processing the conflict record.
The present embodiment also provides a machine-readable storage medium and a computer device. Fig. 6 is a schematic diagram of a machine-readable storage medium 40 according to one embodiment of the invention, and fig. 7 is a schematic diagram of a computer device 50 according to one embodiment of the invention.
The machine-readable storage medium 40 has stored thereon a machine-executable program 41, which when executed by a processor, implements the archive log generation method of the database system of any of the above embodiments.
The computer device 50 may include a memory 520, a processor 510, and a machine executable program 41 stored on the memory 520 and running on the processor 510, and the processor 510 implements the archive log generation method of the database system of any of the embodiments described above when executing the machine executable program 41.
It should be noted that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any machine-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
For the purposes of this description of embodiments, a machine-readable storage medium 40 can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the machine-readable storage medium 40 include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the machine-readable storage medium 40 may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
The computer device 50 may be, for example, a server, a desktop computer, a notebook computer, a tablet computer, or a smart phone. In some examples, computer device 50 may be a cloud computing node. Computer device 50 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer device 50 may be implemented in a distributed cloud computing environment where remote processing devices coupled via a communications network perform tasks. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including memory storage devices.
Computer device 50 may include a processor 510 adapted to execute stored instructions, a memory 520 providing temporary storage for the operation of the instructions during operation. Processor 510 may be a single core processor, a multi-core processor, a computing cluster, or any number of other configurations. Memory 520 may include Random Access Memory (RAM), read only memory, flash memory, or any other suitable storage system.
Processor 510 may be connected through a system interconnect (e.g., PCI-Express, etc.) to an I/O interface (input/output interface) adapted to connect computer device 50 to one or more I/O devices (input/output devices). The I/O devices may include, for example, a keyboard and a pointing device, which may include a touch pad or touch screen, among others. The I/O device may be a built-in component of the computer device 50 or may be a device externally connected to the computing device.
The processor 510 may also be linked through a system interconnect to a display interface suitable for connecting the computer device 50 to a display device. The display device may include a display screen as a built-in component of the computer device 50. The display device may also include a computer monitor, television, projector, or the like, that is externally connected to the computer device 50. Further, a network interface controller (network interface controller, NIC) may be adapted to connect the computer device 50 to a network through a system interconnect. In some embodiments, the NIC may use any suitable interface or protocol (such as an internet small computer system interface, etc.) to transfer data. The network may be a cellular network, a radio network, a Wide Area Network (WAN), a Local Area Network (LAN), or the internet, among others. The remote device may be connected to the computing device through a network.
The flowcharts provided by this embodiment are not intended to indicate that the operations of the method are to be performed in any particular order, or that all of the operations of the method are included in all of each case. Furthermore, the method may include additional operations, and additional variations may be made to the above method within the scope of the technical ideas provided by the method of the present embodiment.
By now it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been shown and described herein in detail, many other variations or modifications of the invention consistent with the principles of the invention may be directly ascertained or inferred from the present disclosure without departing from the spirit and scope of the invention. Accordingly, the scope of the present invention should be understood and deemed to cover all such other variations or modifications.

Claims (10)

1. An archive log generation method of a database system, comprising:
acquiring archive logs generated by each database node during a split brain fault in response to split brain fault repair of the database system; and
and merging the archive logs to generate a total archive log.
2. The archive log generation method of claim 1 wherein,
the merging of the archive logs to generate a total archive log includes:
according to a preset conflict identification rule, identifying conflict records and non-conflict records in each archive log; and
and merging the non-conflict records into the total profile log, and processing the conflict records according to a preset processing rule.
3. The archive log generation method of claim 2 wherein,
the identifying the conflict record and the non-conflict record in each archive log according to the preset conflict identification rule comprises the following steps:
and responding to the modification of the same data recorded in a plurality of archive logs, wherein the modification record corresponding to the data is the conflict record.
4. The archive log generation method of claim 2 wherein,
the identifying the conflict record and the non-conflict record in each archive log according to the preset conflict identification rule comprises the following steps:
and responding to the existence of a dependency relationship between data corresponding to modification records in a plurality of archive logs, wherein the modification records are conflict records.
5. The archive log generation method of claim 2 wherein,
the processing the data with conflict according to the preset processing rule comprises the following steps:
acquiring a corresponding conflict processing method according to the conflict type of the conflict record; and
and processing the conflict record by adopting the conflict processing method.
6. The archive log generation method of claim 5 wherein,
the method for acquiring the corresponding conflict processing method according to the conflict type of the conflict record comprises the following steps:
the conflict processing method comprises the following steps of: and merging corresponding data in the archive log of the set database node into the total archive log.
7. The archive log generation method of claim 5 wherein,
the method for acquiring the corresponding conflict processing method according to the conflict type of the conflict record comprises the following steps:
the conflict processing method comprises the following steps of:
processing the conflict record by adopting a preset algorithm to generate a new modification record; and
and merging the new modification record into the general profile log.
8. The archive log generation method of claim 5 wherein,
the method for acquiring the corresponding conflict processing method according to the conflict type of the conflict record comprises the following steps:
the conflict type is a third preset conflict type, and the conflict processing method comprises the following steps: and storing the conflict record.
9. A machine-readable storage medium having stored thereon a machine-executable program which when executed by a processor implements the archive log generation method of any of claims 1 to 8.
10. A computer device comprising a memory, a processor, and a machine executable program stored on the memory and running on the processor, and the processor implementing the archive log generation method of any of claims 1 to 8 when executing the machine executable program.
CN202310257154.8A 2023-03-08 2023-03-08 Archive log generation method of database system, storage medium and computer device Pending CN116302696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310257154.8A CN116302696A (en) 2023-03-08 2023-03-08 Archive log generation method of database system, storage medium and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310257154.8A CN116302696A (en) 2023-03-08 2023-03-08 Archive log generation method of database system, storage medium and computer device

Publications (1)

Publication Number Publication Date
CN116302696A true CN116302696A (en) 2023-06-23

Family

ID=86831978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310257154.8A Pending CN116302696A (en) 2023-03-08 2023-03-08 Archive log generation method of database system, storage medium and computer device

Country Status (1)

Country Link
CN (1) CN116302696A (en)

Similar Documents

Publication Publication Date Title
US7043504B1 (en) System and method for parallel primary and secondary backup reading in recovery of multiple shared database data sets
US20150213100A1 (en) Data synchronization method and system
US20140081927A1 (en) Data node fencing in a distributed file system
US7681001B2 (en) Storage system
US9977706B2 (en) System and method of validating data for incremental format of backup archive
CN111309524A (en) Distributed storage system fault recovery method, device, terminal and storage medium
CN113220540B (en) Service management method, device, computer equipment and storage medium
CN110162429A (en) System repair, server and storage medium
CN110737716B (en) Data writing method and device
CN102597995B (en) Synchronizing database and non-database resources
JP5352027B2 (en) Computer system management method and management apparatus
CN112732492A (en) Extraction backup method and system based on cloud database
WO2023111910A1 (en) Rolling back database transaction
CN116302696A (en) Archive log generation method of database system, storage medium and computer device
EP1349067A2 (en) Document management system and method with fault recovery
US9471409B2 (en) Processing of PDSE extended sharing violations among sysplexes with a shared DASD
CN109740027B (en) Data exchange method, device, server and storage medium
US11755425B1 (en) Methods and systems for synchronous distributed data backup and metadata aggregation
US11475159B2 (en) System and method for efficient user-level based deletions of backup data
CN117032790A (en) Virtualization system version synchronization method, device, equipment and medium
CN107707402B (en) Management system and management method for service arbitration in distributed system
CN117539960A (en) Database data synchronization method, storage medium and device
CN116501543A (en) Physical backup method, storage medium and equipment for database cluster
CN116775596A (en) Data migration method and device, server and storage medium
CN115017153A (en) Data reconstruction method and device, data storage system and storage medium

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