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

Capacity expansion method and device for distributed database and electronic equipment

An expansion method and database technology, which are applied in the field of capacity expansion methods, devices and electronic equipment of distributed databases, and can solve problems such as adverse effects on availability of distributed databases.

Active Publication Date: 2020-07-28
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF11 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] It can be seen that the existing technology needs to stop the service or stop providing the writing service when the node is expanded, and the length of the stop is related to the amount of data, which has a negative impact on the availability of the distributed database

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Capacity expansion method and device for distributed database and electronic equipment
  • Capacity expansion method and device for distributed database and electronic equipment
  • Capacity expansion method and device for distributed database and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] This embodiment provides a method for capacity expansion of a distributed database. The distributed database includes a scheduling node (which may be called a CN node) and a plurality of existing first data nodes (which may be called a DB node). refer to figure 1 The flow chart of the capacity expansion method of the distributed database shown in the flow chart, the method is applied to the scheduling node, may include the following steps S102 to S108:

[0038] Step S102, when a second data node is newly added to the database, notify the first data node to migrate the target fragment data to be migrated to the second data node.

[0039] In this embodiment, when the user initiates a data node increase request to the scheduling node through the client, the scheduling node obtains the number and address of the newly added second data node according to the increase request, combined with the number of existing first data nodes , the address and the shard data it undertakes...

Embodiment 2

[0073] In combination with the foregoing first embodiment, this embodiment provides a method for capacity expansion of a distributed database. The database includes a scheduling node and a plurality of existing first data nodes. The method is applied to the first data nodes, and the method includes:

[0074] Step (1), when the database adds a second data node, migrate the target fragment data to be migrated to the second data node according to the notification of the scheduling node; during the process of migrating the target fragment data to the second data node , assigning a unique LSN to each target shard data; among them, LSN is used to determine the table lock of the shard table, and the table lock is used to limit or respond to the operation of the shard table; the shard table is used for distributed storage database Shard data in .

[0075] Step (2), delete the target fragmented data that has been migrated to the second data node.

[0076] In the capacity expansion met...

Embodiment 3

[0086] According to the method for expanding the capacity of a distributed database provided in the foregoing embodiments, this embodiment provides a device for expanding the capacity of a distributed database. see Figure 4 Shown is a structural block diagram of a capacity expansion device for a distributed database, the database includes a scheduling node and a plurality of existing first data nodes, the device is applied to a scheduling node, and includes:

[0087] The first data migration module 402 is configured to notify the first data node to migrate the target fragment data to be migrated to the second data node when a second data node is added to the database;

[0088] The first LSN acquisition module 404 is configured to acquire the LSN corresponding to the second data node; wherein, the LSN is a unique identifier assigned to each target shard data in the process of migrating the target shard data to the second data node;

[0089] The operation restriction module 40...

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

PUM

No PUM Login to View More

Abstract

The invention provides a capacity expansion method and device for a distributed database and electronic equipment. The method relates to the field of cloud computing, a database comprises a schedulingnode and a plurality of existing first data nodes, and the method takes the scheduling node as an execution main body and comprises the following steps: when a second data node is newly added to thedatabase, notifying the first data nodes to migrate target fragmented data to be migrated to the second data node; obtaining an LSN corresponding to the second data node; when the latest LSN reaches apredetermined LSN upper limit, receiving a table lock of the fragmentation table sent by the target data node to limit the operation on the fragmentation table; wherein the target data node is a second data node corresponding to target fragmented data reaching a predetermined LSN upper limit; and when the preset condition is met, releasing the table lock to respond to the operation on the fragmentation table. According to the method, in the database expansion process, it can be well guaranteed that the database is not shut down and is continuous in service, and the high availability of the distributed database is effectively improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a capacity expansion method, device and electronic equipment of a distributed database. Background technique [0002] Sharding technology is an important horizontal sharding and node expansion technology in distributed databases. When using sharding technology to expand data nodes, the expanded node data will change, and node data needs to be redistributed at this time. At present, there are mainly two schemes for redistributing node data. One is to stop the database service, redistribute the data by changing the data distribution information of the CN (scheduling) node, and start the service after the data redistribution is completed. The other is to provide only read-only services. All original nodes (that is, excluding new nodes) are changed to read-only mode, and the data distribution information of CN nodes is changed to redistribute data. After data redistribution is com...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/21G06F16/23G06F16/27
CPCG06F16/214G06F16/2343G06F16/27Y02D10/00
Inventor 蒋琪
Owner BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products