WO2021051492A1 - Database service node switching method, apparatus and device, and computer storage medium - Google Patents

Database service node switching method, apparatus and device, and computer storage medium Download PDF

Info

Publication number
WO2021051492A1
WO2021051492A1 PCT/CN2019/115396 CN2019115396W WO2021051492A1 WO 2021051492 A1 WO2021051492 A1 WO 2021051492A1 CN 2019115396 W CN2019115396 W CN 2019115396W WO 2021051492 A1 WO2021051492 A1 WO 2021051492A1
Authority
WO
WIPO (PCT)
Prior art keywords
service node
page
identifier
buffer
operation page
Prior art date
Application number
PCT/CN2019/115396
Other languages
French (fr)
Chinese (zh)
Inventor
田永江
杨维强
贾俊刚
黄平杰
林耘毅
周伟
朱鹏
黄炫淇
胡剑宇
周定邦
王龙
符涣涣
王汉福
莫淡先
刘宇明
郑丹
张多子
徐鑫
陈凯夫
李永平
郑庆芳
黄睿
Original Assignee
招商银行股份有限公司
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 招商银行股份有限公司 filed Critical 招商银行股份有限公司
Publication of WO2021051492A1 publication Critical patent/WO2021051492A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • This application relates to the field of computer technology, and in particular to a database service node switching method, device, equipment, and computer storage medium.
  • the service node In the process of network service, the service node will be affected by different factors, and the service node will be down. In order to keep the network service unaffected, a main service node and a standby service node are usually set up. When the main service node fails, The standby service node needs to copy based on the physical log to roll back the uncommitted transactions of the host, and then the standby server can provide the corresponding network services. That is to say, when the main service node just switches to the standby service node, it takes a certain amount of time to proceed. After recovery, the standby server can provide normal network services, so that there is a certain lag in service processing when the main and standby database service nodes are switched.
  • the main purpose of this application is to propose a database service node switching method, device, equipment, and computer storage medium, aiming to solve the technical problem that timely transaction processing cannot be performed when the current active and standby service nodes are switched.
  • the database service node switching method includes the following steps:
  • the first service node When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
  • the first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node;
  • the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switch of the second service node is recorded;
  • the second service node When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
  • the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  • this application also provides a database service node switching device
  • the database service node switching device includes:
  • the first receiving module is configured to, when the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
  • a processing buffer module configured for the first service node to process the operation page corresponding to the page identifier according to the operation request, and synchronize the processed operation page to the buffer service node;
  • the switching recording module is used to switch the second service node that is in communication with the first service node to the online state when the failure of the first service node is detected, and record the switching time of the state switching of the second service node;
  • the second receiving module is configured to, when the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
  • the query processing module is configured to, if the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  • this application also provides a database service node switching device
  • the database service node switching device includes: a memory, a processor, and a database stored in the memory and capable of running on the processor
  • a service node switching program which implements the steps of the database service node switching method described above when the database service node switching program is executed by the processor.
  • the present application also provides a computer storage medium, the computer storage medium stores a database service node switching program, and the database service node switching program is executed by a processor to realize the database service as described above. Steps of the node switching method.
  • This application provides a database service node switching method, device, equipment and computer storage medium.
  • the operation page is sent to the buffer service node.
  • the second service node takes the operation page from the buffer service node and performs an operation request on the operation page , The second service node does not need to stop for data recovery, so that the second service node can quickly process the operation request, reducing the time waste of the first service node and the second service node.
  • FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for switching a database service node according to this application;
  • FIG. 3 is a schematic diagram of a buffer service node in the first embodiment of a database service node switching method according to this application;
  • FIG. 4 is a schematic diagram of a specific scenario of the first embodiment of a method for switching a database service node of this application;
  • FIG. 5 is a schematic flowchart of a second embodiment of a method for switching a database service node according to this application;
  • FIG. 6 is a schematic flowchart of a third embodiment of a method for switching a database service node according to this application.
  • FIG. 7 is a schematic diagram of functional modules of an embodiment of an apparatus for switching a database service node of this application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the database service node switching device in the embodiment of the present application may be a PC or a server.
  • the database service node switching device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the structure of the database service node switching device shown in FIG. 1 does not constitute a limitation on the database service node switching device, and the database service node switching may include more or less components than shown in the figure, or a combination Certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a computer program corresponding to database service node switching (also called a database service node switching program).
  • database service node switching also called a database service node switching program
  • the network interface 1004 is mainly used to connect to the back-end server and communicate with the back-end server; the user interface 1003 is mainly used to connect to the client (user side) to communicate with the client; and the processor 1001 may be used to call the database service node switching program stored in the memory 1005, and the method implemented when the database service node switching program running on the processor is executed can refer to each embodiment of the database service node switching method of this application.
  • Figure 2 is a schematic flowchart of a first embodiment of a database service node switching method according to this application, and the method includes:
  • Step S10 When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request.
  • the database service node switching method in this embodiment is applied to the database service node switching device.
  • the database service node switching device is the hardware carrier of the database service node switching platform.
  • the database service node switching platform in this embodiment can be used as an intermediate platform for docking.
  • One service node also called the main service node, or Active node
  • the second service node also called the standby service node, or Standby node
  • the database service node switching platform can also be set in the first service node and/or the second service node. 2. On the service node.
  • a buffer service node is preset, and the buffer service node (also called AOP (Atomic Operation Page, atomic operation page) Server node), AOP Server node can be used as an intermediate platform to connect the first service node and the second service node.
  • AOP Atomic Operation Page, atomic operation page
  • the database service node switching device implements the steps of the database service node switching method in this embodiment when the database service node switching device is running, and the buffer service node is used to cache page operation information. .
  • the database service node switching device is set on the first service node and the second service node, and the AOP The Server node is used as an intermediate platform to connect the first service node and the second service node as an example.
  • the database service node switching device detects the first service node and the second service node, and executes the database service node switching method of this application, specifically :
  • the first service node receives the operation request.
  • the type of the operation request is not specifically limited, that is, the operation request can be a page editing request or a page access request, etc.
  • the trigger form of the operation request is not specifically limited, that is, the operation request can be a terminal automatic Triggered, for example, if the terminal is set to visit the xxx page every morning to obtain user access data, the terminal triggers an operation request every morning, and the terminal sends the operation request to the first service node; the operation request may also be actively triggered by the user.
  • the operation request can be a terminal automatic Triggered, for example, if the terminal is set to visit the xxx page every morning to obtain user access data, the terminal triggers an operation request every morning, and the terminal sends the operation request to the first service node; the operation request may also be actively triggered by the user.
  • the first service node When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request, where the page identifier refers to identification information that uniquely identifies the page, such as a page ID.
  • Step S20 The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node.
  • Step a1 the first service node queries the first data buffer pool of the first service node, and determines whether the first data buffer pool contains the operation page corresponding to the page identifier;
  • Step a2 if the first data buffer pool does not include the operation page corresponding to the page identifier, the first service node obtains the operation page corresponding to the page identifier from the first disk of the first service node;
  • Step a3 The first service node writes the operation page into the first data buffer pool, and processes the operation page according to the operation request.
  • the first service node queries the first data buffer pool of the first service node, the first service node searches for the operation page through the page identifier in the first data buffer pool, and if it is not found, the first service node starts from the first service node
  • the operation page corresponding to the read page identifier on the corresponding first disk the first service node saves the operation page read from the first disk in the first data buffer pool, and the first service node detects that the operation page enters the first data buffer pool.
  • the first service node processes the operation page according to the operation request, completes the modification of the operation page, and at the same time generates the Redo log in the Redo log buffer of the first data buffer pool according to the processing steps.
  • the Active node, Standby node and AOP are pre-established For the connection of the Server node, after the operation page processing is completed, the first service node synchronizes the processed operation page to the buffer service node, and at the same time, the first service node sends the operation page to the Standby node.
  • the specific implementation method for the first service node to synchronize the operation page to the buffer service node is:
  • the Active node connects to the AOP according to the configuration information Server node, Active node exchanges information with AOP Server, Active node gets AOP The memory address of the AOP pool on the Server. This memory address is mapped to the first data buffer address of the Active node (you need to ensure that the memory of the AOP pool is greater than the size of the data buffer pool on the Active node), and the Active node will modify the operation page
  • RDMA Remote Direct Memory Access remote direct memory data access, RDMA is produced to solve the delay of server-side data processing in network transmission.
  • RDMA transfers data directly to the storage area of the computer through the network, and quickly moves the data from a system to a remote system memory without any impact on the operating system, so that it does not require much computer processing functions. It eliminates the overhead of external memory copy and context switching, which can free up memory bandwidth and CPU cycles to improve application system performance) and synchronize to AOP. In the AOP page pool of the Server node.
  • the size of the memory (4100) of the AOP data page buffer service in the buffer service node is the same as the size of the data buffer (4002) of the Active database. Due to the size limitation of each memory registration area of RDMA, multiple RDMAs are registered Memory Region, AOP has a memory area dedicated to storing the IDs of all pages, each ID uniquely identifies a page, that is, the first service node synchronizes the operation page after the operation and the page identification of the operation page to the buffer service node through RDMA. .
  • the first service node After the processing of the operation page is completed, the first service node synchronizes the operation page and the identifier of the operation page to the buffer service node through the RDMA method.
  • the RDMA method can reduce the transmission time of the operation page and speed up the efficiency.
  • the first service node does not need the direct participation of the service node CPU according to the RDMA method.
  • the first service node directly synchronizes the operation pages to the buffer service node through RDMA, so that the second service node can continue to access these pages.
  • the second service node does not need to wait for Redo, and the Undo operation can read and write transactions when all the operations are completed, making RTO (Recovery Time Objective) is close to zero, specifically:
  • step S30 when the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switching of the second service node is recorded.
  • the database service node switching device detects the failure of the first service node, that is, the first service node is affected by hardware, software or other factors and cannot provide services normally, the first service node sends an alarm message and the database service node switches the device Receiving the alarm information sent by the first service node, the database service node switching device detects the failure of the first service node, the database service node switching device switches the second service node that is in communication with the first service node to the online state, and records the first service node 2. The switching time of the state switching of the service node.
  • TS Timestamp Snapshot
  • MVCC Multi Version concurrency control, multi-version concurrency control algorithm, a concurrency control algorithm that reads and writes without blocking.
  • Step S40 When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request.
  • the second service node After the state switch of the second service node, the second service node is online, and the second service node inherits the processing transaction of the first service node, that is, the second service node receives the operation request, and the second service node obtains the page in the operation request Identification and operating time.
  • the state of the second service node compares the sequence of the operation time and the switching time. If the operation time is after the switching time, that is, the operation request is newly triggered by the user after the switching of the first service node and the second service node, and the second service The node processes directly, that is, the second service node obtains the page identifier corresponding to the operation request, and the second service node obtains the operation page corresponding to the page identifier from its second disk or the second data buffer pool, and performs the operation on the operation page Request; if the operation time is before the switching time, that is, the operation request is before the first service node and the second service node are switched, the first service node has not completed the processing, and the first service node has not completed the processing before the failure occurs At this time, the second service node performs the following steps:
  • Step S50 If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  • the second service node queries the buffer service node, and the second service node obtains the operation page corresponding to the page identifier, and processes the operation according to the operation request page.
  • the second service node queries the buffer service node. If the buffer service node contains the operation page corresponding to the page identifier, the buffer service node uses RDMA write sends the page to the Standby node; causes the second service node to process the operation page according to the operation request.
  • the operation page is sent to the buffer service node.
  • the second service node takes the operation page from the buffer service node and performs an operation request on the operation page , The second service node does not need to stop for data recovery, so that the second service node can quickly process the operation request, reducing the time waste of the first service node and the second service node.
  • the Standby node takes over the service of the Active node. Record the time-stamped snapshot TS1 when Standby is upgraded to Active. This Active node is marked as Active’.
  • the recovery thread continues to work until the end of the Redo replay work. During the replay process, those pages whose TS is greater than the TS in the Redo log will be ignored. It turns out that Active’ nodes cannot process transactions during the recovery process, so the system is not yet available for this process.
  • Introducing AOP After pooling, the database can be accessed normally during the replay process, online Redo logs are generated, and the checkpoint mechanism can also work normally.
  • the pool fetches the corresponding page through the RDMA protocol, and overwrites the page at the corresponding position of the current data buffer, the transaction is executed normally, and the external service is not interrupted.
  • This embodiment is a refinement of step S30 in the first embodiment.
  • the difference between this embodiment and the above-mentioned embodiment lies in:
  • step S31 the first service node creates an atomic operation, the first service node processes the operation page corresponding to the page identifier according to the operation request, and generates a Redo log in the first data buffer pool of the first service node.
  • the first service node creates an atomic operation (atomic Operation refers to an operation that will not be interrupted by the thread scheduling mechanism; once this operation starts, it will run to the end without any context in between switch), the first service node processes the operation page corresponding to the page identifier according to the operation request, the first service node generates the operation-related Redo log, and the first service node guarantees the generated Redo log to the Redo log buffer in the first data buffer pool .
  • atomic Operation refers to an operation that will not be interrupted by the thread scheduling mechanism; once this operation starts, it will run to the end without any context in between switch
  • Step S32 When the atomic operation ends, the first service node adds a log mark to the Redo log.
  • the first service node When the first service node ends the atomic operation, the first service node adds a log mark to the Redo log. Specifically: the first service node also maintains a log identifier (PageLSN) for each operation page. Whenever an update operation occurs on a page, the operation stores the LSN of its log record in the Page of the page In the LSN domain. In the undo phase of recovery, the log record whose LSN value is less than or equal to the Page LSN value will not be executed on this page because its actions are already on this page.
  • PageLSN log identifier
  • the first service node places the LSN of the previous log record containing the same transaction in the Page for each log record In LSN, a transaction can be extracted from back to front without having to read the entire log.
  • Step S33 The first service node sends the Redo log containing the log identifier to the buffer service node in a remote direct memory data access manner.
  • the first service node sends the Redo log containing the log identifier to the buffer service node through remote direct memory data access.
  • the first service node creates an atomic operation execution operation request, which can prevent the operation request from being interrupted.
  • the first service node After the first service node ends the atomic operation, the first service node generates a log identifier and sends it to the buffer service node, ensuring the continuity of the operation page in the buffer service node.
  • This embodiment is a refinement of step S50 in the first embodiment.
  • the difference between this embodiment and the first embodiment lies in:
  • Step S51 if the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier;
  • the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier.
  • Step S52 If the operation page corresponding to the page identifier is not included in the buffer service node, the second service node queries the Redo log chain to obtain the operation page corresponding to the page identifier in the Redo log chain. The operation request processes the operation page.
  • the second service node queries the Redo log chain to obtain the operation page corresponding to the page identifier in the Redo log chain, and the second service node processes the operation page according to the operation request.
  • the first service node sends the operation page to the second service node, so as to back up the operation page sent by the first service node at the second service node, which specifically includes:
  • Step b1 The first service node sends the Redo log containing the log identifier to the second service node;
  • Step b2 the second service node receives the Redo log, and the second service node constructs a Redo log chain according to the log identifier of the Redo log, and generates an operation page corresponding to the page identifier;
  • Step b3 The second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it to the second disk of the second service node.
  • the first service node sends the Redo log containing the log identifier to the buffer service node through remote direct memory data access, and at the same time, the first service node uses TCP (TCP, Transmission Control Protocol) is a connection-oriented, reliable, byte stream-based transport layer communication protocol) protocol.
  • TCP Transmission Control Protocol
  • the first service node sends the Redo log containing the log identifier to the second service node.
  • the second service node receives the Redo log sent by the first service node, the second service node obtains the log identifier of the Redo log, where the log identifier contains the operation time, and the second service node constructs the Redo log chain according to the operation time of each Redo log. And generate the operation page corresponding to the page identifier; the second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it to the second disk of the second service node.
  • the first service node sends the Redo log containing the log identifier to the second service node, so that the second service node can restore the operation operation page according to the Redo log.
  • it includes: analysis phase: determining which transactions are required Undo, which pages were dirty at the time of the crash, and which LSN the redo phase should start from; Redo phase: Start from the position determined in the analysis phase, perform redo, restore the operating page to the state before the crash, and handle it
  • some special Redo-only logs will be generated, called Compensation Logging CLR (Compensation Log Record, compensation log record), there is an extra in the CLR called Undo.
  • the second service node also needs to perform the undo phase: this phase rolls back the incomplete transactions when the crash occurred.
  • the first service node when the first service node sends the operation page information to the buffer service node, it also sends it to the second service node, so that after the second service node is switched, the second service node can use the backup operation page to perform the operation request.
  • the first service node performs repeated operation data transmission, which can effectively reduce the risk of database service node switching.
  • Step S53 If the operation page corresponding to the page identifier is included in the cache service node, the second service node obtains the operation page from the cache service node through remote direct memory data access, and processes the operation according to the operation request page.
  • Step c1 if the operation page corresponding to the page identifier is included in the buffer service node, the second service node determines whether the Redo log chain of the second service node includes the operation page corresponding to the page identifier;
  • Step c2 If the operation page corresponding to the page identifier is included in the Redo log chain, the second service node compares the operation page in the buffer service node with the operation page in the Redo log chain to determine the latest operation page;
  • Step c3 If the operation page in the buffer service node is the latest operation page, the second service node processes the latest operation page according to the operation request, and marks the operation page in the Redo log chain as a dirty page and deletes it;
  • Step c4 If the operation page in the Redo log chain is the latest operation page, the second service node performs page redo to obtain the latest operation page, and processes the latest operation page according to the operation request.
  • the second service node determines whether the Redo log chain of the second service node contains the operation page corresponding to the page identifier; if the Redo log chain includes the operation page corresponding to the page identifier , The second service node compares the operation page in the buffer service node with the operation page in the Redo log chain to determine the latest operation page; specifically, the second service node compares the page modification time of the operation page in the buffer service node with The page modification time of the operation page in the Redo log chain is compared.
  • the second service node processes the latest operation page according to the operation request, and compares the operation in the Redo log chain
  • the page is marked as dirty page (dirty page refers to the page in the data buffer, if it is changed after being read from the disk after transaction modification, such page is called dirty page) and deleted; if the redo log chain
  • the operation page is the latest operation page, and the second service node performs page redo to obtain the latest operation page, and processes the latest operation page according to the operation request.
  • the second service node obtains the operation page at the buffer service node, and the second service node queries the operation page sent by the first service node and determines the latest operation page to process the latest operation page.
  • the page in the cache service node is not the latest operation page.
  • the present application also provides a database service node switching device
  • the database service node switching device includes:
  • the first receiving module 10 is configured to, when the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
  • the processing buffer module 20 is used for the first service node to process the operation page corresponding to the page identifier according to the operation request, and synchronize the processed operation page to the buffer service node;
  • the switching recording module 30 is configured to switch the second service node that is in communication with the first service node to the online state when the failure of the first service node is detected, and record the switching time of the state switching of the second service node;
  • the second receiving module 40 is configured to, when the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
  • the query processing module 50 is configured to, if the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.

