Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Database processing method, device and system

A processing method and database technology, which is applied in the database field, can solve the problems of high cost of standby nodes, high cost, delay of active and standby nodes, etc., and achieve the effects of reducing deployment costs, facilitating readability, and reducing data delay

Pending Publication Date: 2019-07-16
ALIBABA CLOUD COMPUTING LTD
View PDF4 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] There are at least two problems in the above implementation of read-write separation: 1) It is necessary to copy all the data of the primary node to the standby node, and the cost of the standby node is relatively high, and the more standby nodes, the higher the cost; 2) The standby node needs Apply the redo logs generated by the master node and keep them in sync. The possibility of master and backup delays is very high

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database processing method, device and system
  • Database processing method, device and system
  • Database processing method, device and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] like figure 2 As shown, the present embodiment provides a database processing method, including:

[0064] Step 201, when the master node executes the modify operation or write operation of the data record, the master node writes the redo log record generated by the modify operation or write operation into the shared storage node, and updates the corresponding dirty data page to The shared storage node;

[0065] Step 202, the replica node reads the redo log record from the shared storage node into memory, so as to reconstruct the data page through the redo log record when needed.

[0066] In this embodiment, the master node stores the redo log records and dirty data pages into the shared storage node, and the replica node can read the redo log records from the shared storage node, and reconstruct the data through the corresponding redo log records when necessary In this way, using a shared storage and multiple nodes realizes the separation of reading and writing of th...

Embodiment 2

[0078] A database processing system applied to relational databases, such as image 3 As shown, it includes: a master node 31, a replica node 32 and a shared storage node 33; wherein, the shared storage node is used to store data pages, rollback pages and redo log records from the master node;

[0079] The master node is configured to write the redo log record generated by the modification operation or write operation into the shared storage node, and write the corresponding dirty data page update to said shared storage node;

[0080] The replica node is configured to read the redo log record from the shared storage node into memory, so as to reconstruct the data page through the redo log record when needed.

[0081] In this embodiment, the master node 31 provides read and write access to users, the copy node 32 provides read-only access to users, and the shared storage node 33 stores data files, rollback files and redo log files, and the data The file contains data pages fr...

Embodiment 3

[0089] like Figure 4 As shown, the present embodiment provides a database system, which may include:

[0090] The write module 41 is configured to write the redo log record generated by the modification operation or the write operation from the master node into the shared storage node when the master node executes the modification operation or the write operation of the data record, and writes the corresponding The dirty data page is updated from the master node to the shared storage node;

[0091] The first reading module 42 is configured to read the redo log record from the shared storage node into the memory of the copy node, so that the copy node can reconstruct the data page through the redo log record when needed.

[0092] In this embodiment, the above-mentioned database processing device can be set in the database system described in the second embodiment. Wherein, the writing module 41 can be set in the master node, and the first reading module 42 can be set in the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a database processing method, device and system, and the method comprises the steps: enabling a main node to write a redo log record generated by a modification operation or awrite-in operation into a shared storage node when the main node executes the modification operation or the write-in operation of a data record, and updating a corresponding dirty data page to the shared storage node; and enabling the replica node to read the redo log record from the shared storage node into a memory, so that a data page can be reconstructed through the redo log record when needed. The deployment cost and the master-slave delay of the database for realizing read-write separation can be reduced.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a database processing method, device and system. Background technique [0002] At present, read-write separation solutions based on open source databases are generally implemented by replicating one or more replica nodes. For example, PostgreSQL or MySQL achieve read-write separation through replication. [0003] There are at least two problems in the above implementation of read-write separation: 1) It is necessary to copy all the data of the primary node to the standby node, and the cost of the standby node is relatively high, and the more standby nodes, the higher the cost; 2) The standby node needs Apply the redo logs generated by the master node and keep them synchronized, and the possibility of master and backup delays is very high. Contents of the invention [0004] The present application aims to solve at least one of the technical problems in the related art. [0...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/18G06F16/176G06F16/16G06F16/13G06F16/11G06F16/178
CPCG06F16/137G06F16/128G06F16/16G06F16/178G06F16/176G06F16/1815
Inventor 林晓斌翟卫祥周正中
Owner ALIBABA CLOUD COMPUTING LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products