Search

CN-122018817-A - Database processing method, apparatus, device, storage medium, and program product

CN122018817ACN 122018817 ACN122018817 ACN 122018817ACN-122018817-A

Abstract

The embodiment of the application provides a database processing method, a device, equipment, a storage medium and a program product, which are applied to a database cluster based on Kubernetes, and the method comprises the steps of dividing the database cluster to obtain a storage node cluster and a computing node cluster; the storage node cluster and the computing node cluster are respectively provided with corresponding sub-controllers, the sub-controllers corresponding to the computing node cluster are used for collecting first state information of the storage node cluster and adjusting configuration information of the computing node cluster according to the first state information, and the sub-controllers corresponding to the storage node cluster are used for collecting second state information of the storage node cluster and adjusting configuration information of the storage node cluster according to the second state information.

Inventors

  • FU ZHONGHAO

Assignees

  • 中移(苏州)软件技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20260410

Claims (11)

  1. 1. A database processing method, applied to Kubernetes-based database clusters, the method comprising: Dividing the database cluster to obtain a storage node cluster and a ‌ computing node cluster, wherein the storage node cluster and the ‌ computing node cluster are respectively provided with corresponding sub-controllers; Collecting first state information of the storage node cluster by using a sub-controller corresponding to the computing node cluster, and adjusting configuration information of the computing node cluster according to the first state information; And acquiring second state information of the storage node cluster by using a sub-controller corresponding to the storage node cluster, and adjusting configuration information of the storage node cluster according to the second state information.
  2. 2. The method of claim 1, wherein the database cluster comprises a global controller, the computing node cluster comprises a plurality of computing nodes, each computing node having a corresponding Pod, the storage node cluster comprises a plurality of storage nodes, the method further comprising: Acquiring third state information of the storage node cluster in real time through the global controller, and determining whether all storage nodes in the storage node cluster are in a ready state according to the third state information; and if all the storage nodes are determined to be in the ready state, starting each Pod in the computing node cluster.
  3. 3. The method of claim 1, wherein the cluster of computing nodes comprises a master computing node and a slave computing node, the method further comprising: When the master computing node executes the writing transaction operation, the corresponding generated redox log is written into the storage node cluster ‌ and the local temporary cache at the same time; And when the master computing node receives the log acquisition request sent by the slave computing node, acquiring a redox log from the temporary cache and returning the redox log to the slave computing node, so that the slave computing node applies the redox log to a corresponding data page.
  4. 4. The method of claim 3, wherein the cluster of storage nodes includes a storage node having a storage engine disposed thereon and the host computing node having a computing engine disposed thereon, the method further comprising: And after the storage engine receives the redox log issued by the calculation engine, performing one or more of log buffer management, log storage, log analysis, log application, log synchronization, data page reading and metadata information synchronization.
  5. 5. The method of claim 1, wherein the cluster of computing nodes comprises a master computing node, the method further comprising: When the main computing node detects that the backup thread is started, synchronously starting a background detection process; And continuously monitoring and copying all data change records in a backup period through the background detection process, wherein the backup period refers to a period from the starting to the ending of a backup thread.
  6. 6. The method of claim 5, wherein the method further comprises: Acquiring a static data snapshot of a backup thread when the backup thread is started through a locking mechanism; integrating the static data snapshot and the all data change records to obtain a backup file; and carrying out data recovery based on the backup file.
  7. 7. The method of claim 1, wherein the storage node cluster and the ‌ computing node cluster have corresponding dedicated resources, the method further comprising: and dividing the exclusive resources corresponding to each of the storage node cluster and the ‌ computing node cluster in a labeling mode.
  8. 8. A database processing apparatus for application to Kubernetes-based database clusters, the apparatus comprising: The dividing module is used for dividing the database cluster to obtain a storage node cluster and a ‌ computing node cluster, wherein the storage node cluster and the ‌ computing node cluster are respectively provided with corresponding sub-controllers; The first adjusting module is used for acquiring first state information of the storage node cluster by using a sub-controller corresponding to the computing node cluster, and adjusting configuration information of the computing node cluster according to the first state information; And the second adjusting module is used for acquiring second state information of the storage node cluster by using the sub-controller corresponding to the storage node cluster and adjusting configuration information of the storage node cluster according to the second state information.
  9. 9. A database processing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 7 when the program is executed.
  10. 10. A computer storage medium having stored thereon a computer program, which when executed by a processor implements the method of any of claims 1 to 7.
  11. 11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1 to 7.

Description

Database processing method, apparatus, device, storage medium, and program product Technical Field The present application relates to the field of database technologies, and in particular, to a database processing method, apparatus, device, storage medium, and program product. Background At present, for a database with tightly coupled computation and storage, due to the characteristic of being not suitable for a database with a computation and storage separation architecture, flexible expansion and contraction of computation nodes and storage nodes of the database under the computation and storage separation architecture are difficult to realize, and the problem of low resource utilization rate exists. Disclosure of Invention The embodiment of the application provides a database processing method, a database processing device, database processing equipment, a storage medium and a program product. The technical scheme of the embodiment of the application is realized as follows: The embodiment of the application provides a database processing method which is applied to a database cluster based on Kubernetes, and comprises the following steps: dividing the database cluster to obtain a storage node cluster and a computing node cluster, wherein the storage node cluster and the computing node cluster are respectively provided with corresponding sub controllers; Collecting first state information of the storage node cluster by using a sub-controller corresponding to the computing node cluster, and adjusting configuration information of the computing node cluster according to the first state information; And acquiring second state information of the storage node cluster by using a sub-controller corresponding to the storage node cluster, and adjusting configuration information of the storage node cluster according to the second state information. The embodiment of the application provides a database processing device which is applied to a database cluster based on Kubernetes, and comprises the following components: The dividing module is used for dividing the database cluster to obtain a storage node cluster and a computing node cluster, wherein the storage node cluster and the computing node cluster are respectively provided with corresponding sub controllers; The first adjusting module is used for acquiring first state information of the storage node cluster by using a sub-controller corresponding to the computing node cluster, and adjusting configuration information of the computing node cluster according to the first state information; And the second adjusting module is used for acquiring second state information of the storage node cluster by using the sub-controller corresponding to the storage node cluster and adjusting configuration information of the storage node cluster according to the second state information. The embodiment of the application provides a computer storage medium which stores a computer program, and the computer program can realize the database processing method provided by one or more of the technical schemes after being executed. Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements a database processing method provided by one or more of the foregoing technical solutions. According to the database processing method, the database clusters are divided into the storage node clusters and the computing node clusters, and the sub-controllers corresponding to the database clusters are used for independent management, so that resource decoupling and elastic expansion of a computing layer and a storage layer can be realized, in practical application, computing resources and storage resources can be respectively expanded and contracted according to service requirements, the resource utilization rate is improved, the method is suitable for diversified service scenes, and the problems that the traditional tight coupling architecture cannot realize independent expansion and contraction and the resource utilization rate is low are effectively solved. Drawings FIG. 1 is a schematic flow chart of a database processing method according to an embodiment of the present application; Fig. 2 is a schematic structural diagram of a database cluster based on Kubernetes according to an embodiment of the present application; fig. 3 is a schematic structural diagram of another database cluster based on Kubernetes according to an embodiment of the present application; FIG. 4 is a schematic diagram of a transaction process performed by a master and a slave according to an embodiment of the present application; FIG. 5 is a schematic flow chart of a backup flow chart according to an embodiment of the present application; fig. 6 is a schematic structural diagram of a database processing device according to an embodiment of the present application; fig. 7 is a schematic structural diagram of a database processing device acc