Abstract

A database service node switching method, apparatus and device, and a computer storage medium. The method comprises: when a first service node receives an operation request, the first service node acquiring a page identifier corresponding to the operation request (S10); processing, according to the operation request, an operation page corresponding to the page identifier, and synchronizing the processed operation page to a cache service node (S20); when a failure of the first service node is detected, switching a second service node, which is in communication connection with the first service node, to an online state, and recording the switching time of the state switching of the second service node (S30); when the second service node receives the operation request, the second service node acquiring the page identifier and an operation time in the operation request (S40); and if the operation time is prior to the switching time, the second service node querying the cache service node, acquiring the operation page corresponding to the page identifier, and processing the operation page according to the operation request (S50). By means of the method, the waiting time for the switching between master and slave database service nodes is shortened.

Description

数据库服务节点切换方法、装置、设备及计算机存储介质 Database service node switching method, device, equipment and computer storage medium To
本申请要求于2019年09月18日提交中国专利局、申请号为201910883949.3、发明名称为“服务节点切换方法、装置、设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910883949.3, and the invention title is "service node switching method, device, equipment and computer storage medium" on September 18, 2019, the entire content of which is incorporated by reference Incorporate in the application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及数据库服务节点切换方法、装置、设备及计算机存储介质。This application relates to the field of computer technology, and in particular to a database service node switching method, device, equipment, and computer storage medium.
背景技术Background technique
随着计算机技术的飞速发展,网络服务越来越常见,网络服务依赖于数据库、软件程序和硬件结构。With the rapid development of computer technology, network services are becoming more and more common, and network services rely on databases, software programs and hardware structures.
在网络服务的过程中服务节点会受到不同因素的影响,出现服务节点宕机的情况,为了使得网络服务不受影响,通常设置一个主服务节点和一个备服务节点,主服务节点出现故障时,备服务节点需要基于物理日志的复制,回滚掉主机未提交的事务,然后备服务器才可以来提供相应的网络服务,也就是说主服务节点刚切换到备服务节点时,需要一定的时间进行恢复,备服务器才可以提供正常的网络服务,使得主备数据库服务节点切换时服务处理存在一定滞后性。In the process of network service, the service node will be affected by different factors, and the service node will be down. In order to keep the network service unaffected, a main service node and a standby service node are usually set up. When the main service node fails, The standby service node needs to copy based on the physical log to roll back the uncommitted transactions of the host, and then the standby server can provide the corresponding network services. That is to say, when the main service node just switches to the standby service node, it takes a certain amount of time to proceed. After recovery, the standby server can provide normal network services, so that there is a certain lag in service processing when the main and standby database service nodes are switched.
发明内容Summary of the invention
本申请的主要目的在于提出一种数据库服务节点切换方法、装置、设备及计算机存储介质,旨在解决当前主备服务节点进行切换时,不可以进行及时事务处理的技术问题。The main purpose of this application is to propose a database service node switching method, device, equipment, and computer storage medium, aiming to solve the technical problem that timely transaction processing cannot be performed when the current active and standby service nodes are switched.
为实现上述目的,本申请提供一种数据库服务节点切换方法,所述数据库服务节点切换方法包括如下步骤:In order to achieve the above objective, the present application provides a database service node switching method. The database service node switching method includes the following steps:
在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node;
在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;When the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switch of the second service node is recorded;
在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
此外,为实现上述目的,本申请还提供一种数据库服务节点切换装置,所述数据库服务节点切换装置包括:In addition, in order to achieve the above object, this application also provides a database service node switching device, the database service node switching device includes:
第一接收模块,用于在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;The first receiving module is configured to, when the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
处理缓冲模块,用于第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;A processing buffer module, configured for the first service node to process the operation page corresponding to the page identifier according to the operation request, and synchronize the processed operation page to the buffer service node;
切换记录模块,用于在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;The switching recording module is used to switch the second service node that is in communication with the first service node to the online state when the failure of the first service node is detected, and record the switching time of the state switching of the second service node;
第二接收模块,用于在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;The second receiving module is configured to, when the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
查询处理模块,用于若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。The query processing module is configured to, if the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
此外,为实现上述目的,本申请还提供一种数据库服务节点切换设备,所述数据库服务节点切换设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据库服务节点切换程序,所述数据库服务节点切换程序被所述处理器执行时实现如上所述的数据库服务节点切换方法的步骤。In addition, in order to achieve the above object, this application also provides a database service node switching device, the database service node switching device includes: a memory, a processor, and a database stored in the memory and capable of running on the processor A service node switching program, which implements the steps of the database service node switching method described above when the database service node switching program is executed by the processor.
此外,为实现上述目的,本申请还提供一种计算机存储介质,所述计算机存储介质上存储有数据库服务节点切换程序,所述数据库服务节点切换程序被处理器执行时实现如上所述的数据库服务节点切换方法的步骤。In addition, in order to achieve the above object, the present application also provides a computer storage medium, the computer storage medium stores a database service node switching program, and the database service node switching program is executed by a processor to realize the database service as described above. Steps of the node switching method.
本申请提供一种数据库服务节点切换方法、装置、设备及计算机存储介质。本申请实施例中第一服务节点正常操作时,将操作页面发送至缓冲服务节点,第一服务节点故障时,第二服务节点从缓冲服务节点中拿取操作页面,并对操作页面执行操作请求,第二服务节点不需要停下进行数据恢复,使得第二服务节点可以快速地处理操作请求,减少了第一服务节点和第二服务节点的时间浪费。This application provides a database service node switching method, device, equipment and computer storage medium. In the embodiment of the present application, when the first service node is operating normally, the operation page is sent to the buffer service node. When the first service node fails, the second service node takes the operation page from the buffer service node and performs an operation request on the operation page , The second service node does not need to stop for data recovery, so that the second service node can quickly process the operation request, reducing the time waste of the first service node and the second service node.
附图说明Description of the drawings
图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图;FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application;
图2为本申请数据库服务节点切换方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a method for switching a database service node according to this application;
图3为本申请数据库服务节点切换方法第一实施例中缓冲服务节点的示意图;3 is a schematic diagram of a buffer service node in the first embodiment of a database service node switching method according to this application;
图4为本申请数据库服务节点切换方法第一实施例的具体场景示意图;4 is a schematic diagram of a specific scenario of the first embodiment of a method for switching a database service node of this application;
图5为本申请数据库服务节点切换方法第二实施例的流程示意图;5 is a schematic flowchart of a second embodiment of a method for switching a database service node according to this application;
图6为本申请数据库服务节点切换方法第三实施例的流程示意图;6 is a schematic flowchart of a third embodiment of a method for switching a database service node according to this application;
图7为本申请数据库服务节点切换装置一实施例的功能模块示意图。FIG. 7 is a schematic diagram of functional modules of an embodiment of an apparatus for switching a database service node of this application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1, FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请实施例数据库服务节点切换设备可以是PC机或服务器。The database service node switching device in the embodiment of the present application may be a PC or a server.
如图1所示,该数据库服务节点切换设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the database service node switching device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的数据库服务节点切换设备结构并不构成对数据库服务节点切换设备的限定,数据库服务节点切换可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the database service node switching device shown in FIG. 1 does not constitute a limitation on the database service node switching device, and the database service node switching may include more or less components than shown in the figure, or a combination Certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及数据库服务节点切换对应的计算机程序(又叫数据库服务节点切换程序)。As shown in FIG. 1, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a computer program corresponding to database service node switching (also called a database service node switching program).
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的数据库服务节点切换程序,处理器上运行的数据库服务节点切换程序被执行时所实现的方法可参照本申请数据库服务节点切换方法各个实施例。In the device shown in Figure 1, the network interface 1004 is mainly used to connect to the back-end server and communicate with the back-end server; the user interface 1003 is mainly used to connect to the client (user side) to communicate with the client; and the processor 1001 may be used to call the database service node switching program stored in the memory 1005, and the method implemented when the database service node switching program running on the processor is executed can refer to each embodiment of the database service node switching method of this application.
基于上述硬件结构,提出本申请数据库服务节点切换方法实施例。Based on the above hardware structure, an embodiment of the database service node switching method of this application is proposed.
参照图2,图2为本申请数据库服务节点切换方法第一实施例的流程示意图,所述方法包括:Referring to Figure 2, Figure 2 is a schematic flowchart of a first embodiment of a database service node switching method according to this application, and the method includes:
步骤S10,在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识。Step S10: When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request.
本实施例中的数据库服务节点切换方法应用于数据库服务节点切换设备,数据库服务节点切换设备是数据库服务节点切换平台的硬件载体,本实施例中的数据库服务节点切换平台可以作为一个中间平台对接第一服务节点(又叫主服务节点,或者Active节点)和第二服务节点(又叫备服务节点,或者Standby节点),此外,数据库服务节点切换平台还可以设置在第一服务节点和/或第二服务节点上。The database service node switching method in this embodiment is applied to the database service node switching device. The database service node switching device is the hardware carrier of the database service node switching platform. The database service node switching platform in this embodiment can be used as an intermediate platform for docking. One service node (also called the main service node, or Active node) and the second service node (also called the standby service node, or Standby node). In addition, the database service node switching platform can also be set in the first service node and/or the second service node. 2. On the service node.
本实施例中预先设置有缓冲服务节点,缓冲服务节点(又叫,AOP(Atomic Operation Page,原子操作页) Server节点),AOP Server节点可以作为一个中间平台对接第一服务节点和第二服务节点。In this embodiment, a buffer service node is preset, and the buffer service node (also called AOP (Atomic Operation Page, atomic operation page) Server node), AOP Server node can be used as an intermediate platform to connect the first service node and the second service node.
可以理解的是,数据库服务节点切换设备和缓冲服务节点实现的功能并不相同,数据库服务节点切换设备运行时实现本实施例中数据库服务节点切换方法的步骤,缓冲服务节点用于缓存页面操作信息。It is understandable that the functions implemented by the database service node switching device and the buffer service node are not the same. The database service node switching device implements the steps of the database service node switching method in this embodiment when the database service node switching device is running, and the buffer service node is used to cache page operation information. .
本实施例中,以数据库服务节点切换设备设置在第一服务节点和第二服务节点上,AOP Server节点作为一个中间平台对接第一服务节点和第二服务节点为例进行说明,数据库服务节点切换设备对第一服务节点和第二服务节点进行检测,执行本申请数据库服务节点切换方法,具体地:第一服务节点接收操作请求,操作请求的类型不作具体限定,即,操作请求可以是页面编辑请求或者页面访问请求等等,操作请求的触发形式不作具体限定,即,操作请求可以是终端自动触发的,例如,终端中设置每天凌晨访问xxx页面获取用户访问数据,则每天凌晨终端触发操作请求,终端将操作请求发送至第一服务节点;操作请求还可以是用户主动触发的。In this embodiment, the database service node switching device is set on the first service node and the second service node, and the AOP The Server node is used as an intermediate platform to connect the first service node and the second service node as an example. The database service node switching device detects the first service node and the second service node, and executes the database service node switching method of this application, specifically : The first service node receives the operation request. The type of the operation request is not specifically limited, that is, the operation request can be a page editing request or a page access request, etc. The trigger form of the operation request is not specifically limited, that is, the operation request can be a terminal automatic Triggered, for example, if the terminal is set to visit the xxx page every morning to obtain user access data, the terminal triggers an operation request every morning, and the terminal sends the operation request to the first service node; the operation request may also be actively triggered by the user.
在第一服务节点接收到操作请求时,第一服务节点获取操作请求对应的页面标识,其中,页面标识是指唯一识别页面的标识信息,例如页面ID。When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request, where the page identifier refers to identification information that uniquely identifies the page, such as a page ID.
步骤S20,第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点。Step S20: The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node.
具体地,包括:Specifically, it includes:
步骤a1,第一服务节点查询第一服务节点的第一数据缓冲池,并判断所述第一数据缓冲池中是否包含所述页面标识对应的操作页面;Step a1, the first service node queries the first data buffer pool of the first service node, and determines whether the first data buffer pool contains the operation page corresponding to the page identifier;
步骤a2,若所述第一数据缓冲池中不包含所述页面标识对应的操作页面,第一服务节点从第一服务节点的第一磁盘中获取所述页面标识对应的操作页面;Step a2, if the first data buffer pool does not include the operation page corresponding to the page identifier, the first service node obtains the operation page corresponding to the page identifier from the first disk of the first service node;
步骤a3,第一服务节点将所述操作页面写入所述第一数据缓冲池,并按所述操作请求处理所述操作页面。Step a3: The first service node writes the operation page into the first data buffer pool, and processes the operation page according to the operation request.
即,第一服务节点查询第一服务节点的第一数据缓冲池,第一服务节点到第一数据缓冲池中通过页面标识查找操作页面,如果没有找到,第一服务节点则从第一服务节点对应的第一磁盘上读取页面标识对应的操作页面,第一服务节点将从第一磁盘上读取到的操作页面保存第一数据缓冲池中,第一服务节点检测到操作页面进入第一数据缓冲池后,第一服务节点根据操作请求处理操作页面,完成对操作页面的修改,同时在第一数据缓冲池的Redo日志缓冲区中根据处理步骤生成Redo日志。That is, the first service node queries the first data buffer pool of the first service node, the first service node searches for the operation page through the page identifier in the first data buffer pool, and if it is not found, the first service node starts from the first service node The operation page corresponding to the read page identifier on the corresponding first disk, the first service node saves the operation page read from the first disk in the first data buffer pool, and the first service node detects that the operation page enters the first data buffer pool. After the data buffer pool, the first service node processes the operation page according to the operation request, completes the modification of the operation page, and at the same time generates the Redo log in the Redo log buffer of the first data buffer pool according to the processing steps.
本实施例中,预先建立Active节点、Standby节点和AOP Server节点的连接,在操作页面处理完成之后,第一服务节点将处理后的操作页面同步到缓冲服务节点,同时第一服务节点将操作页面发送到Standby节点。In this embodiment, the Active node, Standby node and AOP are pre-established For the connection of the Server node, after the operation page processing is completed, the first service node synchronizes the processed operation page to the buffer service node, and at the same time, the first service node sends the operation page to the Standby node.
第一服务节点将操作页面同步到缓冲服务节点的具体实现方式为: Active节点根据配置信息连接AOP Server节点,Active节点与AOP Server交换信息,Active节点获得AOP Server上AOP池的内存地址,该内存地址与Active节点本地的第一数据缓冲地址建立映射(需要保证AOP池的内存要大于Active节点上数据缓冲池的大小),Active节点将修改后的操作页面通过RDMA(Remote Direct Memory Access远程直接内存数据存取,RDMA是为了解决网络传输中服务器端数据处理的延迟而产生的。RDMA通过网络把资料直接传入计算机的存储区,将数据从一个***快速移动到远程***存储器中,而不对操作***造成任何影响,这样就不需要用到多少计算机的处理功能。它消除了外部存储器复制和上下文切换的开销,因而能解放内存带宽和CPU周期用于改进应用***性能)的方式同步到AOP Server节点的AOP页面池中。The specific implementation method for the first service node to synchronize the operation page to the buffer service node is: The Active node connects to the AOP according to the configuration information Server node, Active node exchanges information with AOP Server, Active node gets AOP The memory address of the AOP pool on the Server. This memory address is mapped to the first data buffer address of the Active node (you need to ensure that the memory of the AOP pool is greater than the size of the data buffer pool on the Active node), and the Active node will modify the operation page Through RDMA (Remote Direct Memory Access remote direct memory data access, RDMA is produced to solve the delay of server-side data processing in network transmission. RDMA transfers data directly to the storage area of the computer through the network, and quickly moves the data from a system to a remote system memory without any impact on the operating system, so that it does not require much computer processing functions. It eliminates the overhead of external memory copy and context switching, which can free up memory bandwidth and CPU cycles to improve application system performance) and synchronize to AOP. In the AOP page pool of the Server node.
结合图3,缓冲服务节点中AOP数据页面缓冲服务的内存(4100)大小和Active数据库的数据缓冲(4002)的大小相同由于RDMA每个内存注册区域的大小限制,注册多个RDMA Memory Region,AOP有一块内存区域专门存放所有页面的ID,每一个ID唯一标示一个页面,即,第一服务节点将操作之后的操作页面,和操作页面的页面标识通过RDMA的方式同步到缓冲服务节点。Combined with Figure 3, the size of the memory (4100) of the AOP data page buffer service in the buffer service node is the same as the size of the data buffer (4002) of the Active database. Due to the size limitation of each memory registration area of RDMA, multiple RDMAs are registered Memory Region, AOP has a memory area dedicated to storing the IDs of all pages, each ID uniquely identifies a page, that is, the first service node synchronizes the operation page after the operation and the page identification of the operation page to the buffer service node through RDMA. .
在操作页面处理完成之后,第一服务节点通过RDMA的方式将操作页面和操作页面的标识同步到缓冲服务节点,RDMA的方式可以减少操作页面的传输时间,加快效率。After the processing of the operation page is completed, the first service node synchronizes the operation page and the identifier of the operation page to the buffer service node through the RDMA method. The RDMA method can reduce the transmission time of the operation page and speed up the efficiency.
本实施例中,第一服务节点根据RDMA的方式无需服务节点CPU直接参与的特点,第一服务节点通过RDMA直接将操作页面同步到缓冲服务节点中,使得第二服务节点可以继续访问这些页面,使得第二服务节点无需等待Redo,Undo操作全部完成就可读写事务,使得RTO(Recovery Time Objective复原时间目标)接近零,具体地:In this embodiment, the first service node does not need the direct participation of the service node CPU according to the RDMA method. The first service node directly synchronizes the operation pages to the buffer service node through RDMA, so that the second service node can continue to access these pages. The second service node does not need to wait for Redo, and the Undo operation can read and write transactions when all the operations are completed, making RTO (Recovery Time Objective) is close to zero, specifically:
步骤S30,在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间。In step S30, when the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switching of the second service node is recorded.
数据库服务节点切换设备在检测到第一服务节点故障时,即,第一服务节点受到硬件、软件或者其他因素影响,不可以正常提供服务时,第一服务节点发送报警信息,数据库服务节点切换设备接收第一服务节点发送的报警信息,数据库服务节点切换设备在检测到第一服务节点故障,数据库服务节点切换设备将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间。When the database service node switching device detects the failure of the first service node, that is, the first service node is affected by hardware, software or other factors and cannot provide services normally, the first service node sends an alarm message and the database service node switches the device Receiving the alarm information sent by the first service node, the database service node switching device detects the failure of the first service node, the database service node switching device switches the second service node that is in communication with the first service node to the online state, and records the first service node 2. The switching time of the state switching of the service node.
即,数据库服务节点切换设备在第二服务节点状态切换时,数据库服务节点切换设备记录时间戳的快照(Timestamp Snapshot简称TS),使得第二服务器节点可以采用MVCC(Multi Version concurrency control,多版本并发控制算法,一种读写不阻塞的并发控制算法,该算法的原理是,当操作页面的某个元组发生修改的时候,其历史版本并不会被马上删除,而是保存下来,通过事务快照来判断元组的可见性)处理时间戳的快照,第二服务节点根据MVCC做可见性判断,这样主备服务节点之间不需要传递其他的事务快照信息,具体地:That is, when the database service node switching device switches the state of the second service node, the database service node switching device records a snapshot of the timestamp (Timestamp Snapshot is abbreviated as TS), so that the second server node can use MVCC (Multi Version concurrency control, multi-version concurrency control algorithm, a concurrency control algorithm that reads and writes without blocking. The principle of this algorithm is that when a tuple of the operation page is modified, its historical version will not be deleted immediately, but Save it and judge the visibility of tuples through transaction snapshots) Process the time stamped snapshots, and the second service node will make visibility judgments based on MVCC, so that there is no need to transfer other transaction snapshot information between the active and standby service nodes, specifically:
步骤S40,在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间。Step S40: When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request.
在第二服务节点状态切换之后,第二服务节点处于上线状态,第二服务节点承继第一服务节点的处理事务,即,第二服务节点接收操作请求,第二服务节点获取操作请求中的页面标识和操作时间。After the state switch of the second service node, the second service node is online, and the second service node inherits the processing transaction of the first service node, that is, the second service node receives the operation request, and the second service node obtains the page in the operation request Identification and operating time.
第二服务节点状态比较操作时间和切换时间的先后顺序,若操作时间在所述切换时间之后,即,该操作请求是第一服务节点和第二服务节点切换之后用户新触发的,第二服务节点直接处理,即,第二服务节点获取操作请求对应的页面标识,第二服务节点从自身的第二磁盘或者第二数据缓冲池获取页面标识对应的操作页面,并对该操作页面执行该操作请求;若操作时间在所述切换时间之前,即,该操作请求是第一服务节点和第二服务节点切换之前,第一服务节点没有处理完成的,第一服务节点没有处理完成就出现的故障,此时,第二服务节点执行下述步骤:The state of the second service node compares the sequence of the operation time and the switching time. If the operation time is after the switching time, that is, the operation request is newly triggered by the user after the switching of the first service node and the second service node, and the second service The node processes directly, that is, the second service node obtains the page identifier corresponding to the operation request, and the second service node obtains the operation page corresponding to the page identifier from its second disk or the second data buffer pool, and performs the operation on the operation page Request; if the operation time is before the switching time, that is, the operation request is before the first service node and the second service node are switched, the first service node has not completed the processing, and the first service node has not completed the processing before the failure occurs At this time, the second service node performs the following steps:
步骤S50,若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。Step S50: If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
若操作时间在切换时间之前,该操作请求为第一服务节点没有执行完成的,第二服务节点查询缓冲服务节点,第二服务节点获取页面标识对应的操作页面,并按操作请求处理所述操作页面。If the operation time is before the switching time, the operation request is not completed by the first service node, the second service node queries the buffer service node, and the second service node obtains the operation page corresponding to the page identifier, and processes the operation according to the operation request page.
结合图4,第二服务节点查询缓冲服务节点,若缓冲服务节点中包含页面标识对应的操作页面,缓冲服务节点通过RDMA write将页面发送给Standby节点;使得第二服务节点按操作请求处理操作页面。With reference to Figure 4, the second service node queries the buffer service node. If the buffer service node contains the operation page corresponding to the page identifier, the buffer service node uses RDMA write sends the page to the Standby node; causes the second service node to process the operation page according to the operation request.
本申请实施例中第一服务节点正常操作时,将操作页面发送至缓冲服务节点,第一服务节点故障时,第二服务节点从缓冲服务节点中拿取操作页面,并对操作页面执行操作请求,第二服务节点不需要停下进行数据恢复,使得第二服务节点可以快速地处理操作请求,减少了第一服务节点和第二服务节点的时间浪费。In the embodiment of the present application, when the first service node is operating normally, the operation page is sent to the buffer service node. When the first service node fails, the second service node takes the operation page from the buffer service node and performs an operation request on the operation page , The second service node does not need to stop for data recovery, so that the second service node can quickly process the operation request, reducing the time waste of the first service node and the second service node.
可以理解的是:当Active节点出现故障以后,假设仲裁逻辑已经做出判断,Standby节点接管Active节点的服务。记录下Standby升级为Active时的时间戳快照TS1,此Active节点记为Active’。此时的恢复线程继续工作直到Redo重放工作结束,重放过程中会忽略那些页面的TS大于Redo日志中的TS的页面。原来在恢复过程中Active’节点是无法处理事务的,所以这个过程***还不可用。引入AOP 池以后,重放过程中数据库可以正常访问,产生在线的Redo日志,检查点机制也可以正常工作。当页面上的TS小于TS1时直接从AOP Server的AOP 池通过RDMA协议中取相应的页面,覆盖到当前的数据缓冲的对应位置的页面上面,事务正常执行,对外提供服务不中断。It is understandable that when the Active node fails, assuming that the arbitration logic has made a judgment, the Standby node takes over the service of the Active node. Record the time-stamped snapshot TS1 when Standby is upgraded to Active. This Active node is marked as Active’. At this time, the recovery thread continues to work until the end of the Redo replay work. During the replay process, those pages whose TS is greater than the TS in the Redo log will be ignored. It turns out that Active’ nodes cannot process transactions during the recovery process, so the system is not yet available for this process. Introducing AOP After pooling, the database can be accessed normally during the replay process, online Redo logs are generated, and the checkpoint mechanism can also work normally. When the TS on the page is less than TS1, directly from the AOP of the AOP Server The pool fetches the corresponding page through the RDMA protocol, and overwrites the page at the corresponding position of the current data buffer, the transaction is executed normally, and the external service is not interrupted.
进一步地,参考图5,基于本申请数据库服务节点切换方法第一实施例,提出本申请数据库服务节点切换方法第二实施例。Further, referring to FIG. 5, based on the first embodiment of the database service node switching method of the present application, a second embodiment of the database service node switching method of the present application is proposed.
本实施例是第一实施例中步骤S30的细化,本实施例于上述实施例的区别在于:This embodiment is a refinement of step S30 in the first embodiment. The difference between this embodiment and the above-mentioned embodiment lies in:
步骤S31,第一服务节点创建原子操作,第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并在第一服务节点的第一数据缓冲池中生成Redo日志。In step S31, the first service node creates an atomic operation, the first service node processes the operation page corresponding to the page identifier according to the operation request, and generates a Redo log in the first data buffer pool of the first service node.
本实施例中,第一服务节点创建原子操作(atomic operation指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束,中间不会有任何 context switch),第一服务节点按操作请求处理页面标识对应的操作页面,第一服务节点生成操作相关的Redo日志,第一服务节点将生成的Redo日志保证至第一数据缓冲池中Redo日志缓冲区。In this embodiment, the first service node creates an atomic operation (atomic Operation refers to an operation that will not be interrupted by the thread scheduling mechanism; once this operation starts, it will run to the end without any context in between switch), the first service node processes the operation page corresponding to the page identifier according to the operation request, the first service node generates the operation-related Redo log, and the first service node guarantees the generated Redo log to the Redo log buffer in the first data buffer pool .
步骤S32,在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记。Step S32: When the atomic operation ends, the first service node adds a log mark to the Redo log.
第一服务节点在原子操作结束时,第一服务节点为Redo日志添加日志标记,具体地:第一服务节点为每一个操作页面也维护一个日志标识(PageLSN)。每当一个更新操作发生在某页上时,该操作将其日志记录的LSN存储在该页的Page LSN域中。在恢复的撤销阶段,LSN值小于或等于Page LSN值的日志记录将不在该页上执行,因为它的动作已经在该页上了。When the first service node ends the atomic operation, the first service node adds a log mark to the Redo log. Specifically: the first service node also maintains a log identifier (PageLSN) for each operation page. Whenever an update operation occurs on a page, the operation stores the LSN of its log record in the Page of the page In the LSN domain. In the undo phase of recovery, the log record whose LSN value is less than or equal to the Page LSN value will not be executed on this page because its actions are already on this page.
本实施例中,第一服务节点为每个日志记录包含同一事务的前一日志记录的LSN放在Page LSN中,使得一个事务可以由后向前提取,而不必读整个日志。In this embodiment, the first service node places the LSN of the previous log record containing the same transaction in the Page for each log record In LSN, a transaction can be extracted from back to front without having to read the entire log.
步骤S33,第一服务节点将包含所述日志标识的Redo日志通过远程直接内存数据存取方式发送至缓冲服务节点。Step S33: The first service node sends the Redo log containing the log identifier to the buffer service node in a remote direct memory data access manner.
第一服务节点将包含日志标识的Redo日志通过远程直接内存数据存取方式发送至缓冲服务节点,本实施例中,第一服务节点创建原子操作执行操作请求,可以防止操过请求被打断,第一服务节点在原子操作结束之后,第一服务节点生成日志标识,并发送至缓冲服务节点,保证了缓冲服务节点中操作页面的连续性。The first service node sends the Redo log containing the log identifier to the buffer service node through remote direct memory data access. In this embodiment, the first service node creates an atomic operation execution operation request, which can prevent the operation request from being interrupted. After the first service node ends the atomic operation, the first service node generates a log identifier and sends it to the buffer service node, ensuring the continuity of the operation page in the buffer service node.
进一步地,参考图6,在本申请数据库服务节点切换方法上述实施例的基础上,提出本申请数据库服务节点切换方法第三实施例。Further, referring to FIG. 6, on the basis of the foregoing embodiment of the database service node switching method of the present application, a third embodiment of the database service node switching method of the present application is proposed.
本实施是第一实施例中步骤S50的细化,本实施例与第一实施例的区别在于:This embodiment is a refinement of step S50 in the first embodiment. The difference between this embodiment and the first embodiment lies in:
步骤S51,若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含所述页面标识对应的操作页面;Step S51, if the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier;
若操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含页面标识对应的操作页面。If the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier.
步骤S52,若缓冲服务节点中不包含所述页面标识对应的操作页面,第二服务节点查询Redo日志链,获取所述Redo日志链中所述页面标识对应的操作页面,第二服务节点按所述操作请求处理所述操作页面。Step S52: If the operation page corresponding to the page identifier is not included in the buffer service node, the second service node queries the Redo log chain to obtain the operation page corresponding to the page identifier in the Redo log chain. The operation request processes the operation page.
若缓冲服务节点中不包含页面标识对应的操作页面,第二服务节点查询Redo日志链,获取Redo日志链中页面标识对应的操作页面,第二服务节点按操作请求处理操作页面。If the buffer service node does not include the operation page corresponding to the page identifier, the second service node queries the Redo log chain to obtain the operation page corresponding to the page identifier in the Redo log chain, and the second service node processes the operation page according to the operation request.
本实施例中,第一服务节点将操作页面发送至第二服务节点,以在第二服务节点备份第一服务节点发送的操作页面,具体地,包括:In this embodiment, the first service node sends the operation page to the second service node, so as to back up the operation page sent by the first service node at the second service node, which specifically includes:
步骤b1,第一服务节点将包含所述日志标识的Redo日志发送至第二服务节点;Step b1: The first service node sends the Redo log containing the log identifier to the second service node;
步骤b2,第二服务节点接收所述Redo日志,第二服务节点按照所述Redo日志的日志标识构建Redo日志链,并生成所述页面标识对应的操作页面;Step b2, the second service node receives the Redo log, and the second service node constructs a Redo log chain according to the log identifier of the Redo log, and generates an operation page corresponding to the page identifier;
步骤b3,第二服务节点将生成的所述操作页面存储在第二服务节点的第二数据缓冲池中,并持久化到第二服务节点的第二磁盘中。Step b3: The second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it to the second disk of the second service node.
即,第一服务节点处理完成操作页面之后,第一服务节点将包含日志标识的Redo日志通过远程直接内存数据存取的方式发送给缓冲服务节点的同时,第一服务节点通过TCP(TCP,Transmission Control Protocol)是一种面向连接的、可靠的、基于字节流的传输层通信协议)协议,第一服务节点将包含日志标识的Redo日志发送至第二服务节点。That is, after the first service node processes the operation page, the first service node sends the Redo log containing the log identifier to the buffer service node through remote direct memory data access, and at the same time, the first service node uses TCP (TCP, Transmission Control Protocol) is a connection-oriented, reliable, byte stream-based transport layer communication protocol) protocol. The first service node sends the Redo log containing the log identifier to the second service node.
第二服务节点接收第一服务节点发送的Redo日志,第二服务节点获取Redo日志的日志标识,其中,日志标识中包含操作时间,第二服务节点按照各个Redo日志的操作时间构建Redo日志链,并生成页面标识对应的操作页面;第二服务节点将生成的所述操作页面存储在第二服务节点的第二数据缓冲池中,并持久化到第二服务节点的第二磁盘中。The second service node receives the Redo log sent by the first service node, the second service node obtains the log identifier of the Redo log, where the log identifier contains the operation time, and the second service node constructs the Redo log chain according to the operation time of each Redo log. And generate the operation page corresponding to the page identifier; the second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it to the second disk of the second service node.
可以理解的是,第一服务节点将包含日志标识的Redo日志发送至第二服务节点,使得第二服务节点可以根据Redo日志进行操作操作页面还原,具体地,包括:分析阶段:决定哪些事务要撤销,哪些页在崩溃时是脏的,以及重做阶段应从哪个LSN开始;Redo阶段:从分析阶段决定的位置开始,执行重做,将操作页面恢复到发生崩溃前的状态,此外,进行处理的过程中会产生一些特殊的Redo-only的日志,称为补偿日志记录CLR(Compensation Log Record,补偿日志记录),CLR中还有额外的称为Undo,此时,第二服务节点还需要进行undo阶段:这一阶段回滚在发生崩溃时那些不完全的事务。It is understandable that the first service node sends the Redo log containing the log identifier to the second service node, so that the second service node can restore the operation operation page according to the Redo log. Specifically, it includes: analysis phase: determining which transactions are required Undo, which pages were dirty at the time of the crash, and which LSN the redo phase should start from; Redo phase: Start from the position determined in the analysis phase, perform redo, restore the operating page to the state before the crash, and handle it During the process, some special Redo-only logs will be generated, called Compensation Logging CLR (Compensation Log Record, compensation log record), there is an extra in the CLR called Undo. At this time, the second service node also needs to perform the undo phase: this phase rolls back the incomplete transactions when the crash occurred.
本实施例中,第一服务节点发送操作页面信息至缓冲服务节点的同时也发送至第二服务节点,使得在第二服务节点切换之后,第二服务节点可以利用备份的操作页面执行操作请求,本实施例中,第一服务节点进行重复的操作数据发送,可以有效地降低了数据库服务节点切换的风险。In this embodiment, when the first service node sends the operation page information to the buffer service node, it also sends it to the second service node, so that after the second service node is switched, the second service node can use the backup operation page to perform the operation request. In this embodiment, the first service node performs repeated operation data transmission, which can effectively reduce the risk of database service node switching.
步骤S53,若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点通过远程直接内存数据存取方式从缓冲服务节点获取所述操作页面,并按所述操作请求处理所述操作页面。Step S53: If the operation page corresponding to the page identifier is included in the cache service node, the second service node obtains the operation page from the cache service node through remote direct memory data access, and processes the operation according to the operation request page.
具体地,包括:Specifically, it includes:
步骤c1,若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点判断第二服务节点的Redo日志链中是否包含所述页面标识对应的操作页面;Step c1, if the operation page corresponding to the page identifier is included in the buffer service node, the second service node determines whether the Redo log chain of the second service node includes the operation page corresponding to the page identifier;
步骤c2,若所述Redo日志链中包含所述页面标识对应的操作页面,第二服务节点将缓冲服务节点中的操作页面与所述Redo日志链中的操作页面进行比对,确定最新的操作页面;Step c2: If the operation page corresponding to the page identifier is included in the Redo log chain, the second service node compares the operation page in the buffer service node with the operation page in the Redo log chain to determine the latest operation page;
步骤c3,若缓冲服务节点中的操作页面是最新的操作页面,第二服务节点按所述操作请求处理所述最新的操作页面,将Redo日志链中的操作页面标记为脏页面并删除; Step c3: If the operation page in the buffer service node is the latest operation page, the second service node processes the latest operation page according to the operation request, and marks the operation page in the Redo log chain as a dirty page and deletes it; To
步骤c4,若所述Redo日志链中的操作页面是最新的操作页面,第二服务节点则进行页面重做得到最新的操作页面,并按所述操作请求处理所述最新的操作页面。Step c4: If the operation page in the Redo log chain is the latest operation page, the second service node performs page redo to obtain the latest operation page, and processes the latest operation page according to the operation request.
即,若缓冲服务节点中包含页面标识对应的操作页面,第二服务节点判断第二服务节点的Redo日志链中是否包含页面标识对应的操作页面;若Redo日志链中包含页面标识对应的操作页面,第二服务节点将缓冲服务节点中的操作页面与Redo日志链中的操作页面进行比对,确定最新的操作页面;具体地,第二服务节点将缓冲服务节点中操作页面的页面修改时间与Redo日志链中操作页面的页面修改时间进行比对,若缓冲服务节点中的操作页面是最新的操作页面,第二服务节点按所述操作请求处理最新的操作页面,将Redo日志链中的操作页面标记为脏页面(脏页面是指在数据缓冲区的页面,如果从磁盘读上来以后经过事务的修改,发生了变化,这样的页面被称为脏页面)并删除;若Redo日志链中的操作页面是最新的操作页面,第二服务节点则进行页面重做得到最新的操作页面,并按操作请求处理所述最新的操作页面。That is, if the buffer service node contains the operation page corresponding to the page identifier, the second service node determines whether the Redo log chain of the second service node contains the operation page corresponding to the page identifier; if the Redo log chain includes the operation page corresponding to the page identifier , The second service node compares the operation page in the buffer service node with the operation page in the Redo log chain to determine the latest operation page; specifically, the second service node compares the page modification time of the operation page in the buffer service node with The page modification time of the operation page in the Redo log chain is compared. If the operation page in the buffer service node is the latest operation page, the second service node processes the latest operation page according to the operation request, and compares the operation in the Redo log chain The page is marked as dirty page (dirty page refers to the page in the data buffer, if it is changed after being read from the disk after transaction modification, such page is called dirty page) and deleted; if the redo log chain The operation page is the latest operation page, and the second service node performs page redo to obtain the latest operation page, and processes the latest operation page according to the operation request.
本实施例中,第二服务节点在缓冲服务节点获取到操作页面,第二服务节点查询第一服务节点发送的操作页面,并确定最新的操作页面,以对最新的操作页面进行处理,避免了缓冲服务节点中的页面不是最新操作页面的情况。In this embodiment, the second service node obtains the operation page at the buffer service node, and the second service node queries the operation page sent by the first service node and determines the latest operation page to process the latest operation page. The page in the cache service node is not the latest operation page.
参照图7,本申请还提供一种数据库服务节点切换装置,所述数据库服务节点切换装置包括:Referring to FIG. 7, the present application also provides a database service node switching device, the database service node switching device includes:
第一接收模块10,用于在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;The first receiving module 10 is configured to, when the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
处理缓冲模块20,用于第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;The processing buffer module 20 is used for the first service node to process the operation page corresponding to the page identifier according to the operation request, and synchronize the processed operation page to the buffer service node;
切换记录模块30,用于在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;The switching recording module 30 is configured to switch the second service node that is in communication with the first service node to the online state when the failure of the first service node is detected, and record the switching time of the state switching of the second service node;
第二接收模块40,用于在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;The second receiving module 40 is configured to, when the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
查询处理模块50,用于若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。The query processing module 50 is configured to, if the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
上述各程序模块所执行的方法可参照本申请数据库服务节点切换方法各个实施例,此处不再赘述。For the methods executed by the above-mentioned program modules, please refer to the various embodiments of the database service node switching method of this application, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or system. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or system that includes the element.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种数据库服务节点切换方法,其特征在于,所述数据库服务节点切换方法包括如下步骤: A method for switching database service nodes is characterized in that the method for switching database service nodes includes the following steps:
    在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
    第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node;
    在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;When the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switch of the second service node is recorded;
    在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
    若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  2. 如权利要求1所述的数据库服务节点切换方法,其特征在于,所述第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点的步骤,包括:The database service node switching method according to claim 1, wherein the first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer The steps of the service node include:
    第一服务节点查询第一服务节点的第一数据缓冲池,并判断所述第一数据缓冲池中是否包含所述页面标识对应的操作页面;The first service node queries the first data buffer pool of the first service node, and determines whether the first data buffer pool contains the operation page corresponding to the page identifier;
    若所述第一数据缓冲池中不包含所述页面标识对应的操作页面,第一服务节点从第一服务节点的第一磁盘中获取所述页面标识对应的操作页面;If the first data buffer pool does not include the operation page corresponding to the page identifier, the first service node obtains the operation page corresponding to the page identifier from the first disk of the first service node;
    第一服务节点将所述操作页面写入所述第一数据缓冲池,并按所述操作请求处理所述操作页面。The first service node writes the operation page into the first data buffer pool, and processes the operation page according to the operation request.
  3. 如权利要求1所述的数据库服务节点切换方法,其特征在于,所述第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点的步骤,包括:The database service node switching method according to claim 1, wherein the first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer The steps of the service node include:
    第一服务节点创建原子操作,第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并在第一服务节点的第一数据缓冲池中生成Redo日志;The first service node creates an atomic operation, the first service node processes the operation page corresponding to the page identifier according to the operation request, and generates a Redo log in the first data buffer pool of the first service node;
    在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记;At the end of the atomic operation, the first service node adds a log mark to the Redo log;
    第一服务节点将包含所述日志标识的Redo日志通过远程直接内存数据存取方式发送至缓冲服务节点。The first service node sends the Redo log containing the log identifier to the buffer service node in a remote direct memory data access manner.
  4. 如权利要求3所述的数据库服务节点切换方法,其特征在于,所述在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记的步骤之后,包括:The database service node switching method according to claim 3, wherein after the step of adding a log mark to the Redo log by the first service node when the atomic operation ends, the method comprises:
    第一服务节点将包含所述日志标识的Redo日志发送至第二服务节点;The first service node sends the Redo log containing the log identifier to the second service node;
    第二服务节点接收所述Redo日志,第二服务节点按照所述Redo日志的日志标识构建Redo日志链,并生成所述页面标识对应的操作页面;The second service node receives the Redo log, and the second service node constructs a Redo log chain according to the log identifier of the Redo log, and generates an operation page corresponding to the page identifier;
    第二服务节点将生成的所述操作页面存储在第二服务节点的第二数据缓冲池中,并持久化到第二服务节点的第二磁盘中。The second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it in the second disk of the second service node.
  5. 如权利要求1所述的数据库服务节点切换方法,其特征在于,所述若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面的步骤,包括:The database service node switching method according to claim 1, wherein if the operation time is before the switching time, the second service node queries the buffer service node to obtain the operation page corresponding to the page identifier, And the steps of processing the operation page according to the operation request include:
    若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含所述页面标识对应的操作页面;If the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier;
    若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点通过远程直接内存数据存取方式从缓冲服务节点获取所述操作页面,并按所述操作请求处理所述操作页面。If the buffer service node contains the operation page corresponding to the page identifier, the second service node obtains the operation page from the buffer service node by means of remote direct memory data access, and processes the operation page according to the operation request.
  6. 如权利要求5所述的数据库服务节点切换方法,其特征在于,所述若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点通过远程直接内存数据存取方式从缓冲服务节点获取所述操作页面,并按所述操作请求处理所述操作页面的步骤,包括:The database service node switching method according to claim 5, wherein if the buffer service node contains the operation page corresponding to the page identifier, the second service node obtains data from the buffer service node through remote direct memory data access. The steps of obtaining the operation page and processing the operation page according to the operation request include:
    若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点判断第二服务节点的Redo日志链中是否包含所述页面标识对应的操作页面;If the buffer service node includes the operation page corresponding to the page identifier, the second service node determines whether the Redo log chain of the second service node includes the operation page corresponding to the page identifier;
    若所述Redo日志链中包含所述页面标识对应的操作页面,第二服务节点将缓冲服务节点中的操作页面与所述Redo日志链中的操作页面进行比对,确定最新的操作页面;If the Redo log chain contains the operation page corresponding to the page identifier, the second service node compares the operation page in the buffer service node with the operation page in the Redo log chain to determine the latest operation page;
    若缓冲服务节点中的操作页面是最新的操作页面,第二服务节点按所述操作请求处理所述最新的操作页面,将Redo日志链中的操作页面标记为脏页面并删除;If the operation page in the buffer service node is the latest operation page, the second service node processes the latest operation page according to the operation request, marks the operation page in the Redo log chain as a dirty page and deletes it;
    若所述Redo日志链中的操作页面是最新的操作页面,第二服务节点则进行页面重做得到最新的操作页面,并按所述操作请求处理所述最新的操作页面。If the operation page in the Redo log chain is the latest operation page, the second service node performs page redo to obtain the latest operation page, and processes the latest operation page according to the operation request.
  7. 如权利要求5所述的数据库服务节点切换方法,其特征在于,所述若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含所述页面标识对应的操作页面的步骤之后,包括:The database service node switching method according to claim 5, wherein if the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the page After the steps of identifying the corresponding operation page, include:
    若缓冲服务节点中不包含所述页面标识对应的操作页面, 第二服务节点查询Redo日志链,获取所述Redo日志链中所述页面标识对应的操作页面;If the buffer service node does not include the operation page corresponding to the page identifier, The second service node queries the Redo log chain, and obtains the operation page corresponding to the page identifier in the Redo log chain;
    第二服务节点按所述操作请求处理所述操作页面。The second service node processes the operation page according to the operation request.
  8. 一种数据库服务节点切换装置,其特征在于,所述数据库服务节点切换装置包括:A database service node switching device, wherein the database service node switching device includes:
    第一接收模块,用于在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;The first receiving module is configured to, when the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
    处理缓冲模块,用于第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;A processing buffer module, configured for the first service node to process the operation page corresponding to the page identifier according to the operation request, and synchronize the processed operation page to the buffer service node;
    切换记录模块,用于在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;The switching recording module is used to switch the second service node that is in communication with the first service node to the online state when the failure of the first service node is detected, and record the switching time of the state switching of the second service node;
    第二接收模块,用于在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;The second receiving module is configured to, when the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
    查询处理模块,用于若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。The query processing module is configured to, if the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  9. 如权利要求8所述的数据库服务节点切换装置,其特征在于,所述处理缓冲模块,包括:8. The database service node switching device according to claim 8, wherein the processing buffer module comprises:
    判断单元,用于第一服务节点查询第一服务节点的第一数据缓冲池,并判断所述第一数据缓冲池中是否包含所述页面标识对应的操作页面;A determining unit, configured for the first service node to query the first data buffer pool of the first service node, and determine whether the first data buffer pool contains the operation page corresponding to the page identifier;
    获取单元,用于若所述第一数据缓冲池中不包含所述页面标识对应的操作页面,第一服务节点从第一服务节点的第一磁盘中获取所述页面标识对应的操作页面;An obtaining unit, configured to, if the operation page corresponding to the page identifier is not included in the first data buffer pool, the first service node obtains the operation page corresponding to the page identifier from the first disk of the first service node;
    写入单元,用于第一服务节点将所述操作页面写入所述第一数据缓冲池,并按所述操作请求处理所述操作页面。The writing unit is used for the first service node to write the operation page into the first data buffer pool, and process the operation page according to the operation request.
  10. 如权利要求8所述的数据库服务节点切换装置,其特征在于,所述处理缓冲模块,包括:8. The database service node switching device according to claim 8, wherein the processing buffer module comprises:
    创建单元,用于第一服务节点创建原子操作,第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并在第一服务节点的第一数据缓冲池中生成Redo日志;The creation unit is used for the first service node to create an atomic operation, the first service node processes the operation page corresponding to the page identifier according to the operation request, and generates a Redo log in the first data buffer pool of the first service node;
    标记添加单元,用于在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记;A mark adding unit, configured to add a log mark to the Redo log by the first service node when the atomic operation ends;
    缓冲单元,用于第一服务节点将包含所述日志标识的Redo日志通过远程直接内存数据存取方式发送至缓冲服务节点。The buffer unit is used by the first service node to send the Redo log containing the log identifier to the buffer service node in a remote direct memory data access manner.
  11. 如权利要求10所述的数据库服务节点切换装置,其特征在于,所述的数据库服务节点切换装置,包括:10. The database service node switching device according to claim 10, wherein the database service node switching device comprises:
    日志发送模块,用于第一服务节点将包含所述日志标识的Redo日志发送至第二服务节点;A log sending module, configured for the first service node to send the Redo log containing the log identifier to the second service node;
    缓存模块,用于第二服务节点接收所述Redo日志,第二服务节点按照所述Redo日志的日志标识构建Redo日志链,并生成所述页面标识对应的操作页面;A cache module, configured to receive the Redo log by a second service node, and the second service node constructs a Redo log chain according to the log identifier of the Redo log, and generates an operation page corresponding to the page identifier;
    生成模块,用于第二服务节点将生成的所述操作页面存储在第二服务节点的第二数据缓冲池中,并持久化到第二服务节点的第二磁盘中。The generating module is used for the second service node to store the generated operation page in the second data buffer pool of the second service node, and to persist it in the second disk of the second service node.
  12. 如权利要求8所述的数据库服务节点切换装置,其特征在于,所述查询处理模块,包括:8. The database service node switching device according to claim 8, wherein the query processing module comprises:
    第一判定子模块,用于若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含所述页面标识对应的操作页面;The first determination sub-module is configured to, if the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier;
    获取处理子模块,用于若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点通过远程直接内存数据存取方式从缓冲服务节点获取所述操作页面,并按所述操作请求处理所述操作页面。The acquisition processing sub-module is configured to, if the operation page corresponding to the page identifier is contained in the buffer service node, the second service node obtains the operation page from the buffer service node by means of remote direct memory data access, and executes the operation request Process the operation page.
  13. 如权利要求12所述的数据库服务节点切换装置,其特征在于,所述获取处理子模块,包括:The database service node switching device according to claim 12, wherein the acquisition processing sub-module comprises:
    判断单元,用于若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点判断第二服务节点的Redo日志链中是否包含所述页面标识对应的操作页面;A determining unit, configured to, if the operation page corresponding to the page identifier is included in the buffer service node, the second service node determines whether the operation page corresponding to the page identifier is included in the Redo log chain of the second service node;
    比对单元,用于若所述Redo日志链中包含所述页面标识对应的操作页面,第二服务节点将缓冲服务节点中的操作页面与所述Redo日志链中的操作页面进行比对,确定最新的操作页面;The comparison unit is configured to, if the operation page corresponding to the page identifier is included in the Redo log chain, the second service node compares the operation page in the buffer service node with the operation page in the Redo log chain, and determines The latest operation page;
    处理单元,用于若缓冲服务节点中的操作页面是最新的操作页面,第二服务节点按所述操作请求处理所述最新的操作页面,将Redo日志链中的操作页面标记为脏页面并删除;The processing unit is configured to, if the operation page in the buffer service node is the latest operation page, the second service node processes the latest operation page according to the operation request, and marks the operation page in the Redo log chain as dirty pages and deletes them ;
    处理单元,还用于若所述Redo日志链中的操作页面是最新的操作页面,第二服务节点则进行页面重做得到最新的操作页面,并按所述操作请求处理所述最新的操作页面。The processing unit is further configured to: if the operation page in the Redo log chain is the latest operation page, the second service node redo the page to obtain the latest operation page, and process the latest operation page according to the operation request .
  14. 如权利要求12所述的数据库服务节点切换装置,其特征在于,所述查询处理模块,包括:12. The database service node switching device according to claim 12, wherein the query processing module comprises:
    查询获取单元,用于若缓冲服务节点中不包含所述页面标识对应的操作页面,第二服务节点查询Redo日志链,获取所述Redo日志链中所述页面标识对应的操作页面;The query and acquisition unit is configured to, if the operation page corresponding to the page identifier is not included in the buffer service node, the second service node queries the Redo log chain to obtain the operation page corresponding to the page identifier in the Redo log chain;
    处理单元,用于第二服务节点按所述操作请求处理所述操作页面。The processing unit is configured to process the operation page according to the operation request by the second service node.
  15. 一种数据库服务节点切换设备,其特征在于,所述数据库服务节点切换设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据库服务节点切换程序,所述数据库服务节点切换程序被所述处理器执行时实现以下步骤:A database service node switching device, wherein the database service node switching device includes a memory, a processor, and a database service node switching program stored on the memory and running on the processor, and The following steps are implemented when the database service node switching program is executed by the processor:
    在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
    第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node;
    在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;When the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switch of the second service node is recorded;
    在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
    若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request.
  16. 如权利要求15所述的数据库服务节点切换设备,其特征在于,所述第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点的步骤,包括:The database service node switching device according to claim 15, wherein the first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer The steps of the service node include:
    第一服务节点查询第一服务节点的第一数据缓冲池,并判断所述第一数据缓冲池中是否包含所述页面标识对应的操作页面;The first service node queries the first data buffer pool of the first service node, and determines whether the first data buffer pool contains the operation page corresponding to the page identifier;
    若所述第一数据缓冲池中不包含所述页面标识对应的操作页面,第一服务节点从第一服务节点的第一磁盘中获取所述页面标识对应的操作页面;If the first data buffer pool does not include the operation page corresponding to the page identifier, the first service node obtains the operation page corresponding to the page identifier from the first disk of the first service node;
    第一服务节点将所述操作页面写入所述第一数据缓冲池,并按所述操作请求处理所述操作页面。The first service node writes the operation page into the first data buffer pool, and processes the operation page according to the operation request.
  17. 如权利要求15所述的数据库服务节点切换设备,其特征在于,所述第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点的步骤,包括:The database service node switching device according to claim 15, wherein the first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer The steps of the service node include:
    第一服务节点创建原子操作,第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并在第一服务节点的第一数据缓冲池中生成Redo日志;The first service node creates an atomic operation, the first service node processes the operation page corresponding to the page identifier according to the operation request, and generates a Redo log in the first data buffer pool of the first service node;
    在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记;At the end of the atomic operation, the first service node adds a log mark to the Redo log;
    第一服务节点将包含所述日志标识的Redo日志通过远程直接内存数据存取方式发送至缓冲服务节点。The first service node sends the Redo log containing the log identifier to the buffer service node in a remote direct memory data access manner.
  18. 如权利要求17所述的数据库服务节点切换设备,其特征在于,所述在所述原子操作结束时,第一服务节点为所述Redo日志添加日志标记的步骤之后,包括:The database service node switching device according to claim 17, wherein after the step of adding a log mark to the Redo log by the first service node when the atomic operation ends, the method comprises:
    第一服务节点将包含所述日志标识的Redo日志发送至第二服务节点;The first service node sends the Redo log containing the log identifier to the second service node;
    第二服务节点接收所述Redo日志,第二服务节点按照所述Redo日志的日志标识构建Redo日志链,并生成所述页面标识对应的操作页面;The second service node receives the Redo log, and the second service node constructs a Redo log chain according to the log identifier of the Redo log, and generates an operation page corresponding to the page identifier;
    第二服务节点将生成的所述操作页面存储在第二服务节点的第二数据缓冲池中,并持久化到第二服务节点的第二磁盘中。The second service node stores the generated operation page in the second data buffer pool of the second service node, and persists it in the second disk of the second service node.
  19. 如权利要求15所述的数据库服务节点切换设备,其特征在于,所述若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面的步骤,包括:The database service node switching device according to claim 15, wherein if the operation time is before the switching time, the second service node queries the buffer service node to obtain the operation page corresponding to the page identifier, And the steps of processing the operation page according to the operation request include:
    若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,判断缓冲服务节点中是否包含所述页面标识对应的操作页面;If the operation time is before the switching time, the second service node queries the buffer service node to determine whether the buffer service node contains the operation page corresponding to the page identifier;
    若缓冲服务节点中包含所述页面标识对应的操作页面,第二服务节点通过远程直接内存数据存取方式从缓冲服务节点获取所述操作页面,并按所述操作请求处理所述操作页面。If the buffer service node contains the operation page corresponding to the page identifier, the second service node obtains the operation page from the buffer service node by means of remote direct memory data access, and processes the operation page according to the operation request.
  20. 一种计算机存储介质,其特征在于,所述计算机存储介质上存储有数据库服务节点切换程序,所述数据库服务节点切换程序被处理器执行时实现以下步骤:A computer storage medium, characterized in that a database service node switching program is stored on the computer storage medium, and the following steps are implemented when the database service node switching program is executed by a processor:
    在第一服务节点接收到操作请求时,第一服务节点获取所述操作请求对应的页面标识;When the first service node receives the operation request, the first service node obtains the page identifier corresponding to the operation request;
    第一服务节点按所述操作请求处理所述页面标识对应的操作页面,并将处理后的所述操作页面同步到缓冲服务节点;The first service node processes the operation page corresponding to the page identifier according to the operation request, and synchronizes the processed operation page to the buffer service node;
    在检测到第一服务节点故障时,将与第一服务节点通信连接的第二服务节点切换为上线状态,并记录第二服务节点状态切换的切换时间;When the failure of the first service node is detected, the second service node that is in communication with the first service node is switched to the online state, and the switching time of the state switch of the second service node is recorded;
    在第二服务节点接收到操作请求时,第二服务节点获取所述操作请求中的页面标识和操作时间;When the second service node receives the operation request, the second service node obtains the page identifier and the operation time in the operation request;
    若所述操作时间在所述切换时间之前,第二服务节点查询缓冲服务节点,获取所述页面标识对应的操作页面,并按所述操作请求处理所述操作页面。 If the operation time is before the switching time, the second service node queries the buffer service node, obtains the operation page corresponding to the page identifier, and processes the operation page according to the operation request. To
PCT/CN2019/115396 2019-09-18 2019-11-04 Database service node switching method, apparatus and device, and computer storage medium WO2021051492A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910883949.3A CN110677280B (en) 2019-09-18 2019-09-18 Service node switching method, device, equipment and computer readable storage medium
CN201910883949.3 2019-09-18

Publications (1)

Publication Number Publication Date
WO2021051492A1 true WO2021051492A1 (en) 2021-03-25

Family

ID=69076897

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115396 WO2021051492A1 (en) 2019-09-18 2019-11-04 Database service node switching method, apparatus and device, and computer storage medium

Country Status (2)

Country Link
CN (1) CN110677280B (en)
WO (1) WO2021051492A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656444A (en) * 2021-08-26 2021-11-16 傲网信息科技(厦门)有限公司 Data persistence method, server and management equipment
CN114448781A (en) * 2021-12-22 2022-05-06 天翼云科技有限公司 Data processing system
WO2023159976A1 (en) * 2022-02-28 2023-08-31 华为技术有限公司 Data segmented writing method, data reading method and apparatus

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296996B (en) * 2021-05-31 2024-03-29 中国民航信息网络股份有限公司 Service request processing method, related device and storage medium
CN114339380A (en) * 2022-01-06 2022-04-12 厦门亿联网络技术股份有限公司 Recording method, device, server and readable storage medium based on AA mode

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530253A (en) * 2013-09-30 2014-01-22 华为技术有限公司 Clustering multi-overall-situation buffer pool system, center node, computational node and management method
US20160197986A1 (en) * 2015-01-07 2016-07-07 International Business Machines Corporation Host-side cache migration
CN105824571A (en) * 2015-01-05 2016-08-03 ***通信集团四川有限公司 Data seamless migration method and device
US20180013852A1 (en) * 2001-02-13 2018-01-11 Dell Products L.P. Distributed cache for state transfer operations
CN107688584A (en) * 2016-08-05 2018-02-13 华为技术有限公司 A kind of method, node and the system of disaster tolerance switching
CN108156013A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of Page Service disaster recovery method, device and electronic equipment
CN108874588A (en) * 2018-06-08 2018-11-23 郑州云海信息技术有限公司 A kind of database instance restoration methods and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091369A1 (en) * 2003-10-23 2005-04-28 Jones Michael D. Method and apparatus for monitoring data storage devices
US8935382B2 (en) * 2009-03-16 2015-01-13 Microsoft Corporation Flexible logging, such as for a web server
CN103605616A (en) * 2013-11-21 2014-02-26 浪潮电子信息产业股份有限公司 Multi-controller cache data consistency guarantee method
CN107451172B (en) * 2016-03-31 2021-05-28 阿里巴巴集团控股有限公司 Data synchronization method and equipment for version management system
US10771551B2 (en) * 2017-03-28 2020-09-08 Sap Se Dynamic topology switch for data replication
CN108810127B (en) * 2018-06-04 2021-06-18 立旃(上海)科技有限公司 Disaster recovery method and device based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180013852A1 (en) * 2001-02-13 2018-01-11 Dell Products L.P. Distributed cache for state transfer operations
CN103530253A (en) * 2013-09-30 2014-01-22 华为技术有限公司 Clustering multi-overall-situation buffer pool system, center node, computational node and management method
CN105824571A (en) * 2015-01-05 2016-08-03 ***通信集团四川有限公司 Data seamless migration method and device
US20160197986A1 (en) * 2015-01-07 2016-07-07 International Business Machines Corporation Host-side cache migration
CN107688584A (en) * 2016-08-05 2018-02-13 华为技术有限公司 A kind of method, node and the system of disaster tolerance switching
CN108156013A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of Page Service disaster recovery method, device and electronic equipment
CN108874588A (en) * 2018-06-08 2018-11-23 郑州云海信息技术有限公司 A kind of database instance restoration methods and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656444A (en) * 2021-08-26 2021-11-16 傲网信息科技(厦门)有限公司 Data persistence method, server and management equipment
CN113656444B (en) * 2021-08-26 2024-02-27 友安云(厦门)数据科技有限公司 Data persistence method, server and management equipment
CN114448781A (en) * 2021-12-22 2022-05-06 天翼云科技有限公司 Data processing system
WO2023159976A1 (en) * 2022-02-28 2023-08-31 华为技术有限公司 Data segmented writing method, data reading method and apparatus

