Nothing Special   »   [go: up one dir, main page]

CN111459896B - Data recovery system and method, electronic device, and computer-readable storage medium - Google Patents

Data recovery system and method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN111459896B
CN111459896B CN201910049270.4A CN201910049270A CN111459896B CN 111459896 B CN111459896 B CN 111459896B CN 201910049270 A CN201910049270 A CN 201910049270A CN 111459896 B CN111459896 B CN 111459896B
Authority
CN
China
Prior art keywords
operation log
storage node
same
logs
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.)
Active
Application number
CN201910049270.4A
Other languages
Chinese (zh)
Other versions
CN111459896A (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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN201910049270.4A priority Critical patent/CN111459896B/en
Publication of CN111459896A publication Critical patent/CN111459896A/en
Application granted granted Critical
Publication of CN111459896B publication Critical patent/CN111459896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • 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
    • 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/182Distributed file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a data recovery system and method, electronic equipment and a computer readable storage medium. The system comprises: the control node is used for reassigning the operation logs corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node; and the storage nodes are respectively used for playing back the operation logs corresponding to the same data page according to the operation sequence. According to the embodiment of the invention, the operation logs in the storage nodes are redistributed, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, and then each storage node performs playback operation on the operation logs corresponding to the same data page, thereby realizing parallel recovery of data and greatly improving the data recovery efficiency.

Description

Data recovery system and method, electronic device, and computer-readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data recovery system and method, an electronic device, and a computer readable storage medium.
Background
In a distributed shared storage database system, each distributed node has stored therein a Redo log that is used to record various change operations for the database.
When the system crashes and needs to recover data, the recovery of the data can be realized by only reading the Redo logs in each node, combining all the Redo logs according to the operation sequence and then playing back the corresponding data pages in the database according to the combined Redo logs.
In the process of implementing the present invention, the inventors have found that at least the following problems exist in the prior art: because the Redo logs have sequentiality, the Redo logs must be played back one by one in a single process mode, so that data recovery can be realized, and the efficiency is very low.
Disclosure of Invention
The embodiment of the invention provides a data recovery system and method, electronic equipment and a computer readable storage medium, which are used for solving the defect that in the prior art, an operation log is played back one by one in a single process mode, so that the data recovery efficiency is low.
To achieve the above object, an embodiment of the present invention provides a data recovery system, including: the control node and the plurality of storage nodes,
the control node is used for reassigning the operation log corresponding to the same data page to the same storage node according to the data page corresponding to the operation log in the storage node;
and the storage nodes are respectively used for playing back the operation logs corresponding to the same data page according to the operation sequence.
The embodiment of the invention also provides a data recovery method, which comprises the following steps:
the control node allocates the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node;
and the storage nodes play back the operation logs corresponding to the same data page according to the operation sequence.
The embodiment of the invention also provides electronic equipment, which comprises:
a memory for storing a program;
a processor for executing the program stored in the memory, causing the electronic device to:
the control node is used for re-distributing the operation logs corresponding to the same data page to the same storage node only according to the data pages corresponding to the operation logs in the storage node;
and controlling the storage nodes to play back according to the operation sequence respectively aiming at the operation logs corresponding to the same data page.
Embodiments of the present invention also provide a computer-readable storage medium having instructions stored thereon, the instructions comprising:
the control node is used for re-distributing the operation logs corresponding to the same data page to the same storage node only according to the data pages corresponding to the operation logs in the storage node;
and controlling the storage nodes to play back according to the operation sequence respectively aiming at the operation logs corresponding to the same data page.
According to the data recovery system and method, the electronic equipment and the computer readable storage medium, the operation logs in the storage nodes are redistributed, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, and then the storage nodes respectively perform playback operation on the operation logs corresponding to the same data page, thereby realizing parallel recovery of data and greatly improving the data recovery efficiency.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a system block diagram of an embodiment of a data recovery system provided by the present invention;
FIG. 2 is a schematic diagram of a control node in an embodiment of a data recovery system according to the present invention;
FIG. 3 is a schematic diagram of a storage node in an embodiment of a data recovery system according to the present invention;
FIG. 4 is a flowchart of an embodiment of a data recovery method according to the present invention;
FIG. 5 is a flowchart of another embodiment of a data recovery method according to the present invention;
fig. 6 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the prior art, when a system crash needs to perform data recovery, the Redo logs in each node need to be read, all the Redo logs are combined according to the operation sequence, and then the corresponding data pages in the database are played back according to the combined Redo logs, so that the data recovery can be realized. Because the Redo log has sequentiality, the Redo log must be played back piece by piece in a serial (i.e., single process) manner, so that data recovery can be realized, and the data recovery efficiency is very low. Therefore, in view of the defects in the prior art, the application proposes a data recovery scheme, the main principle of which is as follows: the logs of the storage nodes are redistributed, the operation logs (Redo logs) corresponding to the same data page are uniquely distributed to the same storage node, and each storage node performs playback operation according to the sequence aiming at the operation logs of the same data page, so that parallel recovery of data is realized, and the data recovery efficiency is improved.
The foregoing embodiments are illustrative of the technical principles of embodiments of the present invention, and the detailed description of specific technical solutions of the embodiments of the present invention will be further described below through a plurality of embodiments.
Example 1
Fig. 1 is a system block diagram of an embodiment of a data recovery system provided by the present invention, and the structure shown in fig. 1 is only one example of a service system to which the technical solution of the present invention can be applied. As shown in fig. 1, the data recovery system includes: a control node 11 and a plurality of storage nodes 12.
The control node 11 is configured to reassign the operation log corresponding to the same data page to the same storage node 12 according to the data page (stored in the database 13) corresponding to the operation log (i.e., the redox log) in the storage node 12; the plurality of storage nodes 12 are respectively used for playing back the operation logs corresponding to the same data page according to the operation sequence.
The data recovery system provided by the embodiment of the invention can be used for executing the following processing flows shown in fig. 4 and 5. The data recovery system can be applied to a distributed shared storage database system, when the system crashes and needs to recover data, firstly, the control node 11 reads all operation logs from each storage node 12, and then, according to the data page corresponding to each operation log, the operation log corresponding to the same data page is allocated to the same storage node 12 only. That is, after the operation logs are reassigned, each storage node 12 may include operation logs corresponding to one or more data pages, but operation logs corresponding to the same data page are stored in only the same storage node 12. After the operation logs are redistributed to the storage nodes 12, each storage node 12 plays back the operation logs corresponding to the same data page stored by the storage node according to the operation sequence, so that parallel data recovery of a plurality of storage nodes 12 is realized.
According to the data recovery system provided by the embodiment of the invention, the operation logs in the storage nodes are redistributed, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, and then each storage node performs playback operation on the operation logs corresponding to the same data page, thereby realizing parallel recovery of data, greatly improving data recovery efficiency and shortening data recovery time.
Example two
Fig. 2 is a schematic structural diagram of a control node in an embodiment of a data recovery system according to the present invention. As shown in fig. 2, in the data recovery system provided by the present invention, the control node 11 may include: a reading module 111, a calculating module 112 and a transmitting module 113.
Wherein, the reading module 111 is configured to read an operation log in the storage node 12; the computing module 112 is configured to obtain a page number of a data page corresponding to each operation log, and calculate a Hash (Hash) value of the page number; the sending module 113 is configured to send the operation log to the storage node 12 that uniquely corresponds to the hash value according to the hash value corresponding to the operation log.
In the embodiment of the present invention, when a system crash needs to perform data recovery, first, the control node 11 allocates the operation log corresponding to the same data page to the same storage node 12 only according to the data page corresponding to the operation log in each storage node 12. Specifically, the reading module 111 reads all the operation logs from each storage node 12, and then the calculating module 112 obtains the page numbers of the data pages corresponding to each operation log and calculates the Hash value of each page number. Finally, the sending module 113 sends the operation log to the storage node 12 uniquely corresponding to the Hash value according to the Hash value corresponding to the operation log calculated by the calculating module 112. After the operation logs are reassigned, each storage node 12 may include operation logs corresponding to one or more data pages, but operation logs corresponding to the same data page are stored only in the same storage node 12.
According to the data recovery system provided by the embodiment of the invention, the hash value of the page number of the data page corresponding to each operation log is calculated to redistribute each operation log, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, and then each storage node performs playback operation on the operation logs corresponding to the same data page respectively, thereby realizing parallel recovery of data, greatly improving data recovery efficiency and shortening data recovery time.
Example III
Fig. 3 is a schematic structural diagram of a storage node in an embodiment of a data recovery system according to the present invention. As shown in fig. 3, in the data recovery system provided by the present invention, the storage node 12 may include: a receiving module 121, a combining module 122 and a playback module 123.
The receiving module 121 is configured to receive an operation log sent by the control node 11; the merging module 122 is configured to merge the operation logs with the same hash value according to the operation sequence; the playback module 123 is configured to play back the combined operation log according to the operation sequence.
In the embodiment of the present invention, when a system crash needs to perform data recovery, first, the control node 11 allocates the operation log corresponding to the same data page to the same storage node 12 only according to the data page corresponding to the operation log in each storage node 12. Then, each storage node 12 plays back the operation logs corresponding to the same data page stored by the storage node according to the operation sequence, so that parallel data recovery of a plurality of storage nodes 12 is realized. Specifically, the receiving module 121 receives the operation logs sent by the control node 11, and then the merging module 122 merges the operation logs having the same hash value in the operation order of the operation logs; finally, playback operations are performed on the combined operation logs by the playback module 123 in the above-described operation order.
Further, the merging module 122 may be specifically configured to build a Hash (Hash) table, and store the operation logs with the same Hash value in the same record of the Hash table according to the above operation sequence.
In addition, in the embodiment of the present invention, the playback module 123 is further configured to delete the operation log that has been played back. That is, when the operation log is played back, it is deleted by the playback module 123 to free up the storage space.
Further, in the data recovery system provided by the embodiment of the present invention, the storage node 12 may further include: a detection module 124. The detection module 124 may be configured to, when the operation log is played back by the playback module 123, detect that the currently played back operation log is inconsistent with the version number in the previous operation log, instruct the playback module 123 to pause playback until the operation log with the consistent version number appears, and instruct the playback module 123 to continue playing back the operation log with the consistent version number.
In the embodiment of the invention, two version numbers before and after the operation of the corresponding data page are recorded in the operation log. Therefore, it can be further judged whether the operation log is missing. Specifically, when the playback module 123 plays back the operation log, the detection module 124 may detect that the currently played back operation log is inconsistent with the version number in the previous operation log, and when the version number after the operation in the previous operation log is inconsistent with the version number before the operation in the current operation log, it indicates that the operation log is missing, so that the playback module 123 is instructed to pause playback until the operation log with the consistent version number appears, and then instructs the playback module 123 to continue playing back the operation log with the consistent version number.
According to the data recovery system provided by the embodiment of the invention, the hash value of the page number of the data page corresponding to each operation log is calculated to redistribute each operation log, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, then, each storage node respectively merges the operation logs with the same hash value, and plays back the merged operation logs according to the operation sequence, thereby realizing parallel recovery of data, greatly improving the data recovery efficiency and shortening the data recovery time.
Example IV
Fig. 4 is a flowchart of an embodiment of a data recovery method according to the present invention, where an execution body of the method may be the data recovery system, or may be various terminals or server devices with a software data recovery function, or may be a system or a chip integrated on these devices. As shown in fig. 4, the data recovery method includes the steps of:
s401, the control node allocates the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node.
In the embodiment of the invention, the data recovery method can be applied to a distributed shared storage database system, when the system crashes and needs to recover data, firstly, a control node reads all operation logs from each storage node, and then, according to the data page corresponding to each operation log, the operation log corresponding to the same data page is allocated to the same storage node only. That is, after the operation logs are reassigned, each storage node may include operation logs corresponding to one or more data pages, but operation logs corresponding to the same data page are stored in only the same storage node.
S402, the storage nodes play back the operation logs corresponding to the same data page according to the operation sequence.
In the embodiment of the invention, after the control node redistributes the operation logs to the storage nodes, each storage node plays back the operation logs corresponding to the same data page stored by the control node according to the operation sequence, thereby realizing the parallel data recovery of a plurality of storage nodes.
According to the data recovery method provided by the embodiment of the invention, the operation logs in the storage nodes are redistributed, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, and then each storage node performs playback operation on the operation logs corresponding to the same data page, thereby realizing parallel recovery of data, greatly improving data recovery efficiency and shortening data recovery time.
Example five
Fig. 5 is a flowchart of another embodiment of a data recovery method according to the present invention. As shown in fig. 5, on the basis of the embodiment shown in fig. 4, the data recovery method provided in this embodiment may further include the following steps:
s501, the control node reads the operation log in the storage node.
S502, obtaining page numbers of data pages corresponding to the operation logs, and calculating hash values of the page numbers.
S503, according to the hash value corresponding to the operation log, each operation log is sent to a storage node uniquely corresponding to the hash value.
In the embodiment of the invention, when the system crashes and needs to perform data recovery, firstly, the control node allocates the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in each storage node. Specifically, the control node reads all operation logs from each storage node, then obtains page numbers of data pages corresponding to each operation log, and calculates Hash values of each page number. And finally, according to the calculated Hash value corresponding to the operation log, sending the operation log to a storage node uniquely corresponding to the Hash value. After the operation logs are reassigned, each storage node may include operation logs corresponding to one or more data pages, but operation logs corresponding to the same data page are stored only in the same storage node 12.
S504, the storage node receives the operation log sent by the control node.
S505, merging the operation logs with the same hash value according to the operation sequence.
S506, playing back the combined operation log.
In the embodiment of the present invention, each storage node plays back the operation logs corresponding to the same data page stored in each storage node according to the operation sequence, so as to implement parallel data recovery of multiple storage nodes 12. Specifically, the storage node receives the operation logs sent by the control node, and then merges the operation logs with the same hash value according to the operation sequence of each operation log; finally, according to the operation sequence, playback operation is carried out on the combined operation logs.
Specifically, the step S506 may be to build a Hash table (Hash) and store the operation logs with the same Hash value in the same record of the Hash table according to the operation sequence.
S507, deleting the operation log which has been played back.
In the embodiment of the invention, when the operation log is played back, the operation log is deleted to release the storage space.
S508, detecting the version numbers in the current operation log and the previous operation log when the operation log is replayed, and pausing the replay when the version number after the operation in the current operation log is inconsistent with the version number before the operation in the current operation log until the operation log with the consistent version number appears, and then continuing to replay the operation log with the consistent version number.
In the embodiment of the invention, two version numbers before and after the operation of the corresponding data page are recorded in the operation log. Therefore, it can be further judged whether the operation log is missing. Specifically, when the operation log is played back, the version numbers of the operation log which is played back currently and the previous operation log can be detected, when the version number after the operation in the previous operation log is inconsistent with the version number before the operation in the current operation log, the operation log is indicated to be missed, so that the playback is paused until the operation log with the consistent version number appears, and the operation log with the consistent version number is played back continuously.
According to the data recovery method provided by the embodiment of the invention, the hash value of the page number of the data page corresponding to each operation log is calculated to redistribute each operation log, so that the operation logs corresponding to the same data page are uniquely distributed to the same storage node, then each storage node respectively merges the operation logs with the same hash value, and plays back the merged operation logs according to the operation sequence, thereby realizing parallel recovery of data, greatly improving the data recovery efficiency and shortening the data recovery time.
Example six
The foregoing describes the internal functions and structure of a data recovery system that may be implemented as an electronic device. Fig. 6 is a schematic structural diagram of an embodiment of an electronic device according to the present invention. As shown in fig. 6, the electronic device includes a memory 61 and a processor 62.
A memory 61 for storing a program. In addition to the programs described above, the memory 61 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 61 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 62 coupled to the memory 61, executing a program stored in the memory 61, causing the electronic device to:
the control node is used for re-distributing the operation logs corresponding to the same data page to the same storage node only according to the data pages corresponding to the operation logs in the storage node;
and controlling the storage nodes to play back according to the operation sequence respectively aiming at the operation logs corresponding to the same data page.
Further, as shown in fig. 6, the electronic device may further include: communication component 63, power component 64, audio component 65, display 66, and other components. Only some of the components are schematically shown in fig. 6, which does not mean that the electronic device only comprises the components shown in fig. 6.
The communication component 63 is configured to facilitate communication between the electronic device and other devices, either wired or wireless. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 63 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 63 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply assembly 64 provides power to the various components of the electronic device. Power supply components 64 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 65 is configured to output and/or input audio signals. For example, the audio component 65 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 61 or transmitted via the communication component 63. In some embodiments, audio assembly 65 further includes a speaker for outputting audio signals.
The display 66 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (12)

1. A data recovery system, comprising: the control node and the plurality of storage nodes,
the control node is used for reassigning the operation log corresponding to the same data page to the same storage node according to the data page corresponding to the operation log in the storage node;
the storage nodes are respectively used for playing back the operation logs corresponding to the same data page according to the operation sequence;
wherein the control node comprises:
the reading module is used for reading the operation log in the storage node;
the calculation module is used for obtaining page numbers of the data pages corresponding to the operation logs and calculating hash values of the page numbers;
and the sending module is used for sending the operation log to the storage node uniquely corresponding to the hash value according to the hash value corresponding to the operation log.
2. The data recovery system of claim 1, wherein the storage node comprises:
the receiving module is used for receiving the operation log sent by the control node;
the merging module is used for merging the operation logs with the same hash value according to the operation sequence;
and the playback module is used for playing back the combined operation logs according to the operation sequence.
3. The data recovery system of claim 2, wherein the merge module is specifically configured to create a hash table, and store the operation logs having the same hash value in the same record of the hash table according to the operation order.
4. The data recovery system of claim 2, wherein the playback module is further configured to delete the oplog that has been played back.
5. The data recovery system according to any one of claims 2 to 4, wherein the operation log has recorded therein two version numbers before and after the operation of the corresponding data page, the storage node further comprising:
the detection module is used for detecting the version numbers in the operation log and the previous operation log which are currently played back when the operation log is played back by the playback module, and indicating the playback module to pause playback when the version numbers after operation in the previous operation log are inconsistent with the version numbers before operation in the current operation log until the operation log with the consistent version numbers appears, and then indicating the playback module to continue playing back the operation log with the consistent version numbers.
6. A method of data recovery, comprising:
the control node allocates the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node;
the storage nodes play back the operation logs corresponding to the same data page according to the operation sequence;
the control node re-distributes the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node, and the control node comprises the following steps:
the control node reads an operation log in the storage node;
acquiring page numbers of data pages corresponding to the operation logs, and calculating hash values of the page numbers;
and sending the operation log to the storage node uniquely corresponding to the hash value according to the hash value corresponding to the operation log.
7. The data recovery method according to claim 6, wherein the storage node plays back in an operation sequence with respect to the operation log corresponding to the same data page, respectively, comprising:
the storage node receives the operation log sent by the control node;
merging the operation logs with the same hash value according to the operation sequence;
and playing back the merged operation log.
8. The data recovery method according to claim 7, wherein the merging the operation logs having the same hash value in the operation order includes:
and establishing a hash table, and storing the operation logs with the same hash value into the same record of the hash table according to the operation sequence.
9. The data recovery method of claim 7, further comprising:
deleting the operation log that has been played back.
10. The data recovery method according to any one of claims 7 to 9, wherein two version numbers before and after an operation of the corresponding data page are recorded in the operation log, the method further comprising:
and when the operation log is replayed, detecting the version numbers in the operation log which is replayed currently and the previous operation log, and when the version numbers after operation in the previous operation log are inconsistent with the version numbers before operation in the current operation log, pausing the replay until the operation log with the consistent version numbers appears, and then continuing to replay the operation log with the consistent version numbers.
11. An electronic device, comprising:
a memory for storing a program;
a processor for executing the program stored in the memory, causing the electronic device to:
the control node is used for re-distributing the operation logs corresponding to the same data page to the same storage node only according to the data pages corresponding to the operation logs in the storage node;
controlling the storage nodes to play back according to the operation sequence respectively aiming at the operation logs corresponding to the same data page;
the control node re-distributes the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node, and the control node comprises the following steps:
the control node reads an operation log in the storage node;
acquiring page numbers of data pages corresponding to the operation logs, and calculating hash values of the page numbers;
and sending the operation log to the storage node uniquely corresponding to the hash value according to the hash value corresponding to the operation log.
12. A computer-readable storage medium having instructions stored thereon, the instructions comprising:
the control node is used for re-distributing the operation logs corresponding to the same data page to the same storage node only according to the data pages corresponding to the operation logs in the storage node;
controlling the storage nodes to play back according to the operation sequence respectively aiming at the operation logs corresponding to the same data page;
the control node re-distributes the operation log corresponding to the same data page to the same storage node only according to the data page corresponding to the operation log in the storage node, and the control node comprises the following steps:
the control node reads an operation log in the storage node;
acquiring page numbers of data pages corresponding to the operation logs, and calculating hash values of the page numbers;
and sending the operation log to the storage node uniquely corresponding to the hash value according to the hash value corresponding to the operation log.
CN201910049270.4A 2019-01-18 2019-01-18 Data recovery system and method, electronic device, and computer-readable storage medium Active CN111459896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910049270.4A CN111459896B (en) 2019-01-18 2019-01-18 Data recovery system and method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910049270.4A CN111459896B (en) 2019-01-18 2019-01-18 Data recovery system and method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111459896A CN111459896A (en) 2020-07-28
CN111459896B true CN111459896B (en) 2023-05-02

Family

ID=71679739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910049270.4A Active CN111459896B (en) 2019-01-18 2019-01-18 Data recovery system and method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111459896B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045917A (en) * 2015-08-20 2015-11-11 北京百度网讯科技有限公司 Example-based distributed data recovery method and device
CN107153680A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 A kind of method and system of the online expanding node of distributed memory database
CN107852349A (en) * 2016-03-31 2018-03-27 慧与发展有限责任合伙企业 Transaction management for multi-node cluster
CN109033196A (en) * 2018-06-28 2018-12-18 北京奇虎科技有限公司 A kind of distributed data scheduling system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045917A (en) * 2015-08-20 2015-11-11 北京百度网讯科技有限公司 Example-based distributed data recovery method and device
CN107852349A (en) * 2016-03-31 2018-03-27 慧与发展有限责任合伙企业 Transaction management for multi-node cluster
CN107153680A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 A kind of method and system of the online expanding node of distributed memory database
CN109033196A (en) * 2018-06-28 2018-12-18 北京奇虎科技有限公司 A kind of distributed data scheduling system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
卢栋栋 ; 何清法 ; .基于多线程的并行实例恢复方法.计算机应用.2016,(04),全文. *
杨东 ; 谢菲 ; 杨晓刚 ; 何遵文 ; Sudong Yang ; .分布式数据库技术的研究与实现.电子科学技术.2015,(01),全文. *

Also Published As

Publication number Publication date
CN111459896A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
JP6348989B2 (en) Firmware restoration method, apparatus, terminal, program, and recording medium
US20150380058A1 (en) Method, device, terminal, and system for audio recording and playing
US20180255359A1 (en) Method for sharing a captured video clip and electronic device
US9384752B2 (en) Audio device and storage medium
CN103365551A (en) Method for bookmark function applicable in messenger application and electronic apparatus
EP2811399B1 (en) Method and terminal for starting music application
US20160309202A1 (en) Method, apparatus, and system for playing multimedia file
CN107318038B (en) Method for synchronizing video playing and comment, terminal equipment and storage medium
CN104580147A (en) Voice response method, device and system
CN112823519B (en) Video decoding method, device, electronic equipment and computer readable storage medium
US20160330423A1 (en) Video shooting method and apparatus
CN115278139A (en) Video processing method and device, electronic equipment and storage medium
CN113407356B (en) Data processing method, device, electronic equipment and storage medium
CN111459896B (en) Data recovery system and method, electronic device, and computer-readable storage medium
CN104156344A (en) Text editing method and text editing device
CN105550260A (en) Picture display method and device
JP2021530905A (en) Video processing methods, devices, terminals and storage media
CN106919679B (en) Log replay method, device and terminal applied to distributed file system
US20150009160A1 (en) Method of controlling touch and electronic device thereof
US8856251B2 (en) Picture processing method and apparatus for instant communication tool
CN105095026A (en) Superblock repair method and apparatus for EXT file system and intelligent device
US20170264962A1 (en) Method, system and computer program product
CN110362721B (en) Message track information processing method, system and device and electronic equipment
CN105446835A (en) Method and device for repairing system file
CN109040823B (en) Bookmark display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40034093

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210916

Address after: 310056 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou, Zhejiang

Applicant after: Alibaba (China) Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: ALIBABA GROUP HOLDING Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211231

Address after: 310000 No. 12, Zhuantang science and technology economic block, Xihu District, Hangzhou City, Zhejiang Province

Applicant after: Aliyun Computing Co.,Ltd.

Address before: 310056 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou, Zhejiang

Applicant before: Alibaba (China) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant