Unlock instant, AI-driven research and patent intelligence for your innovation.

Data page disk refreshing method and device, equipment, and storage medium

A data page and flash disk technology, applied in the database field, can solve problems such as limitations, data pages that cannot continue to be repeated, and backup databases that cannot be allocated new ones, so as to achieve the effect of ensuring normal and stable operation

Active Publication Date: 2021-10-26
SHANGHAI DAMENG DATABASE
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the prior art, when the packet sequence number or log sequence of the log package being reproduced by the standby database is smaller than the packet sequence number or log sequence submitted by the primary database, at this time, the standby database replay needs to allocate new data pages, but the standby database appears If the data page cache is insufficient and cannot be allocated, the standby database will try to flush the allocated data pages to eliminate and release the available data page cache. The committed log sequence is relatively small. When trying to flush the data pages, it will be limited by the committed log sequence, so that some data pages cannot be flushed. As a result, the standby database cannot allocate new data pages and cannot continue to repeat, resulting in The library is abnormal and cannot provide read-only services to the outside world.

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
  • Data page disk refreshing method and device, equipment, and storage medium
  • Data page disk refreshing method and device, equipment, and storage medium
  • Data page disk refreshing method and device, equipment, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] figure 1 It is a flow chart of a data page flashing method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of flashing data pages in a database cluster. This method can be implemented by a data page flashing device. For execution, the device may be composed of hardware and / or software, and may generally be integrated into a device with a data page flashing function.

[0038]It should be noted that the data page flashing method provided in this embodiment is applied to a database cluster, and the database cluster includes a primary database and at least two standby databases, and the number of standby databases is an even number. A database cluster can be understood as a virtual single database logical image composed of multiple database servers, which can provide transparent data services to clients and maintain data synchronization in each database in the database cluster. The main database can be understood as a database t...

Embodiment 2

[0062] figure 2 It is a schematic structural diagram of a data page flashing device provided in Embodiment 2 of the present invention, which is set in a database cluster, and the database cluster includes a master database and at least two backup databases; the device includes:

[0063]Heartbeat message or log packet sending module 210, arranged in the main library, is used to send the log packet of heartbeat message or generation to each standby library; wherein, the first submitted log sequence is carried in the heartbeat message or log packet;

[0064] The log sequence obtaining module 220 is arranged in the standby database, and is used to extract the second submitted log sequence in the currently replayed log package and the largest log sequence in the last log package written to the local disk, and obtain the current pending log sequence. The page log sequence in the disk data page;

[0065] Disk brushing condition judging module 230, arranged in the standby library, i...

Embodiment 3

[0085] image 3 It is a schematic structural diagram of an electronic device provided by Embodiment 3 of the present invention. The device includes: a database cluster 30 , a processor 31 , a storage device 32 , an input device 33 and an output device 34 . The database cluster 30 in the electronic device includes a master library 301 and at least two backup libraries 302, and the number of backup libraries 302 is an even number, image 3 Take two backup databases 302 as an example. The number of processors 31 in the electronic device can be one or more, image 3 A processor 31 is taken as an example. The number of storage devices 32 in the electronic equipment can be one or more, image 3 Take a storage device 32 as an example. The database cluster 30, processor 31, storage device 32, input device 33, and output device 34 of the electronic device can be connected via a bus or in other ways, image 3 Take connection via bus as an example.

[0086] In this embodiment, 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 embodiment of the invention discloses a data page disk refreshing method and device, equipment, and a storage medium. The method is applied to a database cluster, wherein the database cluster comprises a main database and at least two standby databases; the method comprises the following steps: the main library sends heartbeat messages or generated log packets to each standby library; the standby libraries extract a second submitted log sequence in a currently replayed log packet and a maximum log sequence in the last log packet written into the local disk, and obtain a page log sequence in a current to-be-refreshed disk data page; the standby libraries judge whether the to-be-refreshed disk data page meets disk refreshing conditions or not according to a first submitted log sequence, the second submitted log sequence, the maximum log sequence and the page log sequence; if the disk refreshing conditions are met, writing data in the to-be-refreshed data page into a local disk. The problems of insufficient data page cache and replay jamming of the standby libraries can be avoided, so that the database cluster can be ensured to run properly and stably.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of databases, and in particular, to a method, device, device, and storage medium for flashing data pages. Background technique [0002] With the rapid development of information technology, databases play an extremely important role in daily work, business activities and people's lives. In order to avoid downtime during database use and unable to provide services normally, existing applications often adopt the method of building database clusters, that is, multiple databases are divided into main database and standby database, so that the standby database can continue to provide services when the main database is down. Serve. [0003] In order to ensure the data synchronization of each database in the database cluster, a log package is generated when data modification operations such as addition, deletion, and modification are performed on the main database, and the log package is sent...

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/27G06F16/21
CPCG06F16/27G06F16/21Y02D10/00
Inventor 王蒙蒙钱晨亮刘新宇
Owner SHANGHAI DAMENG DATABASE
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More