Also Published As

Publication number Publication date
CN110677280A (en) 2020-01-10
CN110677280B (en) 2020-08-18

Similar Documents

Publication Publication Date Title
WO2021051492A1 (en) Database service node switching method, apparatus and device, and computer storage medium
WO2018103315A1 (en) Monitoring data processing method, apparatus, server and storage equipment
WO2018014580A1 (en) Data interface test method and apparatus, and server and storage medium
WO2013185434A1 (en) High-reliability, extensible video storage and search method and system thereof
WO2011002169A2 (en) High availability database management system and database management method using same
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
WO2018058959A1 (en) Sql auditing method and apparatus, server and storage device
WO2015109804A1 (en) Dual-server hot-backup disaster recovery system for network service in virtualization environment and method therefor
WO2018036167A1 (en) Test task executor assignment method, device, server and storage medium
WO2014044136A1 (en) Distributed data-based concurrent processing method and system, and computer storage medium
WO2016101441A1 (en) File synchronization method and system
WO2020224249A1 (en) Blockchain-based transaction processing method, device and apparatus, and storage medium
WO2014044130A1 (en) Service polling method and system, and computer storage medium
WO2020253135A1 (en) Automated analysis method and device, user equipment, and storage medium
WO2015180434A1 (en) Data management method, node and system for database cluster
WO2021072881A1 (en) Object storage-based request processing method, apparatus and device, and storage medium
WO2020147385A1 (en) Data entry method and apparatus, terminal and computer-readable storage medium
WO2015024167A1 (en) Method for processing user message and forwarding plane device
WO2020077832A1 (en) Cloud desktop access method, apparatus and device, and storage medium
WO2018101640A1 (en) Consistency recovery method for seamless database duplication
WO2017140080A1 (en) Addressing communication method and apparatus based on media access control address
WO2020062640A1 (en) Method, server and storage medium for switching dynamic copywriting language of terminal application
WO2020233057A1 (en) File packaging method, apparatus and device, and storage medium
WO2020237859A1 (en) Data migration method employing nbd device, apparatus, device, and storage medium
WO2020103275A1 (en) Money deduction control method, apparatus, and device, and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945676

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945676

Country of ref document: EP

Kind code of ref document: A1