[go: up one dir, main page]

WO2019174608A1 - Data processing method and related device therefor - Google Patents

Data processing method and related device therefor Download PDF

Info

Publication number
WO2019174608A1
WO2019174608A1 PCT/CN2019/078091 CN2019078091W WO2019174608A1 WO 2019174608 A1 WO2019174608 A1 WO 2019174608A1 CN 2019078091 W CN2019078091 W CN 2019078091W WO 2019174608 A1 WO2019174608 A1 WO 2019174608A1
Authority
WO
WIPO (PCT)
Prior art keywords
partition
metadata
data
server module
client
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2019/078091
Other languages
French (fr)
Chinese (zh)
Inventor
熊江
黄飞腾
徐然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2019174608A1 publication Critical patent/WO2019174608A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Definitions

  • the present application relates to the field of computers, and in particular, to a data processing method and related devices.
  • Load balancing refers to the reasonable allocation of data to multiple servers or operating units to avoid certain Some servers handle excessive amounts of data when the server is idle.
  • the best way to achieve load balancing is to partition the server's database.
  • the existing storage computing separation architecture performs data storage and calculation on different devices.
  • the process of database partitioning is as follows: First, the control server selects the partition to be split, and notifies the partition server that manages the partition to execute the split command, and the partition server closes the partition service, that is, stops processing the data sent by the client, and marks the partition.
  • the partition server starts to split the partitions it manages.
  • the specific partition splitting method is to split the partition metadata and split the partition metadata into metadata of at least two partitions. After the splitting is completed, the at least two partitions are online and the routing table information is updated. After the routing table is updated, the server managing the two partitions can normally process the data sent by the client.
  • partition server when any one or more partition metadata managed by the partition server is split, if the data sent by the client is received, the metadata of the partition server is in the split state, and the client sends the data. The data will cause the metadata of the partition to change. Therefore, the partition server must stop processing the client data. After the splitting is completed, the partition server needs to re-determine the data range managed by itself and update the routing table information before the I/O can be processed normally. The request, visible partition server to partition the data it manages, is unable to process the data sent by the client.
  • the embodiment of the present application provides a data processing method and a related device thereof, after performing a snapshot operation on the first metadata, splitting the first metadata according to the snapshot of the first metadata and the client in the splitting process
  • the data sent by the terminal is processed.
  • a first aspect of the embodiments of the present application provides a data processing method, including:
  • the first partition server module receives a split command sent by the control server module, where the split command is used to instruct the first partition server module to split the first metadata, and the control server module requests the first element in the shared storage space in advance.
  • the storage space of the third metadata in the plurality of metadata is stored in the first partition before being split, and the first partition is managed by the first partition server.
  • the metadata is used to indicate the address of the data, and the server may find the corresponding data according to the metadata;
  • the first partition server module performs a snapshot operation on the first metadata to generate a snapshot of the first metadata, and the snapshot of the first metadata is also stored in the first partition;
  • the first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range
  • the metadata includes second metadata and third metadata, the second metadata is stored in the second partition, and the second partition is managed by the first partition server module, so the second metadata can be regarded as the first element
  • the metadata left by the first partition server module remaining after the data is split.
  • the third metadata is stored in a third partition, the third partition is managed by the second partition server module, and the second partition server module is determined by the control server module.
  • the partition is also split when the metadata is split, so the second partition and the third partition are formed by splitting the first partition;
  • the first partition server module processes the data sent by the client according to the split result.
  • the embodiment of the present application has the following advantages: after receiving the split instruction, the first partition server module performs a snapshot operation on the first metadata managed by the first partition server module, and according to the snapshot of the first metadata and the preset splitting strategy,
  • the metadata is split into metadata of at least two pieces of data ranges, the metadata of the at least two pieces of data ranges includes second metadata and third metadata, the second metadata is stored in the second partition, and the second partition is configured by the second partition
  • the first partition server manages, the third metadata is stored in the third partition, and the third partition is managed by the second partition server module, and then the first partition server module processes the data sent by the client according to the split result, thereby The data processing pressure of the first partition server module.
  • the first partition server module can split the first metadata according to the snapshot of the first metadata. Since the snapshot operation is performed on the metadata, the metadata to be split is fixed. Even if the partition server module receives the data sent by the client at this time, the partition can be split according to the fixed metadata in the snapshot, and the client data can be processed normally.
  • the data sent by the client belongs to a data range formed by the data indicated by the second metadata, and the first partition service module is configured according to the split result.
  • Processing the data sent by the client includes:
  • the first partition server module stores data sent by the client in the second partition, and the second partition is managed by the first partition server module, so the partition splitting succeeds, by the first partition service module Responding to an I/O request corresponding to the data sent by the client.
  • the data sent by the client belongs to a data range formed by the data indicated by the third metadata, and the first partition service module is configured according to the split result. Processing the data sent by the client includes:
  • the first partition server module first writes the data sent by the client to the log, and the log is stored in the third partition, and waits for the second partition server module. After going online, the second partition server module can find the client data according to the log record.
  • the log includes data sent by the client
  • the second partition server module may obtain data sent by the client included in the log from the third partition, and respond to the data according to the data sent by the client. I/O request.
  • the log may include only the data sent by the client, and the log may also include the data sent by the client and the metadata corresponding to the data sent by the client, which is not limited herein.
  • the method further includes:
  • the first partition server module writes a log to the client data, and the first partition server module also stores the data sent by the client in the second partition;
  • the first partition server module may call pre-stored data sent by the client from the second partition.
  • the first partition server module can quickly roll back the data sent by the client stored in advance after the partition splitting fails, thereby effectively preventing data loss.
  • the fifth implementation manner of the first aspect when the log includes the metadata corresponding to the data sent by the client,
  • the partitioning is successful, and the second partitioning server module obtains the pre-stored data sent by the client from the second partition according to the metadata corresponding to the data sent by the client, and according to the obtained client.
  • the data sent by the terminal processes the I/O request corresponding to the data sent by the client.
  • the first partition server module is After the snapshot of the first metadata and the preset splitting policy split the first metadata into metadata of at least two pieces of data ranges, the method further includes:
  • the first partition server module splits the data into data of at least two pieces of data ranges, and the address of the data is indicated by the first metadata, so the data has a corresponding relationship with the first metadata.
  • the data of each segment of the data in the data of the at least two segments of data is in one-to-one correspondence with the metadata of each segment of the data in the metadata of the at least two segments of data.
  • the first partition server module stores the second metadata and the data corresponding to the second metadata in the second partition, and the first partition server module compares the third metadata and the first The data corresponding to the ternary data is stored in the third partition.
  • the method further includes:
  • the first partition server module stores the data corresponding to the first metadata and the second metadata in the first partition, and the first partition server The module stores the third metadata in the third partition, and the data corresponds to the first metadata.
  • a second aspect of the present application provides a server module, where the server module is a first partition server module, and the first partition server module includes:
  • a receiving unit configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the metadata The address used to indicate the data;
  • a snapshot operation unit configured to perform a snapshot operation on the first metadata
  • a splitting unit configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, and the element of the at least two pieces of data ranges
  • the data includes second metadata and a third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third partition
  • the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;
  • a processing unit configured to process data sent by the client according to the split result.
  • the splitting method of the partition managed by the first partition server module is described.
  • the first partition server module can process the client data in the splitting process.
  • the data sent by the client belongs to a data range formed by the data indicated by the second metadata
  • the processing unit includes:
  • a first processing subunit configured to store data sent by the client in the second partition
  • the response subunit is configured to respond to the I/O request corresponding to the data sent by the client if the partition is successfully split.
  • the data sent by the client belongs to a data range formed by the data indicated by the third metadata
  • the processing unit includes:
  • a second processing subunit configured to write data sent by the client to a log
  • the log is stored in the third partition.
  • the first partition server module further includes:
  • a storage unit configured to store data sent by the client in the second partition
  • a calling unit configured to call, from the second partition, the pre-stored data sent by the client if the partition splitting fails.
  • the first partition server module can quickly roll back the data sent by the client stored in advance after the partition splitting fails, thereby effectively preventing data loss.
  • the splitting unit is further configured to split data into at least two pieces of data. a range of data, the data corresponding to the first metadata, the data of each piece of data range in the data of the at least two pieces of data range and the element of each piece of data range in the metadata of the at least two pieces of data range The data corresponds one by one.
  • the storage unit is further configured to store the data corresponding to the second metadata and the second metadata in the second partition, and corresponding to the third metadata and the third metadata The data is stored in the third partition.
  • the storage unit is further configured to store data and the second metadata in The first partition, and storing the third metadata in the third partition, the data corresponding to the first metadata.
  • a third aspect of the present application provides a computing device, including a processor and a memory,
  • the processor executes program code in the memory to perform any of the methods described in the above aspects.
  • the first partition server module runs on the computing device, or the computing device operates as the first partition server module.
  • a fourth aspect of the present application provides a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the methods described in the above aspects.
  • a fifth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the methods described in the various aspects above.
  • FIG. 1 is a schematic diagram of a function introduction of a module according to an embodiment of the present application.
  • FIG. 2(a) is a schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application
  • FIG. 2(b) is another schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application
  • 2(c) is another schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application
  • FIG. 2(d) is a schematic diagram showing another structure of a connection mode between a partition server module and other modules according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a first metadata snapshot operation
  • FIG. 5(a) is a schematic diagram of splitting metadata and corresponding data according to an embodiment of the present application.
  • FIG. 5(b) is a schematic diagram of splitting another metadata and corresponding data according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a manner of data processing according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another manner of data processing according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a second partition server module acquiring client data
  • FIG. 11(a) is a schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • FIG. 11(b) is another schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • FIG. 11(c) is another schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • FIG. 12 is another schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • FIG. 13 is another schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • FIG. 14 is another schematic structural diagram of a first partition server module according to an embodiment of the present application.
  • the client includes an interface to access the database, which can access the database of the partition server module.
  • the control server module can split the data according to the row key of each data and assign it to different partition server modules. Perform management and maintenance, responsible for load balancing of partitioned server modules and fault management of partitioned server modules.
  • the partition server module can manage the partitions allocated by the control server module and process I/O (input/out-put) requests to these partitions.
  • the number of storage partitions managed by each partition server module is not limited herein. Each partition server module may manage only one storage partition as shown in FIG. 1, or one partition server module may manage multiple storage partitions.
  • a partition server module manages multiple storage partitions
  • one of the multiple storage partitions needs to be split, and the partition enters the split state.
  • metadata is stored.
  • the metadata is structured data, and contains address information of the data, and the corresponding data can be found through the metadata.
  • the storage space required by the storage partition is obtained by the control server module from the storage space of the shared storage. It should be noted that the partition splitting of the database is based on the row key to distinguish different data, and then the split point is selected to split the database.
  • the function module shown in Figure 1 the partition server module, the control server module, and the shared storage may be in the same computer device or on different computer devices.
  • the application scenario is shown below:
  • the client, the control server module, the partition server module, and the storage space for storing the partition data are integrated on the same computing device, as shown in FIG. 2(b), the client and the control server.
  • the module is on the same physical device, and the control server module manages multiple partition server modules.
  • the partition server modules are distributed on different computing devices.
  • the storage space of the partition is on the same terminal device as the partition server module. It can be understood that In the implementation scenario shown in 2(b), there is also a possibility that the client and the control server module are on different computing devices.
  • the partition server module and its corresponding storage space can be distributed on different computing devices, meaning that the partition server module can store data on the storage space of another device after running on one device.
  • the storage device used for the storage partition can be separated from the computing device by two devices.
  • the storage device and the computing device exchange information through the network, and the partition managed by each partition server is stored in different In the storage device, the storage space of these storage devices together constitute a shared storage.
  • the second partition server module determined by the control server may be any one of the partition server modules 2 to N in FIG. 2(a) to FIG. 2(d) (FIG. 2 (FIG. 2) a) to FIG. 2(d)) taking N equal to 3 as an example), the storage partition or storage device corresponding to the determined partition server module is the storage space of the third partition.
  • the first partition server module in this embodiment is the partition server module 1 in the structural diagrams of FIG. 2(a) to FIG. 2(d), and the storage partition or storage device corresponding to the partition server module 1 is the first before splitting.
  • the storage space of the partition or the storage space of the second partition after the split.
  • the embodiment of the present application provides a data processing method for a partition server module to process data sent by a client during a metadata splitting process.
  • the first partition server module receives a split instruction.
  • the first partition server module processes data of one or more partitions.
  • the partition server module may be crashed, and the control server module is responsible for managing the processing of each partition service module.
  • the amount of data is balanced, so the control server module needs to split the partition, that is, allocate a part of the data request of the partition to another server for load balancing between the servers.
  • the control server module determines the first partition to be split, applies to the shared storage layer for the storage space of the third partition, where the third partition is formed by splitting the first partition, and the first partition is split into at least two partitions, at least two
  • the partition includes a second partition and a third partition.
  • the second partition occupies the storage space of the first partition before the split, and the third partition occupies the storage space requested by the control server in advance.
  • the second partition server module is determined by the control server module, and is configured to manage a part of the data of the split partition.
  • the specific method is to store the metadata corresponding to the part of the data in the third partition, which is managed by the second partition server module. This part of the data and its corresponding metadata, in order to reduce the data processing pressure of the first partition server module.
  • the first metadata is 1-100, and is split into metadata of four data ranges of 1-20, 20-50, 50-70, and 70-100.
  • the first partition service module and the second partition server module may respectively Any one of the four pieces of metadata is managed, wherein the data range formed by the metadata managed by the first partition server module and the second partition server module is different.
  • Metadata is a structured data that provides information resources or data. It is a structured description of information resources. Metadata includes the formation, relationships, fields, constraints, etc. of the data set.
  • the partition server module can access the corresponding data according to the metadata. The data.
  • Which piece of metadata is managed by the first partition server module or the second partition server module means that the data corresponding to the piece of metadata is also managed by the first partition server module or the second partition server module.
  • the metadata managed by the first partition server module ranges from 1 to 20, and the data corresponding to the metadata of the range of 1-20 is 1-100.
  • the data of 1-100 is also managed by the first partition server module, and the metadata can be used as The index of the data, so the first partition server module only needs to store the metadata of 1-20 range in the second partition managed by it, and realize the management of the metadata of 1-20 range and the data of 1-100 range.
  • the first partition server module responds to the client request.
  • the first partition server module first receives a split instruction, where the split command carries information about the metadata to be split and storage space information that the control server allocates for the third partition in advance, and the first partition server module may Separating the first metadata according to the splitting instruction, and the information of the to-be-split metadata (ie, the first metadata) includes a splitting policy preset by the control server, so the first partition server determines the first metadata.
  • the preset split strategy can then be determined.
  • the first partition server module performs a snapshot operation on the first metadata.
  • the first partition server module performs a snapshot operation on the first metadata to generate a snapshot of the first metadata.
  • the first partition includes the first metadata, the data indicated by the first metadata, and the first metadata snapshot. It can be understood that the first partition further includes storage space information of the third partition carried in the split instruction.
  • the first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and the preset splitting policy.
  • the first partition server module splits the first metadata according to the snapshot of the first metadata, and the first partition server module determines a preset splitting policy, where the splitting policy includes split point information.
  • the split point is determined according to the row key of the data, and the split position of the corresponding metadata after determining the split point of the data is also determined.
  • first partition server module splits the first metadata into two partitions, that is, splits the first metadata into two pieces of metadata, and only one metadata split point.
  • the first partition server module splits the first metadata into the second metadata and the third metadata from the split point location, the second metadata is stored in the second partition, and the third metadata is stored in the third partition.
  • the first partition server module splits the first metadata into two or more partition metadata, and the two or more partition metadata includes the second metadata and the third element.
  • Data, the split point of the metadata at this time includes at least two. For example, if the data range of the first metadata is 1-100 and the split points are 20 and 60 respectively, the first metadata is split into three partitions, which are 1-20, 20-60, and 60-100, respectively.
  • the metadata of any two of the data ranges of 1-20, 20-60, and 60-100 are referred to as second metadata and third metadata, respectively, and the second metadata is stored in the second partition, the third metadata. Stored in the third partition.
  • the first partition server module when the first partition server module splits the first metadata, the first partition server module processes the data to be split corresponding to the first metadata in the following two cases.
  • the first partition server module may split the first metadata and may be the first
  • the data indicated by the metadata is also split.
  • the split form is the split point corresponding to the metadata, and the split point is set at the corresponding position of the data for splitting, so the data to be split is split into the second metadata.
  • the indicated data and the data indicated by the third metadata, and the data indicated by the second metadata is stored in the second partition, and the data indicated by the third metadata is stored in the third partition.
  • the first partition server module does not split the split data
  • a possible case is that the first partition server module only splits the first metadata.
  • the data corresponding to the metadata is not split.
  • the data to be split is stored in the second partition.
  • the second partition server module needs to acquire the data indicated by the third metadata from the second partition and store the data in the third partition.
  • the manner in which the second partition server module acquires the data indicated by the third metadata from the second partition is: when the second partition server module is online, when the data is sorted, according to the data indicated in the third metadata.
  • the address information successively acquires the data indicated by the third metadata from the storage space of the first partition, and stores the data in the third partition.
  • the first partition server module processes the data sent by the client sent by the client according to the split result.
  • the first partition server module receives the I/O request sent by the client, and the client may be an application on the terminal device, and the client and the first partition server module may be the same device.
  • the function modules on the device can also be on different devices, which are not limited here.
  • the first partition server module determines a split result of the first metadata according to the preset splitting policy, and determines that the second metadata formed after the splitting is stored in the second partition, and the third metadata is stored in the third partition,
  • the one-part server module processes the data request sent by the subsequent client according to the splitting of the first metadata and the storage of the split metadata.
  • the first partition server module performs a snapshot operation on the first metadata, and splits the first metadata according to the snapshot of the first metadata.
  • the client continuously sends I/O.
  • the request causes the first metadata to be split to change continuously, and the partition cannot be split. Therefore, the server needs to stop receiving the client I/O request.
  • the snapshot is performed after performing the snapshot operation on the metadata, which is equivalent to The split metadata is fixed at a certain time, so the server can process the client's I/O request normally.
  • the server splits the first metadata by using a snapshot, and in this way, the normal processing of the I/O request is achieved.
  • the processing flow of the I/O request has the following two situations: Please refer to FIG. 6 and FIG. 7, and one of the cases will be described below.
  • the first partition server module receives the split instruction.
  • the first partition server module performs a snapshot operation on the first metadata.
  • the first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and the preset splitting policy.
  • the steps 601 to 603 of the embodiment are similar to the steps 301 to 303 of the embodiment shown in FIG. 3, and details are not described herein again.
  • the first partition server module determines, according to the split result, a data range formed by the data indicated by the second metadata.
  • the data to be split is split into an example, and the first partition server module determines second metadata and third metadata generated after splitting the first metadata according to the split result, and the second metadata. Include one or more metadata, and the first partition server module searches for corresponding data according to the data address indicated by each metadata in the second metadata until all data corresponding to the second metadata is determined to be completed, and second
  • the data corresponding to the metadata may form a data range, for example, the second metadata is 1, 2, 5, 10, 15, 20, and the corresponding data is 5, 10, 15, 20, 25, respectively, and the data is formed.
  • the data range is 5 to 25.
  • the first partition server module stores the data sent by the client in the second partition.
  • the first partition server module determines the data range to which the data sent by the client belongs, and the data corresponding to the second metadata forms a data range.
  • the first partition server module sends the data to the client.
  • the data is written into the second partition, that is, the data sent by the client is stored in the storage space of the second partition.
  • the data X belongs to the data range of 1-a
  • the data of the 1-a data range is stored in the second partition, so the first partition service module writes the data X to the second partition.
  • the first partition service module responds to the I/O request corresponding to the data sent by the client.
  • the first metadata is successfully split.
  • the data managed by the first partition service module changes.
  • the first partition server module only manages the data allocated after the split and the client during the split process.
  • the data written by the terminal the first partition server module notifies the client partition version update, the client sends an instruction to update the routing table information to the control server, and after the routing table information is updated, the second partition server module goes online, and the pair falls into the second partition.
  • the data managed by the server module is processed by the data allocated by the control server.
  • the data sent by the client is managed by the first partition server module, so the I/O request corresponding to the data is responded by the first partition server module.
  • the first partition server module manages the data range unchanged, and the data written by the client during the splitting process is also managed by the first partition server module.
  • the first partition server module needs to determine the data range to which the data sent by the client is sent by the client, and the data to which the client sends the data belongs in this embodiment.
  • a description of the scope has increased the feasibility of the solution.
  • FIG. 7 and FIG. 8 another situation of the client I/O request processing flow in this embodiment is as follows:
  • the first partition server module receives the split instruction.
  • the first partition server module performs a snapshot operation on the first metadata.
  • the first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy.
  • the steps 801 to 803 of the embodiment are similar to the steps 301 to 303 of the embodiment shown in FIG. 3, and details are not described herein again.
  • the first partition server module determines, according to the splitting result, a data range formed by the data indicated by the third metadata.
  • the first partition server determines, according to the split result, the third metadata generated after the first metadata split, the third metadata includes one or more metadata, each metadata indicates an address of the data, and the first partition server The module finds the corresponding data according to the data address indicated by each metadata in the third metadata, until all the data corresponding to the third metadata is determined to be completed, and the data corresponding to the third metadata may form a data range, for example,
  • the third metadata is 50, 59, 65, 71, 80, 88, and the corresponding data is 55, 60, 70, 80, 90, respectively, and the data forms a data range of 55 to 90.
  • the first partition server module writes data sent by the client to the log.
  • the first partition server module stores the log in the third partition.
  • the second partition server module cannot be online, so the first partition server module cannot directly write the data sent by the client to the third partition, but needs to use the write log.
  • the pre-write log is sent to the data sent by the client, as shown in FIG. 10, so that after the partition splitting is completed, the second partition server module traverses the log, obtains the data sent by the client, and stores the data sent by the client.
  • the data sent by the client is managed by the second partition server module, and when the subsequent client sends the I/O request corresponding to the data, the second partition server module responds.
  • FIG. 9 is an implementation manner of the embodiment when the data X in FIG. 7 belongs to the data range indicated by the third metadata.
  • the first partition server module writes data sent by the client.
  • the data sent by the client is also written into the second partition, that is, the data sent by the client is stored in the storage space of the second partition. Its purpose is to facilitate fault handling, but also for decoupling.
  • the partition split fails, the first metadata is not split at this time.
  • the first partition server module re-executes the split operation. If multiple splits fail, the rollback is initiated.
  • the first partition server module can quickly roll back the data sent by the client stored in advance, effectively preventing data loss.
  • the log contains client data.
  • the second partition server module cannot be successfully brought online. At this time, the data in the log cannot be read by the first partition server module, but the first partition server module records the client data at the same time. The client data is also stored in the second partition, so the first partition server module can directly obtain the client data from the second partition, effectively avoiding data loss when the partition split fails.
  • the log may include only the data sent by the client, and the log may also include the data sent by the client and the metadata corresponding to the data sent by the client, which is not limited herein.
  • the log only contains the metadata corresponding to the client data, and the client data is stored in the second partition.
  • the second partition server module calls the data sent by the pre-stored client from the second partition according to the metadata corresponding to the client data, and the client The sent data is stored in the third partition.
  • the same first partition server module can directly obtain the client data from the second partition, effectively avoiding data loss when the partition split fails.
  • the first partition server module needs to determine the data range to which the data sent by the client is sent by the client, and the data to which the client sends the data belongs in this embodiment. Another aspect of the scope is illustrated, increasing the enforceability of the scheme.
  • FIG. 11(a) A data processing method in the embodiment of the present application is described above with reference to FIG. 1 to FIG. 10.
  • FIG. 11(a) a server module according to an embodiment of the present application will be described below.
  • a server module which is a first partition server module 1100, and may include:
  • the receiving unit 1101 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;
  • the snapshot operation unit 1102 is configured to perform a snapshot operation on the first metadata.
  • the splitting unit 1103 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range
  • the metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;
  • the processing unit 1104 is configured to process data sent by the client according to the split result.
  • the first partition server module can split the first metadata according to the snapshot of the first metadata. Since the snapshot operation is performed on the metadata, the metadata to be split is fixed, and the first Even if the partition server module receives the data sent by the client at this time, the partition can be split according to the fixed metadata in the snapshot, and the client data can be processed normally.
  • a possible case is that when the data sent by the client belongs to the data range formed by the data indicated by the second metadata, the data sent by the client Processed by the first partition server module, so the processing unit includes:
  • a first processing sub-unit 11041 configured to store data sent by the client in the second partition
  • the response subunit 11042 is configured to respond to the I/O request corresponding to the data sent by the client if the partition is successfully split.
  • processing unit includes:
  • a second processing sub-unit 11043 configured to write data sent by the client to a log
  • the log is stored in the third partition.
  • the data sent by the client can be stored in the second partition while writing the log to prevent data loss.
  • the receiving unit 1201 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;
  • a snapshot operation unit 1202 configured to perform a snapshot operation on the first metadata
  • the splitting unit 1203 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range
  • the metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;
  • the processing unit 1204 is configured to process data sent by the client according to the split result.
  • a storage unit 1205, configured to store data sent by the client in the second partition
  • the calling unit 1206 is configured to invoke pre-stored data sent by the client from the second partition if the partition splitting fails.
  • the processing unit includes:
  • the second processing sub-unit 12043 is further configured to write data sent by the client to a log;
  • the log is stored in the third partition.
  • this embodiment in order to prevent the loss of client data in the case of failure of partition splitting, this embodiment introduces another possible case of data processing for the client, which increases the diversity of the scheme.
  • the first partition server may split the metadata, and may select the split data to be split or not split, as will be described below.
  • the receiving unit 1301 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;
  • a snapshot operation unit 1302, configured to perform a snapshot operation on the first metadata
  • the splitting unit 1303 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range
  • the metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;
  • the splitting unit 1303 is further configured to split data into data of at least two pieces of data ranges, where the data corresponds to the first metadata, and data of each piece of data range in the data of the at least two pieces of data ranges
  • the metadata of each of the data ranges in the metadata of the at least two pieces of data ranges are in one-to-one correspondence.
  • the storage unit 1304 is configured to store the data corresponding to the second metadata and the second metadata in the second partition, and the data corresponding to the third metadata and the third metadata Stored in the third partition.
  • the processing unit 1305 is configured to process data sent by the client according to the split result.
  • the receiving unit 1301 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;
  • a snapshot operation unit 1302, configured to perform a snapshot operation on the first metadata
  • the splitting unit 1303 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range
  • the metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;
  • a storage unit 1304 configured to store data and the second metadata in the first partition, and store the third metadata in the third partition, the data and the first metadata correspond.
  • the processing unit 1305 is configured to process data sent by the client according to the split result.
  • FIG. 2 shows several possible connections of the first partition server module and the control server module, the client module, and the storage partition. Referring to FIG. 14, the internal result diagram of the first partition server module will be described below.
  • FIG. 14 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
  • the computing device 1400 includes one or more central processing units (CPU) 1422 and a memory 1430 (which is a local storage of the computing device 1400). space).
  • the computing device 1400 also includes one or more memories 1430 (eg, media such as memory, HDD or SSD or tape) for storing program code 1442 or data 1444.
  • the memory 1430 may be a transitory storage medium or a persistent storage medium.
  • Program code 1442 may include one or more modules (not shown), each of which may include a series of instruction operations.
  • the central processor 1422 executes the program code 1442 to implement the functions of the first partition server module described above on the computing device 1400, or to perform the steps performed by the first partition server module described above. Still further, central processor 1422 can be arranged to communicate with storage medium 1430 to perform a series of instruction operations in storage medium 1430.
  • the central processing unit 1422 can perform the steps performed by the first partition server module in the foregoing embodiment according to the instruction operation, including:
  • the split instruction is configured to instruct the first partition server module to split the first metadata, where the first metadata is stored in a first partition, and the metadata is used to indicate data address;
  • the metadata of the at least two pieces of data ranges includes second metadata
  • the third metadata is stored in the second partition
  • the second partition is managed by the first partition server module
  • the third metadata is stored in the third partition
  • the third partition Managed by the second partition server module, the second partition and the third partition are formed by splitting the first partition
  • the data sent by the client is processed according to the split result.
  • Computing device 1400 can also include one or more power sources 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and/or one or more operating systems 1441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 1441 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of cells is only a logical function division.
  • multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • An integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a local client, or a network device, etc.) to perform all or part of the steps of the various embodiments of Figures 2 through 4 of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided in the embodiments of the present application are a data processing method and a related device therefor, which are used for splitting up first metadata according to a snapshot of the first metadata after performing a snapshot operation on the first metadata and processing data sent by a client in the splitting process. The method according to the embodiments of the present application comprises: a first partition server module receives a splitting instruction, the splitting instruction being used to instruct the first partition server module to split up first metadata; the first partition server module performs a snapshot operation on the first metadata; the first partition server module splits up the first metadata into metadata of at least two data ranges according to the snapshot of the first metadata and a pre-configured splitting policy, the metadata of the at least two data ranges comprising second metadata and third metadata, the second metadata being stored in a second partition, and the third metadata being stored in a third partition; and the first partition server module processes data sent by a client according to a splitting result.

Description

一种数据处理方法及其相关设备Data processing method and related equipment 技术领域Technical field

本申请涉及计算机领域,尤其涉及一种数据处理方法及其相关设备。The present application relates to the field of computers, and in particular, to a data processing method and related devices.

背景技术Background technique

现有的分布式系统架构分为存储与计算融合和存储与计算分离两类架构,随着客户端访问量的提高,服务器需要处理的数据流量快速增长,若需要处理的数据量超过了服务器的处理限度,会导致服务器崩溃,因此,无论采用哪一种架构都需要解决节点之间的负载均衡问题,负载均衡是指将数据合理的分摊到多个服务器或操作单元上处理,以避免某些服务器处于空闲状态时,某些服务器处理数据量过大的情况。The existing distributed system architecture is divided into storage and computing convergence and storage and computing separation. As the number of client accesses increases, the data traffic that the server needs to process grows rapidly. If the amount of data to be processed exceeds the server's The processing limit will cause the server to crash. Therefore, no matter which architecture is adopted, the load balancing problem between nodes needs to be solved. Load balancing refers to the reasonable allocation of data to multiple servers or operating units to avoid certain Some servers handle excessive amounts of data when the server is idle.

实现负载均衡的最好手段即对服务器的数据库进行分区,现有的存储计算分离架构对数据的存储和计算是在不同的设备上进行的。数据库分区的过程为:首先,控制服务器选择需要拆分的分区,并通知管理该分区的分区服务器执行拆分命令,同时该分区服务器关闭分区业务,即停止处理客户端发送的数据,标记该分区为下线状态,分区服务器开始对其管理的分区进行拆分,具体的分区拆分方式是对分区的元数据进行拆分,并将该分区元数据拆分为至少两个分区的元数据,拆分完成后,上线这至少两个分区并更新路由表信息,路由表更新完成后,管理两个分区的服务器就可以正常处理客户端发送的数据了。The best way to achieve load balancing is to partition the server's database. The existing storage computing separation architecture performs data storage and calculation on different devices. The process of database partitioning is as follows: First, the control server selects the partition to be split, and notifies the partition server that manages the partition to execute the split command, and the partition server closes the partition service, that is, stops processing the data sent by the client, and marks the partition. As the offline state, the partition server starts to split the partitions it manages. The specific partition splitting method is to split the partition metadata and split the partition metadata into metadata of at least two partitions. After the splitting is completed, the at least two partitions are online and the routing table information is updated. After the routing table is updated, the server managing the two partitions can normally process the data sent by the client.

可见,在对分区服务器的管理的任意一个或多个分区元数据进行拆分时,这时如果接收到客户端的发送的数据,由于该分区服务器的元数据正处于拆分状态,客户端的发送的数据会导致分区的元数据变化,因此该分区服务器必须停止处理客户端数据,在拆分完成后,该分区服务器需要重新确定自身管理的数据范围,并更新路由表信息后才能正常处理I/O请求,可见分区服务器对其管理的数据进行分区的过程中,是无法处理客户端发送的数据的。It can be seen that when any one or more partition metadata managed by the partition server is split, if the data sent by the client is received, the metadata of the partition server is in the split state, and the client sends the data. The data will cause the metadata of the partition to change. Therefore, the partition server must stop processing the client data. After the splitting is completed, the partition server needs to re-determine the data range managed by itself and update the routing table information before the I/O can be processed normally. The request, visible partition server to partition the data it manages, is unable to process the data sent by the client.

发明内容Summary of the invention

本申请实施例提供了一种数据处理方法及其相关设备,用于对第一元数据执行快照操作后,根据第一元数据的快照对第一元数据进行拆分并对拆分过程中客户端发送的数据进行处理。The embodiment of the present application provides a data processing method and a related device thereof, after performing a snapshot operation on the first metadata, splitting the first metadata according to the snapshot of the first metadata and the client in the splitting process The data sent by the terminal is processed.

本申请实施例的第一方面提供了一种数据处理方法,包括:A first aspect of the embodiments of the present application provides a data processing method, including:

第一分区服务器模块接收控制服务器模块发送的拆分指令,该拆分指令用于指示第一分区服务器模块对第一元数据进行拆分,同时控制服务器模块事先向共享存储空间请求了第一元数据被拆分成多个元数据后,多个元数据中第三元数据的存储空间,被拆分前,第一元数据存储于第一分区,第一分区由第一分区服务器管理。The first partition server module receives a split command sent by the control server module, where the split command is used to instruct the first partition server module to split the first metadata, and the control server module requests the first element in the shared storage space in advance. After the data is split into multiple metadata, the storage space of the third metadata in the plurality of metadata is stored in the first partition before being split, and the first partition is managed by the first partition server.

其中,元数据用于指示数据的地址,服务器可以根据元数据找到对应的数据;Wherein, the metadata is used to indicate the address of the data, and the server may find the corresponding data according to the metadata;

所述第一分区服务器模块对所述第一元数据执行快照操作,生成第一元数据的快照,第一元数据的快照也存储在第一分区中;The first partition server module performs a snapshot operation on the first metadata to generate a snapshot of the first metadata, and the snapshot of the first metadata is also stored in the first partition;

所述第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,因此第二元数据可以看做是第一元数据被拆分一部分后剩下的由第一分区服务器模块管理的元数据。所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,第二分区服务器模块由控制服务器模块确定。The first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in the second partition, and the second partition is managed by the first partition server module, so the second metadata can be regarded as the first element The metadata left by the first partition server module remaining after the data is split. The third metadata is stored in a third partition, the third partition is managed by the second partition server module, and the second partition server module is determined by the control server module.

在本实施例中,元数据被拆分的同时分区也被拆分了,因此所述第二分区和所述第三分区由所述第一分区拆分形成;In this embodiment, the partition is also split when the metadata is split, so the second partition and the third partition are formed by splitting the first partition;

所述第一分区服务器模块根据拆分结果对客户端发送的数据进行处理。The first partition server module processes the data sent by the client according to the split result.

本申请实施例具有以下优点:第一分区服务器模块接收拆分指令后,对其管理的第一元数据执行快照操作,并根据所述第一元数据的快照和预置的拆分策略将第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,第二元数据存储于第二分区,第二分区由第一分区服务器管理,第三元数据存储于第三分区,第三分区由第二分区服务器模块管理,随后第一分区服务器模块根据拆分结果对客户端发送的数据进行处理,以此来减轻第一分区服务器模块的数据处理压力。在本申请实施例中,第一分区服务器模块能根据第一元数据的快照对第一元数据进行拆分,由于对元数据执行了快照操作,因此待拆分的元数据是固定的,第一分区服务器模块即使此时接收到客户端发送的数据,也能根据快照中固定不变的元数据对分区进行拆分,同时,还能对客户端数据进行正常处理。The embodiment of the present application has the following advantages: after receiving the split instruction, the first partition server module performs a snapshot operation on the first metadata managed by the first partition server module, and according to the snapshot of the first metadata and the preset splitting strategy, The metadata is split into metadata of at least two pieces of data ranges, the metadata of the at least two pieces of data ranges includes second metadata and third metadata, the second metadata is stored in the second partition, and the second partition is configured by the second partition The first partition server manages, the third metadata is stored in the third partition, and the third partition is managed by the second partition server module, and then the first partition server module processes the data sent by the client according to the split result, thereby The data processing pressure of the first partition server module. In the embodiment of the present application, the first partition server module can split the first metadata according to the snapshot of the first metadata. Since the snapshot operation is performed on the metadata, the metadata to be split is fixed. Even if the partition server module receives the data sent by the client at this time, the partition can be split according to the fixed metadata in the snapshot, and the client data can be processed normally.

基于第一方面,在第一方面的第一种实现方式中,所述客户端发送的数据属于所述第二元数据指示的数据形成的数据范围,所述第一分区服务模块根据拆分结果对客户端发送的数据进行处理包括:According to the first aspect, in a first implementation manner of the first aspect, the data sent by the client belongs to a data range formed by the data indicated by the second metadata, and the first partition service module is configured according to the split result. Processing the data sent by the client includes:

所述第一分区服务器模块将所述客户端发送的数据存储于所述第二分区,第二分区由第一分区服务器模块管理,因此所述分区拆分成功,由所述第一分区服务模块对所述客户端发送的数据对应的I/O请求进行响应。The first partition server module stores data sent by the client in the second partition, and the second partition is managed by the first partition server module, so the partition splitting succeeds, by the first partition service module Responding to an I/O request corresponding to the data sent by the client.

在本实施例中,对客户端发送数据的一种情况进行了说明,增加了方案的可实施性。In this embodiment, a case in which the client transmits data is described, and the implementability of the scheme is increased.

基于第一方面,在第一方面的第二种实现方式中,所述客户端发送的数据属于所述第三元数据指示的数据形成的数据范围,所述第一分区服务模块根据拆分结果对客户端发送的数据进行处理包括:In a second implementation manner of the first aspect, the data sent by the client belongs to a data range formed by the data indicated by the third metadata, and the first partition service module is configured according to the split result. Processing the data sent by the client includes:

由于此时第二分区服务器模块还未上线,所述第一分区服务器模块先将所述客户端发送的数据写入日志,并所述日志存储于所述第三分区,待第二分区服务器模块上线后,第二分区服务器模块可以根据日志记录找到客户端数据。Because the second partition server module is not online yet, the first partition server module first writes the data sent by the client to the log, and the log is stored in the third partition, and waits for the second partition server module. After going online, the second partition server module can find the client data according to the log record.

在本实施例中,对客户端发送数据的另一种情况进行了说明,增加了方案的灵活性。In this embodiment, another case of transmitting data by the client is explained, which increases the flexibility of the scheme.

基于第一方面的第二种实现方式,第一方面的第三种实现方式,所述日志中包含 所述客户端发送的数据;According to a second implementation manner of the first aspect, the third implementation manner of the first aspect, the log includes data sent by the client;

分区拆分成功后,所述第二分区服务器模块可以从所述第三分区中获取所述日志中包含的所述客户端发送的数据,并根据所述客户端发送的数据响应该数据对应的I/O请求。After the partition is successfully split, the second partition server module may obtain data sent by the client included in the log from the third partition, and respond to the data according to the data sent by the client. I/O request.

在本实施例中,日志中可以只包含客户端发送的数据,日志中也可以包含客户端发送的数据的同时也包含客户端发送的数据对应的元数据,具体此处不做限定。In this embodiment, the log may include only the data sent by the client, and the log may also include the data sent by the client and the metadata corresponding to the data sent by the client, which is not limited herein.

在本实施例中,对日志内容的一种情况进行了说明,增加了方案实施例灵活性和多样性。In the present embodiment, a case of log content has been described, which increases the flexibility and diversity of the solution embodiment.

基于第一方面的第二种实现方式,第一方面的第四种实现方式,所述方法还包括:Based on the second implementation manner of the first aspect, the fourth implementation manner of the first aspect, the method further includes:

第一分区服务器模块对客户端数据写日志,且,第一分区服务器模块也将客户端发送的数据存储于第二分区;The first partition server module writes a log to the client data, and the first partition server module also stores the data sent by the client in the second partition;

若所述分区拆分失败,则第一分区服务器模块可以从所述第二分区中调用预先存储的所述客户端发送的数据。If the partition splitting fails, the first partition server module may call pre-stored data sent by the client from the second partition.

在本实施例中,第一分区服务器模块通过将客户端数据存储于第二分区,可以在分区拆分失败后,快速回滚获取事先存储的客户端发送的数据,有效的防止了数据的丢失。In this embodiment, by storing the client data in the second partition, the first partition server module can quickly roll back the data sent by the client stored in advance after the partition splitting fails, thereby effectively preventing data loss. .

基于第一方面的第四种实现方式,第一方面的第五种实现方式,当日志中包含所述客户端发送的数据对应的元数据时;According to the fourth implementation manner of the first aspect, the fifth implementation manner of the first aspect, when the log includes the metadata corresponding to the data sent by the client,

所述分区拆分成功,所述第二分区服务器模块根据所述客户端发送的数据对应的元数据从所述第二分区中获取预先存储的所述客户端发送的数据,并根据获取的客户端发送的数据处理所述客户端发送的数据对应的I/O请求。The partitioning is successful, and the second partitioning server module obtains the pre-stored data sent by the client from the second partition according to the metadata corresponding to the data sent by the client, and according to the obtained client. The data sent by the terminal processes the I/O request corresponding to the data sent by the client.

在本实施例中,对日志内容的另一种情况进行了说明,增加了方案实施例灵活性和多样性。In the present embodiment, another case of log content is illustrated, which increases the flexibility and diversity of the solution embodiment.

基于第一方面及其第一方面的第一种至第五种实现方式中任一种实现方式所述的方法,在第一方面的第六种实现方式中,所述第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据之后,所述方法还包括:The method according to any one of the first to fifth implementation manners of the first aspect, wherein in the sixth implementation manner of the first aspect, the first partition server module is After the snapshot of the first metadata and the preset splitting policy split the first metadata into metadata of at least two pieces of data ranges, the method further includes:

所述第一分区服务器模块将数据拆分为至少两段数据范围的数据,所述数据的地址由所述第一元数据指示,因此所述数据与第一元数据具有对应关系。The first partition server module splits the data into data of at least two pieces of data ranges, and the address of the data is indicated by the first metadata, so the data has a corresponding relationship with the first metadata.

其中,所述至少两段数据范围的数据中每段数据范围的数据与所述至少两段数据范围的元数据中每段数据范围的元数据一一对应。The data of each segment of the data in the data of the at least two segments of data is in one-to-one correspondence with the metadata of each segment of the data in the metadata of the at least two segments of data.

第一分区服务器模块将所述第二元数据及所述第二元数据对应的数据存储于所述第二分区,且,所述第一分区服务器模块将所述第三元数据及所述第三元数据对应的数据存储于所述第三分区。The first partition server module stores the second metadata and the data corresponding to the second metadata in the second partition, and the first partition server module compares the third metadata and the first The data corresponding to the ternary data is stored in the third partition.

在本实施例中,对待拆分的数据拆分后的存储情况进行了说明,增加了方案的完整性。In this embodiment, the storage situation after the split data is split is described, which increases the integrity of the solution.

基于第一方面及其第一方面的第一种至第五种实现方式中任一种实现方式所述的方法,第一方面的第七种实现方式中,所述第一分区服务器模块根据所述第一元数据 的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据之后,所述方法还包括:The method according to any one of the first to fifth implementation manners of the first aspect, wherein the first partition server module according to the seventh implementation manner of the first aspect, After the snapshot of the first metadata and the preset splitting strategy split the first metadata into metadata of at least two pieces of data ranges, the method further includes:

当第一元数据对应的数据没有被拆分时,第一分区服务器模块将第一元数据对应的数据及所述第二元数据存储于所述第一分区,且,所述第一分区服务器模块将所述第三元数据存储于所述第三分区,所述数据与所述第一元数据对应。When the data corresponding to the first metadata is not split, the first partition server module stores the data corresponding to the first metadata and the second metadata in the first partition, and the first partition server The module stores the third metadata in the third partition, and the data corresponds to the first metadata.

在本实施例中,对待拆分的数据没有被拆分时数据的存储情况进行了说明,增加了方案的多样性。In the present embodiment, the storage of data when the data to be split is not split is explained, which increases the diversity of the scheme.

本申请的第二方面提供了一种服务器模块,所述服务器模块为第一分区服务器模块,所述第一分区服务器模块包括:A second aspect of the present application provides a server module, where the server module is a first partition server module, and the first partition server module includes:

接收单元,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;a receiving unit, configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the metadata The address used to indicate the data;

快照操作单元,用于对所述第一元数据执行快照操作;a snapshot operation unit, configured to perform a snapshot operation on the first metadata;

拆分单元,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;a splitting unit, configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, and the element of the at least two pieces of data ranges The data includes second metadata and a third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third partition The third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;

处理单元,用于根据拆分结果对客户端发送的数据进行处理。a processing unit, configured to process data sent by the client according to the split result.

在本实施例中,对第一分区服务器模块所管理分区的拆分方法进行了说明,应用此拆分方法,第一分区服务器模块可以实现在拆分过程中对客户端数据进行处理。In this embodiment, the splitting method of the partition managed by the first partition server module is described. By applying the splitting method, the first partition server module can process the client data in the splitting process.

基于第二方面,在第二方面的第一种实现方式中,所述客户端发送的数据属于所述第二元数据指示的数据形成的数据范围,所述处理单元包括:Based on the second aspect, in a first implementation manner of the second aspect, the data sent by the client belongs to a data range formed by the data indicated by the second metadata, and the processing unit includes:

第一处理子单元,用于将所述客户端发送的数据存储于所述第二分区;a first processing subunit, configured to store data sent by the client in the second partition;

响应子单元,用于若所述分区拆分成功,响应所述客户端发送的数据对应的I/O请求。The response subunit is configured to respond to the I/O request corresponding to the data sent by the client if the partition is successfully split.

在本实施例中,对客户端发送数据的一种情况进行了说明,增加了方案的可实施性。In this embodiment, a case in which the client transmits data is described, and the implementability of the scheme is increased.

基于第二方面,在第二方面的第二种实现方式中,所述客户端发送的数据属于所述第三元数据指示的数据形成的数据范围,所述处理单元包括:In a second implementation manner of the second aspect, the data sent by the client belongs to a data range formed by the data indicated by the third metadata, and the processing unit includes:

第二处理子单元,用于将所述客户端发送的数据写入日志;a second processing subunit, configured to write data sent by the client to a log;

将所述日志存储于所述第三分区。The log is stored in the third partition.

在本实施例中,对客户端发送数据的另一种情况进行了说明,增加了方案的灵活性。In this embodiment, another case of transmitting data by the client is explained, which increases the flexibility of the scheme.

基于第二方面的第二种实现方式,在第二方面的第三种实现方式中,所述第一分区服务器模块还包括:In a second implementation manner of the second aspect, the first partition server module further includes:

存储单元,用于将所述客户端发送的数据存储于所述第二分区;a storage unit, configured to store data sent by the client in the second partition;

调用单元,用于若所述分区拆分失败,从所述第二分区中调用预先存储的所述客 户端发送的数据。And a calling unit, configured to call, from the second partition, the pre-stored data sent by the client if the partition splitting fails.

在本实施例中,第一分区服务器模块通过将客户端数据存储于第二分区,可以在分区拆分失败后,快速回滚获取事先存储的客户端发送的数据,有效的防止了数据的丢失。In this embodiment, by storing the client data in the second partition, the first partition server module can quickly roll back the data sent by the client stored in advance after the partition splitting fails, thereby effectively preventing data loss. .

基于第二方面及其第二方面的第一种至第三种实现方式,在第二方面的第四种实现方式中,所述拆分单元,还用于将数据拆分为至少两段数据范围的数据,所述数据与所述第一元数据对应,所述至少两段数据范围的数据中每段数据范围的数据与所述至少两段数据范围的元数据中每段数据范围的元数据一一对应。Based on the second aspect and the first to third implementation manners of the second aspect, in a fourth implementation manner of the second aspect, the splitting unit is further configured to split data into at least two pieces of data. a range of data, the data corresponding to the first metadata, the data of each piece of data range in the data of the at least two pieces of data range and the element of each piece of data range in the metadata of the at least two pieces of data range The data corresponds one by one.

所述存储单元,还用于将所述第二元数据及所述第二元数据对应的数据存储于所述第二分区,且,将所述第三元数据及所述第三元数据对应的数据存储于所述第三分区。The storage unit is further configured to store the data corresponding to the second metadata and the second metadata in the second partition, and corresponding to the third metadata and the third metadata The data is stored in the third partition.

在本实施例中,对待拆分的数据拆分后的存储情况进行了说明,增加了方案的完整性。In this embodiment, the storage situation after the split data is split is described, which increases the integrity of the solution.

基于第二方面及其第二方面的第一种至第三种实现方式,在第二方面的第五种实现方式中,所述存储单元还用于将数据及所述第二元数据存储于所述第一分区,且,将所述第三元数据存储于所述第三分区,所述数据与所述第一元数据对应。In a fifth implementation manner of the second aspect and the second aspect, in a fifth implementation manner of the second aspect, the storage unit is further configured to store data and the second metadata in The first partition, and storing the third metadata in the third partition, the data corresponding to the first metadata.

在本实施例中,对待拆分的数据没有被拆分时数据的存储情况进行了说明,增加了方案的多样性。In the present embodiment, the storage of data when the data to be split is not split is explained, which increases the diversity of the scheme.

本申请的第三方面提供了一种计算设备,包括处理器和存储器,A third aspect of the present application provides a computing device, including a processor and a memory,

所述处理器执行所述存储器中的程序代码以执行上述方面所述的任意方法。The processor executes program code in the memory to perform any of the methods described in the above aspects.

该计算设备上运行有第一分区服务器模块,或者该计算设备运行时作为第一分区服务器模块。The first partition server module runs on the computing device, or the computing device operates as the first partition server module.

本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。A fourth aspect of the present application provides a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the methods described in the above aspects.

本申请的第五方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。A fifth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the methods described in the various aspects above.

附图说明DRAWINGS

图1为本申请实施例模块功能介绍的示意图;1 is a schematic diagram of a function introduction of a module according to an embodiment of the present application;

图2(a)为本申请实施例分区服务器模块与其他模块连接方式的一种结构示意图;2(a) is a schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application;

图2(b)为本申请实施例分区服务器模块与其他模块连接方式的另一种结构示意图;FIG. 2(b) is another schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application;

图2(c)为本申请实施例分区服务器模块与其他模块连接方式的另一种结构示意图;2(c) is another schematic structural diagram of a method for connecting a partition server module and other modules according to an embodiment of the present application;

图2(d)为本申请实施例分区服务器模块与其他模块连接方式的另一种结构 示意图;2(d) is a schematic diagram showing another structure of a connection mode between a partition server module and other modules according to an embodiment of the present application;

图3为本申请实施例数据处理方法的一个实施例示意图;FIG. 3 is a schematic diagram of an embodiment of a data processing method according to an embodiment of the present application; FIG.

图4为第一元数据快照操作的示意图;4 is a schematic diagram of a first metadata snapshot operation;

图5(a)为本申请实施例的一种元数据及对应的数据的拆分示意图;FIG. 5(a) is a schematic diagram of splitting metadata and corresponding data according to an embodiment of the present application;

图5(b)为本申请实施例的另一种元数据及对应的数据的拆分示意图;FIG. 5(b) is a schematic diagram of splitting another metadata and corresponding data according to an embodiment of the present application;

图6为本申请实施例数据处理方法的另一个实施例示意图;FIG. 6 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application;

图7为本申请实施例数据处理的一种方式的示意图;FIG. 7 is a schematic diagram of a manner of data processing according to an embodiment of the present application; FIG.

图8为本申请实施例数据处理方法的另一个实施例示意图;FIG. 8 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application; FIG.

图9为本申请实施例数据处理的另一种方式的示意图;FIG. 9 is a schematic diagram of another manner of data processing according to an embodiment of the present application; FIG.

图10为第二分区服务器模块获取客户端数据的示意图;10 is a schematic diagram of a second partition server module acquiring client data;

图11(a)为本申请实施例第一分区服务器模块的一个结构示意图;11(a) is a schematic structural diagram of a first partition server module according to an embodiment of the present application;

图11(b)为本申请实施例第一分区服务器模块的另一个结构示意图;FIG. 11(b) is another schematic structural diagram of a first partition server module according to an embodiment of the present application;

图11(c)为本申请实施例第一分区服务器模块的另一个结构示意图;FIG. 11(c) is another schematic structural diagram of a first partition server module according to an embodiment of the present application;

图12为本申请实施例第一分区服务器模块的另一个结构示意图;FIG. 12 is another schematic structural diagram of a first partition server module according to an embodiment of the present application;

图13为本申请实施例第一分区服务器模块的另一个结构示意图;FIG. 13 is another schematic structural diagram of a first partition server module according to an embodiment of the present application;

图14为本申请实施例第一分区服务器模块的另一个结构示意图。FIG. 14 is another schematic structural diagram of a first partition server module according to an embodiment of the present application.

具体实施方式detailed description

如图1所示:客户端包含访问数据库的接口,可以对分区服务器模块的数据库进行访问,控制服务器模块可以对数据根据每个数据的行键不同进行数据拆分后分配给不同的分区服务器模块进行管理维护,负责分区服务器模块的负载均衡以及分区服务器模块的故障管理。分区服务器模块能对控制服务器模块分配的分区进行管理,同时处理对这些分区的I/O(input/out-put)请求。每个分区服务器模块管理的存储分区个数具体此处不做限定,可以如图1中所示每个分区服务器模块只管理一个存储分区,也可以一个分区服务器模块管理多个存储分区。当分区服务器模块管理多个存储分区,多个存储分区中的一个存储分区需要拆分时,此分区进入拆分状态。每个控制服务器模块管理的存储分区中除了存有数据外还存有元数据,元数据是结构化的数据,包含数据的地址信息,通过元数据可以查找到对应的数据。存储分区所需要的存储空间由控制服务器模块从共享存储的存储空间获取,需要说明的是,对数据库进行分区拆分是基于行键区分不同数据后,选择拆分点从而对数据库拆分的。As shown in Figure 1: The client includes an interface to access the database, which can access the database of the partition server module. The control server module can split the data according to the row key of each data and assign it to different partition server modules. Perform management and maintenance, responsible for load balancing of partitioned server modules and fault management of partitioned server modules. The partition server module can manage the partitions allocated by the control server module and process I/O (input/out-put) requests to these partitions. The number of storage partitions managed by each partition server module is not limited herein. Each partition server module may manage only one storage partition as shown in FIG. 1, or one partition server module may manage multiple storage partitions. When a partition server module manages multiple storage partitions, one of the multiple storage partitions needs to be split, and the partition enters the split state. In addition to the data stored in the storage partition managed by each control server module, metadata is stored. The metadata is structured data, and contains address information of the data, and the corresponding data can be found through the metadata. The storage space required by the storage partition is obtained by the control server module from the storage space of the shared storage. It should be noted that the partition splitting of the database is based on the row key to distinguish different data, and then the split point is selected to split the database.

图1所示的功能模块,分区服务器模块、控制服务器模块、共享存储可以在同一计算 机设备内,也可以在不同的计算机设备上,下面以分区服务器模块的个数为3个为例,具体可能的应用场景如下图所示:The function module shown in Figure 1, the partition server module, the control server module, and the shared storage may be in the same computer device or on different computer devices. The following is an example of the number of partition server modules: The application scenario is shown below:

如图2(a)所示,客户端、控制服务器模块、分区服务器模块及其用于存储分区数据的存储空间集成在同一计算设备上,如图2(b)所示,客户端与控制服务器模块在同一物理设备上,控制服务器模块管理多个分区服务器模块,这些分区服务器模块分散在不同的计算设备上,分区的存储空间与分区服务器模块在同一终端设备上,可以理解的是,如图2(b)所示的实现场景中,还有一种可能的情况是客户端与控制服务器模块在不同计算设备上。如图2(c)所示,分区服务器模块与其对应的存储空间可以分散在不同的计算设备上,意味着分区服务器模块可以在某一设备上运行后将数据存储于另一设备的存储空间。如图2(d)所示,用于存储分区的存储设备可以与计算设备是独立分离的两台设备,存储设备与计算设备间通过网络进行信息交互,每个分区服务器管理的分区存储于不同的存储设备中,这些存储设备的存储空间共同组成共享存储。As shown in FIG. 2(a), the client, the control server module, the partition server module, and the storage space for storing the partition data are integrated on the same computing device, as shown in FIG. 2(b), the client and the control server. The module is on the same physical device, and the control server module manages multiple partition server modules. The partition server modules are distributed on different computing devices. The storage space of the partition is on the same terminal device as the partition server module. It can be understood that In the implementation scenario shown in 2(b), there is also a possibility that the client and the control server module are on different computing devices. As shown in FIG. 2(c), the partition server module and its corresponding storage space can be distributed on different computing devices, meaning that the partition server module can store data on the storage space of another device after running on one device. As shown in FIG. 2(d), the storage device used for the storage partition can be separated from the computing device by two devices. The storage device and the computing device exchange information through the network, and the partition managed by each partition server is stored in different In the storage device, the storage space of these storage devices together constitute a shared storage.

当分区服务器模块的个数为N个时,控制服务器确定的第二分区服务器模块,可以为图2(a)至图2(d)中分区服务器模块2至N中的任一个(图2(a)至图2(d))以N等于3为例),所确定的分区服务器模块对应的存储分区或存储设备即为第三分区的存储空间。本实施例中的第一分区服务器模块即为图2(a)至图2(d)结构图中的分区服务器模块1,分区服务器模块1对应的存储分区或存储设备即为拆分前第一分区的存储空间或拆分后第二分区的存储空间。When the number of partition server modules is N, the second partition server module determined by the control server may be any one of the partition server modules 2 to N in FIG. 2(a) to FIG. 2(d) (FIG. 2 (FIG. 2) a) to FIG. 2(d)) taking N equal to 3 as an example), the storage partition or storage device corresponding to the determined partition server module is the storage space of the third partition. The first partition server module in this embodiment is the partition server module 1 in the structural diagrams of FIG. 2(a) to FIG. 2(d), and the storage partition or storage device corresponding to the partition server module 1 is the first before splitting. The storage space of the partition or the storage space of the second partition after the split.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a particular order or order. It is to be understood that the terms so used are interchangeable under appropriate circumstances, and are merely illustrative of the manner in which the objects of the same attribute are used in the description of the embodiments of the present application. In addition, the terms "comprises" and "comprises" and "comprises", and any variations thereof, are intended to cover a non-exclusive inclusion so that a process, method, system, product, or device comprising a series of units is not necessarily limited to those elements, but may include Other units listed or inherent to these processes, methods, products or equipment.

本申请实施例提供了一种数据处理方法,用于分区服务器模块在元数据拆分过程中,对客户端发送的数据进行处理。The embodiment of the present application provides a data processing method for a partition server module to process data sent by a client during a metadata splitting process.

301、第一分区服务器模块接收拆分指令;301. The first partition server module receives a split instruction.

第一分区服务器模块处理一个或多个分区的数据,当一个分区的数据过大,超出第一分区服务器模块的处理能力时,可能导致分区服务器模块崩溃,控制服务器模块负责管理各个分区服务模块处理数据量的均衡,因此控制服务器模块需要将该分区进行拆分,即将该分区的一部分数据请求分配给另一个服务器处理,实现各个服务器间的负载均衡。The first partition server module processes data of one or more partitions. When the data of one partition is too large and exceeds the processing capability of the first partition server module, the partition server module may be crashed, and the control server module is responsible for managing the processing of each partition service module. The amount of data is balanced, so the control server module needs to split the partition, that is, allocate a part of the data request of the partition to another server for load balancing between the servers.

控制服务器模块确定待拆分的第一分区后,向共享存储层申请第三分区的存储空间,第三分区由第一分区拆分形成,第一分区被拆分为至少两个分区,至少两个分区中包含第二分区和第三分区,第二分区占用拆分前的第一分区的存储空间,第三分区占用控制服务器事先申请的存储空间。第二分区服务器模块由控制服务器模块确定,用于管理上述拆分出来的该分区的一部分数据,具体的方法是将这部分数据对应的元数据存储于第三分区, 由第二分区服务器模块管理这部分数据及其对应的元数据,以此来减轻第一分区服务器模块的数据处理压力。例如第一元数据为1-100,被拆分成1-20、20-50、50-70、70-100四段数据范围的元数据,第一分区服务模块和第二分区服务器模块可以分别管理这四段元数据中的任一个,其中,第一分区服务器模块和第二分区服务器模块管理的元数据所形成的数据范围是不同的。After the control server module determines the first partition to be split, applies to the shared storage layer for the storage space of the third partition, where the third partition is formed by splitting the first partition, and the first partition is split into at least two partitions, at least two The partition includes a second partition and a third partition. The second partition occupies the storage space of the first partition before the split, and the third partition occupies the storage space requested by the control server in advance. The second partition server module is determined by the control server module, and is configured to manage a part of the data of the split partition. The specific method is to store the metadata corresponding to the part of the data in the third partition, which is managed by the second partition server module. This part of the data and its corresponding metadata, in order to reduce the data processing pressure of the first partition server module. For example, the first metadata is 1-100, and is split into metadata of four data ranges of 1-20, 20-50, 50-70, and 70-100. The first partition service module and the second partition server module may respectively Any one of the four pieces of metadata is managed, wherein the data range formed by the metadata managed by the first partition server module and the second partition server module is different.

元数据为提供信息资源或数据的一种结构化的数据,是对信息资源的结构化的描述,元数据包含数据集的形成、关系、字段、约束等,分区服务器模块根据元数据可以访问对应的数据。Metadata is a structured data that provides information resources or data. It is a structured description of information resources. Metadata includes the formation, relationships, fields, constraints, etc. of the data set. The partition server module can access the corresponding data according to the metadata. The data.

第一分区服务器模块或第二分区服务器模块管理哪一段元数据,意味着这一段元数据对应的数据也由第一分区服务器模块或第二分区服务器模块管理。例如第一分区服务器模块管理的元数据范围为1-20,1-20范围的元数据对应的数据为1-100,则1-100的数据也由第一分区服务器模块管理,元数据可以作为数据的索引,因此第一分区服务器模块只需要将1-20范围的元数据存储于其管理的第二分区,即可实现对1-20范围的元数据及1-100范围的数据的管理。拆分成功后,客户端I/O请求对应的数据属于1-100范围时,由第一分区服务器模块响应客户端请求。Which piece of metadata is managed by the first partition server module or the second partition server module means that the data corresponding to the piece of metadata is also managed by the first partition server module or the second partition server module. For example, the metadata managed by the first partition server module ranges from 1 to 20, and the data corresponding to the metadata of the range of 1-20 is 1-100. The data of 1-100 is also managed by the first partition server module, and the metadata can be used as The index of the data, so the first partition server module only needs to store the metadata of 1-20 range in the second partition managed by it, and realize the management of the metadata of 1-20 range and the data of 1-100 range. After the split is successful, when the data corresponding to the client I/O request belongs to the 1-100 range, the first partition server module responds to the client request.

在本实施例中,首先第一分区服务器模块接收拆分指令,该拆分指令中携带有待拆分元数据的信息和控制服务器事先为第三分区分配的存储空间信息,第一分区服务器模块可以根据拆分指令对第一元数据进行拆分,且,待拆分元数据(即第一元数据)的信息中包含控制服务器预置的拆分策略,因此第一分区服务器确定第一元数据后即可确定预置的拆分策略。In this embodiment, the first partition server module first receives a split instruction, where the split command carries information about the metadata to be split and storage space information that the control server allocates for the third partition in advance, and the first partition server module may Separating the first metadata according to the splitting instruction, and the information of the to-be-split metadata (ie, the first metadata) includes a splitting policy preset by the control server, so the first partition server determines the first metadata. The preset split strategy can then be determined.

302、第一分区服务器模块对第一元数据执行快照操作;302. The first partition server module performs a snapshot operation on the first metadata.

如下图4所示,第一分区服务器模块对第一元数据执行快照操作,生成第一元数据的快照。执行完快照后第一分区中包括第一元数据,第一元数据所指示的数据、第一元数据快照。可以理解的是,第一分区中还包括拆分指令中携带的第三分区的存储空间信息。As shown in FIG. 4 below, the first partition server module performs a snapshot operation on the first metadata to generate a snapshot of the first metadata. After the snapshot is executed, the first partition includes the first metadata, the data indicated by the first metadata, and the first metadata snapshot. It can be understood that the first partition further includes storage space information of the third partition carried in the split instruction.

303、第一分区服务器模块根据第一元数据的快照和预置的拆分策略将第一元数据拆分为至少两段数据范围的元数据。303. The first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and the preset splitting policy.

第一分区服务器模块根据第一元数据的快照对第一元数据进行拆分,第一分区服务器模块确定预置的拆分策略,该拆分策略包含拆分点信息。该拆分点是根据数据的行键不同确定的,确定数据的拆分点后相应的元数据的拆分位置也就确定了。The first partition server module splits the first metadata according to the snapshot of the first metadata, and the first partition server module determines a preset splitting policy, where the splitting policy includes split point information. The split point is determined according to the row key of the data, and the split position of the corresponding metadata after determining the split point of the data is also determined.

1、一种可能的情况是,第一分区服务器模块将第一元数据拆分成两个分区,即将第一元数据拆成两段元数据,元数据拆分点只有一个。第一分区服务器模块从该拆分点位置将第一元数据拆分为第二元数据和第三元数据,第二元数据存储于第二分区,第三元数据存储于第三分区。1. A possible case is that the first partition server module splits the first metadata into two partitions, that is, splits the first metadata into two pieces of metadata, and only one metadata split point. The first partition server module splits the first metadata into the second metadata and the third metadata from the split point location, the second metadata is stored in the second partition, and the third metadata is stored in the third partition.

2、另一种可能的情况是,第一分区服务器模块将第一元数据拆分成两个以上的分区元数据,该两个以上的分区元数据中包含有第二元数据和第三元数据,此时的元数据的拆分点包括至少两个。例如第一元数据的数据范围为1-100,拆分点分别为20、60,则第一元数据被拆分成三个分区,分别为1-20、20-60、60-100。其中1-20、20-60、60-100中的任意两段数据范围的元数据分别被称为第二元数据和第三元数据,第二元数据存储于第二 分区,第三元数据存储于第三分区。2. Another possible case is that the first partition server module splits the first metadata into two or more partition metadata, and the two or more partition metadata includes the second metadata and the third element. Data, the split point of the metadata at this time includes at least two. For example, if the data range of the first metadata is 1-100 and the split points are 20 and 60 respectively, the first metadata is split into three partitions, which are 1-20, 20-60, and 60-100, respectively. The metadata of any two of the data ranges of 1-20, 20-60, and 60-100 are referred to as second metadata and third metadata, respectively, and the second metadata is stored in the second partition, the third metadata. Stored in the third partition.

在本实施例中,第一分区服务器模块对第一元数据进行拆分的同时,第一分区服务器模块对第一元数据对应的待拆分的数据的处理有如下两种情况。In this embodiment, when the first partition server module splits the first metadata, the first partition server module processes the data to be split corresponding to the first metadata in the following two cases.

A:所述第一分区服务器模块对待拆分数据进行拆分;A: the first partition server module splits the split data;

如图5(a)所示,以第一元数据被拆分为第二元数据和第三元数据为例,第一分区服务器模块对第一元数据进行拆分的同时,可以对第一元数据指示的数据也进行拆分,其拆分的形式是对应元数据的拆分点,在数据的相应位置设置拆分点进行拆分,因此待拆分数据被拆分为第二元数据指示的数据和第三元数据指示的数据,并把第二元数据指示的数据存储于第二分区,第三元数据指示的数据存储于第三分区。As shown in FIG. 5( a ), taking the first metadata into the second metadata and the third metadata as an example, the first partition server module may split the first metadata and may be the first The data indicated by the metadata is also split. The split form is the split point corresponding to the metadata, and the split point is set at the corresponding position of the data for splitting, so the data to be split is split into the second metadata. The indicated data and the data indicated by the third metadata, and the data indicated by the second metadata is stored in the second partition, and the data indicated by the third metadata is stored in the third partition.

B:第一分区服务器模块不对待拆分数据进行拆分;B: The first partition server module does not split the split data;

如图5(b)所示,以第一元数据被拆分为第二元数据和第三元数据为例,一种可能的情况是,第一分区服务器模块只对第一元数据进行拆分,元数据对应的数据并没有进行拆分,在这种情况下,待拆分数据存储于第二分区。拆分完成后,第二分区服务器模块需要从第二分区中获取第三元数据指示的数据并把这些数据存储于第三分区。As shown in FIG. 5(b), taking the first metadata into the second metadata and the third metadata as an example, a possible case is that the first partition server module only splits the first metadata. The data corresponding to the metadata is not split. In this case, the data to be split is stored in the second partition. After the splitting is completed, the second partition server module needs to acquire the data indicated by the third metadata from the second partition and store the data in the third partition.

在本实施例中,第二分区服务器模块从第二分区中获取第三元数据指示的数据的方式是:第二分区服务器模块上线后,进行数据整理时,根据第三元数据中指示的数据地址信息陆续从第一分区的存储空间中获取第三元数据指示的数据,并将这些数据存入第三分区。In this embodiment, the manner in which the second partition server module acquires the data indicated by the third metadata from the second partition is: when the second partition server module is online, when the data is sorted, according to the data indicated in the third metadata. The address information successively acquires the data indicated by the third metadata from the storage space of the first partition, and stores the data in the third partition.

304、第一分区服务器模块根据拆分结果对客户端发送的客户端发送的数据进行处理。304. The first partition server module processes the data sent by the client sent by the client according to the split result.

第一元数据拆分过程中,第一分区服务器模块接收到客户端发送的I/O请求,该客户端可以是终端设备上的一个应用程序,客户端与第一分区服务器模块可以是相同设备上的功能模块,也可以分别在不同的设备上,具体此处不做限定。During the first metadata splitting process, the first partition server module receives the I/O request sent by the client, and the client may be an application on the terminal device, and the client and the first partition server module may be the same device. The function modules on the device can also be on different devices, which are not limited here.

第一分区服务器模块根据预置的拆分策略确定第一元数据的拆分结果,并且确定拆分后形成的第二元数据存储于第二分区,第三元数据存储于第三分区,第一分区服务器模块根据第一元数据的拆分情况及拆分后元数据的存储情况后,对后续客户端发送的数据请求进行处理。The first partition server module determines a split result of the first metadata according to the preset splitting policy, and determines that the second metadata formed after the splitting is stored in the second partition, and the third metadata is stored in the third partition, The one-part server module processes the data request sent by the subsequent client according to the splitting of the first metadata and the storage of the split metadata.

在本实施例中,第一分区服务器模块对第一元数据执行快照操作,根据第一元数据的快照对第一元数据进行拆分,而现有技术中由于客户端不断在发送I/O请求,导致待拆分的第一元数据不断变化,分区无法拆分,因此服务器需要停止接收客户端I/O请求,本实施例通过对元数据执行快照操作后进行拆分,相当于把待拆分的元数据固定在某一时刻不变,因此服务器此时可以正常处理客户端的I/O请求。In this embodiment, the first partition server module performs a snapshot operation on the first metadata, and splits the first metadata according to the snapshot of the first metadata. In the prior art, the client continuously sends I/O. The request causes the first metadata to be split to change continuously, and the partition cannot be split. Therefore, the server needs to stop receiving the client I/O request. In this embodiment, the snapshot is performed after performing the snapshot operation on the metadata, which is equivalent to The split metadata is fixed at a certain time, so the server can process the client's I/O request normally.

在本实施例中,服务器通过快照对第一元数据进行拆分,通过这种方式以达到对I/O请求的正常处理,在本实施例中I/O请求的处理流程有如下两种情况,请参照图6和图7,下面将对其中一种情况进行说明。In this embodiment, the server splits the first metadata by using a snapshot, and in this way, the normal processing of the I/O request is achieved. In this embodiment, the processing flow of the I/O request has the following two situations: Please refer to FIG. 6 and FIG. 7, and one of the cases will be described below.

601、第一分区服务器模块接收拆分指令。601. The first partition server module receives the split instruction.

602、第一分区服务器模块对所述第一元数据执行快照操作;602. The first partition server module performs a snapshot operation on the first metadata.

603、第一分区服务器模块根据第一元数据的快照和预置的拆分策略将第一元数据拆分为至少两段数据范围的元数据。603. The first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and the preset splitting policy.

在本实施例中,实施例步骤601至603与图3所示实施例步骤301至303类似,具体此处 不再赘述。In this embodiment, the steps 601 to 603 of the embodiment are similar to the steps 301 to 303 of the embodiment shown in FIG. 3, and details are not described herein again.

604、第一分区服务器模块根据拆分结果确定第二元数据指示的数据形成的数据范围。604. The first partition server module determines, according to the split result, a data range formed by the data indicated by the second metadata.

如图7所示,以待拆分数据被拆分为例,第一分区服务器模块根据拆分结果确定第一元数据拆分后生成的第二元数据和第三元数据,第二元数据中包含一个或多个元数据,第一分区服务器模块根据第二元数据中每个元数据指示的数据地址查找到对应的数据,直至将第二元数据所对应的数据全部确定完成,第二元数据所对应的数据可以形成一个数据范围,例如第二元数据为1、2、5、10、15、20,对应的数据分别为5、10、15、20、25,则这些数据形成的数据范围为5至25。As shown in FIG. 7 , the data to be split is split into an example, and the first partition server module determines second metadata and third metadata generated after splitting the first metadata according to the split result, and the second metadata. Include one or more metadata, and the first partition server module searches for corresponding data according to the data address indicated by each metadata in the second metadata until all data corresponding to the second metadata is determined to be completed, and second The data corresponding to the metadata may form a data range, for example, the second metadata is 1, 2, 5, 10, 15, 20, and the corresponding data is 5, 10, 15, 20, 25, respectively, and the data is formed. The data range is 5 to 25.

605、第一分区服务器模块将客户端发送的数据存储于第二分区。605. The first partition server module stores the data sent by the client in the second partition.

第一分区服务器模块判断客户端发送的数据所属数据范围,第二元数据所对应数据会形成一个数据范围,当客户端发送的数据属于此数据范围时,第一分区服务器模块将客户端发送的数据写入第二分区,即将客户端发送的数据存储于第二分区的存储空间。如图7所示,数据X属于1-a的数据范围时,1-a数据范围的数据存储于第二分区中,因此第一分区服务模块将数据X写入第二分区。The first partition server module determines the data range to which the data sent by the client belongs, and the data corresponding to the second metadata forms a data range. When the data sent by the client belongs to the data range, the first partition server module sends the data to the client. The data is written into the second partition, that is, the data sent by the client is stored in the storage space of the second partition. As shown in FIG. 7, when the data X belongs to the data range of 1-a, the data of the 1-a data range is stored in the second partition, so the first partition service module writes the data X to the second partition.

606、若分区拆分成功,则第一分区服务模块响应客户端发送的数据对应的I/O请求。606. If the partition splitting succeeds, the first partition service module responds to the I/O request corresponding to the data sent by the client.

当分区拆分成功后,即第一元数据被成功拆分,此时第一分区服务模块管理的数据发生了变化,第一分区服务器模块只管理拆分后分配的数据和拆分过程中客户端写入的数据,第一分区服务器模块通知客户端分区版本更新,客户端发送更新路由表信息的指令至控制服务器,路由表信息更新后,第二分区服务器模块上线,对落入第二分区服务器模块管理范围的数据即控制服务器分配的数据进行处理。After the partition is successfully split, the first metadata is successfully split. At this time, the data managed by the first partition service module changes. The first partition server module only manages the data allocated after the split and the client during the split process. The data written by the terminal, the first partition server module notifies the client partition version update, the client sends an instruction to update the routing table information to the control server, and after the routing table information is updated, the second partition server module goes online, and the pair falls into the second partition. The data managed by the server module is processed by the data allocated by the control server.

客户端发送的数据由第一分区服务器模块进行管理,因此该数据对应的I/O请求由第一分区服务器模块进行响应。The data sent by the client is managed by the first partition server module, so the I/O request corresponding to the data is responded by the first partition server module.

当分区拆分失败时,第一分区没有被拆分,因此第一分区服务器模块管理数据范围不变,且拆分过程中客户端写入的数据同样由第一分区服务器模块管理。When the partition split fails, the first partition is not split, so the first partition server module manages the data range unchanged, and the data written by the client during the splitting process is also managed by the first partition server module.

在本实施例中,第一分区服务器模块在分区拆分过程中客户端数据进行处理时,需要判断客户端发送的客户端发送的数据所属数据范围,本实施例对客户端发送的数据所属数据范围的一种情况进行了说明,增加了方案的可实施性。In this embodiment, when the client data is processed in the partition splitting process, the first partition server module needs to determine the data range to which the data sent by the client is sent by the client, and the data to which the client sends the data belongs in this embodiment. A description of the scope has increased the feasibility of the solution.

请参照图7和图8,在本实施例中客户端I/O请求处理流程的另一种情况如下:Referring to FIG. 7 and FIG. 8, another situation of the client I/O request processing flow in this embodiment is as follows:

801、第一分区服务器模块接收拆分指令。801. The first partition server module receives the split instruction.

802、第一分区服务器模块对第一元数据执行快照操作;802. The first partition server module performs a snapshot operation on the first metadata.

803、第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将第一元数据拆分为至少两段数据范围的元数据。803. The first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy.

在本实施例中,实施例步骤801至803与图3所示实施例步骤301至303类似,具体此处不再赘述。In this embodiment, the steps 801 to 803 of the embodiment are similar to the steps 301 to 303 of the embodiment shown in FIG. 3, and details are not described herein again.

804、第一分区服务器模块根据拆分结果确定第三元数据指示的数据形成的数据范围;804. The first partition server module determines, according to the splitting result, a data range formed by the data indicated by the third metadata.

第一分区服务器根据拆分结果确定第一元数据拆分后生成的第三元数据,第三元数据中包含一个或多个元数据,每个元数据指示一个数据的地址,第一分区服务器模块根据第三元数据中每个元数据指示的数据地址查找到对应的数据,直至将第三元数据所对应的数 据全部确定完成,第三元数据所对应的数据可以形成一个数据范围,例如第三元数据为50、59、65、71、80、88,对应的数据分别为55、60、70、80、90,则这些数据形成的数据范围为55至90。The first partition server determines, according to the split result, the third metadata generated after the first metadata split, the third metadata includes one or more metadata, each metadata indicates an address of the data, and the first partition server The module finds the corresponding data according to the data address indicated by each metadata in the third metadata, until all the data corresponding to the third metadata is determined to be completed, and the data corresponding to the third metadata may form a data range, for example, The third metadata is 50, 59, 65, 71, 80, 88, and the corresponding data is 55, 60, 70, 80, 90, respectively, and the data forms a data range of 55 to 90.

805、第一分区服务器模块将客户端发送的数据写入日志;805. The first partition server module writes data sent by the client to the log.

806、第一分区服务器模块将日志存储于第三分区。806. The first partition server module stores the log in the third partition.

如图7所示,由于分区拆分还未完成,第二分区服务器模块还不能上线工作,因此第一分区服务器模块不能直接客户端发送的数据写入第三分区,而是需要使用写日志的方式,对客户端发送的数据作写前日志,如图10所示,以便于分区拆分完成后,第二分区服务器模块遍历日志,得到客户端发送的数据,并将客户端发送的数据存储于第三分区,客户端发送的数据由第二分区服务器模块进行管理,后续客户端发送该数据对应的I/O请求时,由第二分区服务器模块进行响应。As shown in FIG. 7, since the partition splitting is not completed yet, the second partition server module cannot be online, so the first partition server module cannot directly write the data sent by the client to the third partition, but needs to use the write log. In the manner, the pre-write log is sent to the data sent by the client, as shown in FIG. 10, so that after the partition splitting is completed, the second partition server module traverses the log, obtains the data sent by the client, and stores the data sent by the client. In the third partition, the data sent by the client is managed by the second partition server module, and when the subsequent client sends the I/O request corresponding to the data, the second partition server module responds.

图9为图7中数据X属于第三元数据指示的数据范围时,实施例的一种实现方式,请参照图9,在本实施例中,第一分区服务器模块对客户端发送的数据写日志的同时,也将客户端发送的数据写入第二分区,即将客户端发送的数据存储于第二分区的存储空间。其目的是便于故障处理,同时也是为了解耦。若所述分区拆分失败,此时第一元数据没有被拆分掉。第一分区服务器模块会重新执行拆分操作,若多次拆分失败则发起回滚,第一分区服务器模块可以快速回滚获取事先存储的客户端发送的数据,有效的防止了数据的丢失。FIG. 9 is an implementation manner of the embodiment when the data X in FIG. 7 belongs to the data range indicated by the third metadata. Referring to FIG. 9, in the embodiment, the first partition server module writes data sent by the client. At the same time of the log, the data sent by the client is also written into the second partition, that is, the data sent by the client is stored in the storage space of the second partition. Its purpose is to facilitate fault handling, but also for decoupling. If the partition split fails, the first metadata is not split at this time. The first partition server module re-executes the split operation. If multiple splits fail, the rollback is initiated. The first partition server module can quickly roll back the data sent by the client stored in advance, effectively preventing data loss.

在本实施例中,日志中包含的内容有多种可能的情况,下面将从其中两种可能的情况进行介绍:In this embodiment, there are many possible situations for the content contained in the log. The following two cases will be introduced:

1、日志中包含客户端数据。1. The log contains client data.

若分区拆分成功,第二分区服务器模块上线后,直接从日志中获取数据,并将该数据存储于第三分区;If the partition is successfully split, after the second partition server module is online, the data is directly obtained from the log, and the data is stored in the third partition;

若分区拆分失败,参照图9,第二分区服务器模块无法成功上线,此时日志中的数据第一分区服务器模块无法读取,但是第一分区服务器模块在对客户端数据作日志记录的同时,也在第二分区中存储了客户端数据,因此第一分区服务器模块可以直接从第二分区中获取客户端数据,有效的避免了分区拆分失败时数据的丢失。If the partition split fails, referring to Figure 9, the second partition server module cannot be successfully brought online. At this time, the data in the log cannot be read by the first partition server module, but the first partition server module records the client data at the same time. The client data is also stored in the second partition, so the first partition server module can directly obtain the client data from the second partition, effectively avoiding data loss when the partition split fails.

在本实施例中,日志中可以只包含客户端发送的数据,日志中也可以包含客户端发送的数据的同时也包含客户端发送的数据对应的元数据,具体此处不做限定。In this embodiment, the log may include only the data sent by the client, and the log may also include the data sent by the client and the metadata corresponding to the data sent by the client, which is not limited herein.

2、日志中只包含客户端数据对应的元数据,客户端数据存储于第二分区。2. The log only contains the metadata corresponding to the client data, and the client data is stored in the second partition.

若分区拆分成功,第二分区服务器模块上线后,参照图9,第二分区服务器模块根据客户端数据对应的元数据从第二分区中调用预先存储的客户端发送的数据,并将客户端发送的数据存储于第三分区。If the partition is successfully split, after the second partition server module is online, referring to FIG. 9, the second partition server module calls the data sent by the pre-stored client from the second partition according to the metadata corresponding to the client data, and the client The sent data is stored in the third partition.

若分区拆分失败,同样的第一分区服务器模块可以直接从第二分区中获取客户端数据,有效的避免了分区拆分失败时数据的丢失。If the partition split fails, the same first partition server module can directly obtain the client data from the second partition, effectively avoiding data loss when the partition split fails.

在本实施例中,第一分区服务器模块在分区拆分过程中客户端数据进行处理时,需要判断客户端发送的客户端发送的数据所属数据范围,本实施例对客户端发送的数据所属数据范围的另一种情况进行了说明,增加了方案的可实施性。In this embodiment, when the client data is processed in the partition splitting process, the first partition server module needs to determine the data range to which the data sent by the client is sent by the client, and the data to which the client sends the data belongs in this embodiment. Another aspect of the scope is illustrated, increasing the enforceability of the scheme.

上面图1至图10对本申请实施例的一种数据处理方法进行了叙述,请参照图11(a), 下面将对本申请实施例的一种服务器模块进行说明。A data processing method in the embodiment of the present application is described above with reference to FIG. 1 to FIG. 10. Referring to FIG. 11(a), a server module according to an embodiment of the present application will be described below.

一种服务器模块,该服务器模块为第一分区服务器模块1100,可以包括:A server module, which is a first partition server module 1100, and may include:

接收单元1101,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;The receiving unit 1101 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;

快照操作单元1102,用于对所述第一元数据执行快照操作;The snapshot operation unit 1102 is configured to perform a snapshot operation on the first metadata.

拆分单元1103,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;The splitting unit 1103 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;

处理单元1104,用于根据拆分结果对客户端发送的数据进行处理。The processing unit 1104 is configured to process data sent by the client according to the split result.

在本实施例中,第一分区服务器模块能根据第一元数据的快照对第一元数据进行拆分,由于对元数据执行了快照操作,因此待拆分的元数据是固定的,第一分区服务器模块即使此时接收到客户端发送的数据,也能根据快照中固定不变的元数据对分区进行拆分,同时,还能对客户端数据进行正常处理。In this embodiment, the first partition server module can split the first metadata according to the snapshot of the first metadata. Since the snapshot operation is performed on the metadata, the metadata to be split is fixed, and the first Even if the partition server module receives the data sent by the client at this time, the partition can be split according to the fixed metadata in the snapshot, and the client data can be processed normally.

请参照图11(b),在图11(a)中,一种可能的情况是,当客户端发送的数据属于所述第二元数据指示的数据形成的数据范围时,客户端发送的数据由第一分区服务器模块进行处理,因此处理单元包括:Referring to FIG. 11(b), in FIG. 11(a), a possible case is that when the data sent by the client belongs to the data range formed by the data indicated by the second metadata, the data sent by the client Processed by the first partition server module, so the processing unit includes:

第一处理子单元11041,用于将所述客户端发送的数据存储于所述第二分区;a first processing sub-unit 11041, configured to store data sent by the client in the second partition;

响应子单元11042,用于若所述分区拆分成功,响应所述客户端发送的数据对应的I/O请求。The response subunit 11042 is configured to respond to the I/O request corresponding to the data sent by the client if the partition is successfully split.

在本实施例中,对客户端发送数据所属数据范围的一种情况进行了说明,增加了方案的可实施性。In this embodiment, a case in which the client transmits the data range to which the data belongs is described, and the implementability of the scheme is increased.

请参照图11(c),另一种可能的情况是,当客户端发送的数据属于所述第三元数据指示的数据形成的数据范围时,客户端发送的数据由第二分区服务器模块进行处理,因此处理单元包括:Referring to FIG. 11(c), another possible case is that when the data sent by the client belongs to the data range formed by the data indicated by the third metadata, the data sent by the client is performed by the second partition server module. Processing, so the processing unit includes:

第二处理子单元11043,用于将所述客户端发送的数据写入日志;a second processing sub-unit 11043, configured to write data sent by the client to a log;

将所述日志存储于所述第三分区。The log is stored in the third partition.

在本实施例中,对客户端发送数据所属数据范围的另一种情况进行了说明,增加了方案的灵活性。In this embodiment, another case in which the client sends the data range to which the data belongs is described, which increases the flexibility of the scheme.

请参照图12,客户端发送的数据进行写日志的同时还可以存储于第二分区,以防数据丢失。Referring to FIG. 12, the data sent by the client can be stored in the second partition while writing the log to prevent data loss.

接收单元1201,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;The receiving unit 1201 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;

快照操作单元1202,用于对所述第一元数据执行快照操作;a snapshot operation unit 1202, configured to perform a snapshot operation on the first metadata;

拆分单元1203,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元 数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;The splitting unit 1203 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;

处理单元1204,用于根据拆分结果对客户端发送的数据进行处理。The processing unit 1204 is configured to process data sent by the client according to the split result.

存储单元1205,用于将所述客户端发送的数据存储于所述第二分区;a storage unit 1205, configured to store data sent by the client in the second partition;

调用单元1206,用于若所述分区拆分失败,从所述第二分区中调用预先存储的所述客户端发送的数据。The calling unit 1206 is configured to invoke pre-stored data sent by the client from the second partition if the partition splitting fails.

其中,处理单元包括:The processing unit includes:

第二处理子单元12043,还用于将所述客户端发送的数据写入日志;The second processing sub-unit 12043 is further configured to write data sent by the client to a log;

将所述日志存储于所述第三分区。The log is stored in the third partition.

在本实施例中,为防止分区拆分失败的情况下客户端数据的丢失,本实施例介绍了对客户端数据处理的另一种可能的情况,增加了方案的多样性。In this embodiment, in order to prevent the loss of client data in the case of failure of partition splitting, this embodiment introduces another possible case of data processing for the client, which increases the diversity of the scheme.

请参照图13,第一分区服务器对元数据进行拆分的同时,可以选择对待拆分的数据进行拆分或不进行拆分,下面将进行说明。Referring to FIG. 13, the first partition server may split the metadata, and may select the split data to be split or not split, as will be described below.

接收单元1301,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;The receiving unit 1301 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;

快照操作单元1302,用于对所述第一元数据执行快照操作;a snapshot operation unit 1302, configured to perform a snapshot operation on the first metadata;

拆分单元1303,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;The splitting unit 1303 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;

拆分单元1303,还用于将数据拆分为至少两段数据范围的数据,所述数据与所述第一元数据对应,所述至少两段数据范围的数据中每段数据范围的数据与所述至少两段数据范围的元数据中每段数据范围的元数据一一对应。The splitting unit 1303 is further configured to split data into data of at least two pieces of data ranges, where the data corresponds to the first metadata, and data of each piece of data range in the data of the at least two pieces of data ranges The metadata of each of the data ranges in the metadata of the at least two pieces of data ranges are in one-to-one correspondence.

存储单元1304,用于将所述第二元数据及所述第二元数据对应的数据存储于所述第二分区,且,将所述第三元数据及所述第三元数据对应的数据存储于所述第三分区。The storage unit 1304 is configured to store the data corresponding to the second metadata and the second metadata in the second partition, and the data corresponding to the third metadata and the third metadata Stored in the third partition.

处理单元1305,用于根据拆分结果对客户端发送的数据进行处理。The processing unit 1305 is configured to process data sent by the client according to the split result.

或,or,

接收单元1301,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;The receiving unit 1301 is configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the element The data is used to indicate the address of the data;

快照操作单元1302,用于对所述第一元数据执行快照操作;a snapshot operation unit 1302, configured to perform a snapshot operation on the first metadata;

拆分单元1303,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区 服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;The splitting unit 1303 is configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition;

存储单元1304,用于将数据及所述第二元数据存储于所述第一分区,且,将所述第三元数据存储于所述第三分区,所述数据与所述第一元数据对应。a storage unit 1304, configured to store data and the second metadata in the first partition, and store the third metadata in the third partition, the data and the first metadata correspond.

处理单元1305,用于根据拆分结果对客户端发送的数据进行处理。The processing unit 1305 is configured to process data sent by the client according to the split result.

在本实施例中,对待拆分数据的两种存储情况进行了介绍,增加了方案实施的灵活性。In this embodiment, two storage situations of the data to be split are introduced, which increases the flexibility of the implementation of the solution.

图2示出了第一分区服务器模块与控制服务器模块、客户端模块、存储分区的几种可能的连接情况,请参照图14,下面将对第一分区服务器模块的内部结果示意图进行说明。FIG. 2 shows several possible connections of the first partition server module and the control server module, the client module, and the storage partition. Referring to FIG. 14, the internal result diagram of the first partition server module will be described below.

图14是本发明实施例提供的一种计算设备的结构示意图,该计算设备1400包括一个或一个以上中央处理器(central processing units,CPU)1422和存储器1430(该存储器为计算设备1400的本地存储空间)。该计算设备1400还包括一个或一个以上用于存储程序代码1442或数据1444的存储器1430(例如内存,HDD或SSD或磁带等介质)。其中,存储器1430可以是短暂存储介质或持久存储介质。程序代码1442可以包括一个或一个以上模块(图示没标出),每个模块可以包括一系列指令操作。中央处理器1422执行程序代码1442以在计算设备1400上实现上述第一分区服务器模块的功能,或者运行上述第一分区服务器模块执行的步骤。更进一步地,中央处理器1422可以设置为与存储介质1430通信以执行存储介质1430中的一系列指令操作。FIG. 14 is a schematic structural diagram of a computing device according to an embodiment of the present invention. The computing device 1400 includes one or more central processing units (CPU) 1422 and a memory 1430 (which is a local storage of the computing device 1400). space). The computing device 1400 also includes one or more memories 1430 (eg, media such as memory, HDD or SSD or tape) for storing program code 1442 or data 1444. The memory 1430 may be a transitory storage medium or a persistent storage medium. Program code 1442 may include one or more modules (not shown), each of which may include a series of instruction operations. The central processor 1422 executes the program code 1442 to implement the functions of the first partition server module described above on the computing device 1400, or to perform the steps performed by the first partition server module described above. Still further, central processor 1422 can be arranged to communicate with storage medium 1430 to perform a series of instruction operations in storage medium 1430.

该中央处理器1422可以根据指令操作执行上述实施例中由第一分区服务器模块所执行的步骤,包括:The central processing unit 1422 can perform the steps performed by the first partition server module in the foregoing embodiment according to the instruction operation, including:

接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;Receiving a split instruction, the split instruction is configured to instruct the first partition server module to split the first metadata, where the first metadata is stored in a first partition, and the metadata is used to indicate data address;

对所述第一元数据执行快照操作;Performing a snapshot operation on the first metadata;

根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;And dividing the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the metadata of the at least two pieces of data ranges includes second metadata And the third metadata, the second metadata is stored in the second partition, the second partition is managed by the first partition server module, and the third metadata is stored in the third partition, the third partition Managed by the second partition server module, the second partition and the third partition are formed by splitting the first partition;

根据拆分结果对客户端发送的数据进行处理。The data sent by the client is processed according to the split result.

计算设备1400还可以包括一个或一个以上电源1426,一个或一个以上有线或无线网络接口1450,一个或一个以上输入输出接口1458,和/或,一个或一个以上操作系统1441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。Computing device 1400 can also include one or more power sources 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and/or one or more operating systems 1441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单 元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of cells is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,本地客户端,或者网络设备等)执行本申请图2至图4各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。An integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. The instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a local client, or a network device, etc.) to perform all or part of the steps of the various embodiments of Figures 2 through 4 of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .

以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the foregoing embodiments can still be implemented. The technical solutions described in the examples are modified, or equivalent to some of the technical features, and the modifications or substitutions do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (16)

一种数据处理方法,其特征在于,包括:A data processing method, comprising: 第一分区服务器模块接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;The first partition server module receives the split instruction, where the split instruction is used to instruct the first partition server module to split the first metadata, where the first metadata is stored in the first partition, the metadata The address used to indicate the data; 所述第一分区服务器模块对所述第一元数据执行快照操作;The first partition server module performs a snapshot operation on the first metadata; 所述第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;The first partition server module splits the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, where the at least two pieces of data range The metadata includes second metadata and third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third a partition, the third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition; 所述第一分区服务器模块根据拆分结果对客户端发送的数据进行处理。The first partition server module processes the data sent by the client according to the split result. 根据权利要求1所述的方法,其特征在于,所述客户端发送的数据属于所述第二元数据指示的数据形成的数据范围,所述第一分区服务模块根据拆分结果对客户端发送的数据进行处理包括:The method according to claim 1, wherein the data sent by the client belongs to a data range formed by the data indicated by the second metadata, and the first partition service module sends the client to the client according to the split result. The processing of the data includes: 所述第一分区服务器模块将所述客户端发送的数据存储于所述第二分区;The first partition server module stores data sent by the client in the second partition; 若所述分区拆分成功,则所述第一分区服务模块响应所述客户端发送的数据对应的I/O请求。If the partition splitting succeeds, the first partition service module responds to an I/O request corresponding to the data sent by the client. 根据权利要求1所述的方法,其特征在于,所述客户端发送的数据属于所述第三元数据指示的数据形成的数据范围,所述第一分区服务模块根据拆分结果对客户端发送的数据进行处理包括:The method according to claim 1, wherein the data sent by the client belongs to a data range formed by the data indicated by the third metadata, and the first partition service module sends the data to the client according to the split result. The processing of the data includes: 所述第一分区服务器模块将所述客户端发送的数据写入日志;The first partition server module writes data sent by the client to a log; 所述第一分区服务器模块将所述日志存储于所述第三分区。The first partition server module stores the log in the third partition. 根据权利要求的3所述的方法,其特征在于,所述日志中包含所述客户端发送的数据;The method according to claim 3, wherein the log includes data sent by the client; 所述日志用于所述分区拆分成功后,所述第二分区服务器模块从所述第三分区中获取所述日志中包含的所述客户端发送的数据,所述客户端发送的数据用于所述第二分区服务器模块响应所述客户端发送的数据对应的I/O请求。After the log is used for the partition splitting, the second partition server module acquires data sent by the client included in the log from the third partition, and the data sent by the client is used by the client. The second partition server module responds to an I/O request corresponding to the data sent by the client. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises: 所述第一分区服务器模块将所述客户端发送的数据存储于所述第二分区;The first partition server module stores data sent by the client in the second partition; 若所述分区拆分失败,则所述第一分区服务器模块从所述第二分区中调用预先存储的所述客户端发送的数据。If the partition splitting fails, the first partition server module calls pre-stored data sent by the client from the second partition. 根据权利要求的5所述的方法,其特征在于,所述日志中包含所述客户端发送的数据对应的元数据;The method according to claim 5, wherein the log includes metadata corresponding to data sent by the client; 若所述分区拆分成功,所述日志用于所述第二分区服务器模块根据所述客户端发送的数据对应的元数据从所述第二分区中获取预先存储的所述客户端发送的数据,所述客户端发送的数据用于所述第二分区服务器模块响应所述客户端发送的数据对应的 I/O请求。If the partition is successfully split, the log is used by the second partition server module to obtain, from the second partition, the pre-stored data sent by the client according to the metadata corresponding to the data sent by the client. The data sent by the client is used by the second partition server module to respond to an I/O request corresponding to the data sent by the client. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据之后,所述方法还包括:The method according to any one of claims 1 to 6, wherein the first partition server module splits the first metadata according to a snapshot of the first metadata and a preset splitting policy After the metadata is divided into at least two pieces of data ranges, the method further includes: 所述第一分区服务器模块将数据拆分为至少两段数据范围的数据,所述数据与所述第一元数据对应,所述至少两段数据范围的数据中每段数据范围的数据与所述至少两段数据范围的元数据中每段数据范围的元数据一一对应;The first partition server module splits data into data of at least two pieces of data, the data corresponding to the first metadata, and data and data of each piece of data in the data of the at least two pieces of data range The metadata of each piece of data range in the metadata of at least two pieces of data ranges corresponds one-to-one; 所述第一分区服务器模块将所述第二元数据及所述第二元数据对应的数据存储于所述第二分区,且,所述第一分区服务器模块将所述第三元数据及所述第三元数据对应的数据存储于所述第三分区。The first partition server module stores the data corresponding to the second metadata and the second metadata in the second partition, and the first partition server module uses the third metadata and the The data corresponding to the third metadata is stored in the third partition. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一分区服务器模块根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据之后,所述方法还包括:The method according to any one of claims 1 to 6, wherein the first partition server module splits the first metadata according to a snapshot of the first metadata and a preset splitting policy After the metadata is divided into at least two pieces of data ranges, the method further includes: 所述第一分区服务器模块将数据及所述第二元数据存储于所述第一分区,且,所述第一分区服务器模块将所述第三元数据存储于所述第三分区,所述数据与所述第一元数据对应。The first partition server module stores data and the second metadata in the first partition, and the first partition server module stores the third metadata in the third partition, The data corresponds to the first metadata. 一种服务器模块,其特征在于,所述服务器模块为第一分区服务器模块,所述第一分区服务器模块包括:A server module, wherein the server module is a first partition server module, and the first partition server module includes: 接收单元,用于接收拆分指令,所述拆分指令用于指示所述第一分区服务器模块对第一元数据进行拆分,所述第一元数据存储于第一分区,所述元数据用于指示数据的地址;a receiving unit, configured to receive a splitting instruction, where the splitting instruction is used to instruct the first partitioning server module to split the first metadata, where the first metadata is stored in the first partition, the metadata The address used to indicate the data; 快照操作单元,用于对所述第一元数据执行快照操作;a snapshot operation unit, configured to perform a snapshot operation on the first metadata; 拆分单元,用于根据所述第一元数据的快照和预置的拆分策略将所述第一元数据拆分为至少两段数据范围的元数据,所述至少两段数据范围的元数据包括第二元数据和第三元数据,所述第二元数据存储于第二分区,所述第二分区由所述第一分区服务器模块管理,所述第三元数据存储于第三分区,所述第三分区由所述第二分区服务器模块管理,所述第二分区和所述第三分区由所述第一分区拆分形成;a splitting unit, configured to split the first metadata into metadata of at least two pieces of data ranges according to the snapshot of the first metadata and a preset splitting policy, and the element of the at least two pieces of data ranges The data includes second metadata and a third metadata, the second metadata is stored in a second partition, the second partition is managed by the first partition server module, and the third metadata is stored in a third partition The third partition is managed by the second partition server module, and the second partition and the third partition are formed by splitting the first partition; 处理单元,用于根据拆分结果对客户端发送的数据进行处理。a processing unit, configured to process data sent by the client according to the split result. 根据权利要求9所述的第一分区服务器模块,其特征在于,所述客户端发送的数据属于所述第二元数据指示的数据形成的数据范围,所述处理单元包括:The first partition server module according to claim 9, wherein the data sent by the client belongs to a data range formed by the data indicated by the second metadata, and the processing unit comprises: 第一处理子单元,用于将所述客户端发送的数据存储于所述第二分区;a first processing subunit, configured to store data sent by the client in the second partition; 响应子单元,用于若所述分区拆分成功,响应所述客户端发送的数据对应的I/O请求。The response subunit is configured to respond to the I/O request corresponding to the data sent by the client if the partition is successfully split. 根据权利要求9所述的第一分区服务器模块,其特征在于,所述客户端发送的数据属于所述第三元数据指示的数据形成的数据范围,所述处理单元包括:The first partition server module according to claim 9, wherein the data sent by the client belongs to a data range formed by the data indicated by the third metadata, and the processing unit comprises: 第二处理子单元,用于将所述客户端发送的数据写入日志;a second processing subunit, configured to write data sent by the client to a log; 将所述日志存储于所述第三分区。The log is stored in the third partition. 根据权利要求11所述的第一分区服务器模块,其特征在于,所述第一分区服 务器模块还包括:The first partition server module according to claim 11, wherein the first partition server module further comprises: 存储单元,用于将所述客户端发送的数据存储于所述第二分区;a storage unit, configured to store data sent by the client in the second partition; 调用单元,用于若所述分区拆分失败,从所述第二分区中调用预先存储的所述客户端发送的数据。And a calling unit, configured to invoke pre-stored data sent by the client from the second partition if the partition splitting fails. 根据权利要求9至12中任一项所述的第一分区服务器模块,其特征在于,所述拆分单元,还用于将数据拆分为至少两段数据范围的数据,所述数据与所述第一元数据对应,所述至少两段数据范围的数据中每段数据范围的数据与所述至少两段数据范围的元数据中每段数据范围的元数据一一对应;The first partition server module according to any one of claims 9 to 12, wherein the splitting unit is further configured to split data into data of at least two pieces of data ranges, the data and the Corresponding to the first metadata, the data of each segment of the data in the data of the at least two segments of data is in one-to-one correspondence with the metadata of each segment of the data in the metadata of the at least two segments; 所述存储单元,还用于将所述第二元数据及所述第二元数据对应的数据存储于所述第二分区,且,将所述第三元数据及所述第三元数据对应的数据存储于所述第三分区。The storage unit is further configured to store the data corresponding to the second metadata and the second metadata in the second partition, and corresponding to the third metadata and the third metadata The data is stored in the third partition. 根据权利要求9至12中任一项所述的第一分区服务器模块,其特征在于,所述存储单元还用于将数据及所述第二元数据存储于所述第一分区,且,将所述第三元数据存储于所述第三分区,所述数据与所述第一元数据对应,所述数据与所述第一元数据对应。The first partition server module according to any one of claims 9 to 12, wherein the storage unit is further configured to store data and the second metadata in the first partition, and The third metadata is stored in the third partition, the data corresponds to the first metadata, and the data corresponds to the first metadata. 一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至8中任意一项所述的方法。A computer readable storage medium comprising instructions for causing a computer to perform the method of any one of claims 1 to 8 when the instructions are run on a computer. 一种计算设备,包括处理器和存储器,A computing device, including a processor and a memory, 所述处理器执行所述存储器中的程序代码以执行如权利要求1-8任意一项所述的方法。The processor executes program code in the memory to perform the method of any of claims 1-8.
PCT/CN2019/078091 2018-03-15 2019-03-14 Data processing method and related device therefor Ceased WO2019174608A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810215536.3 2018-03-15
CN201810215536.3A CN110275772B (en) 2018-03-15 2018-03-15 Data processing method and related equipment thereof

Publications (1)

Publication Number Publication Date
WO2019174608A1 true WO2019174608A1 (en) 2019-09-19

Family

ID=67908562

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078091 Ceased WO2019174608A1 (en) 2018-03-15 2019-03-14 Data processing method and related device therefor

Country Status (2)

Country Link
CN (1) CN110275772B (en)
WO (1) WO2019174608A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12026177B2 (en) * 2019-12-27 2024-07-02 Hitachi Vantara Llc Dynamic adaptive partition splitting
CN114547019A (en) * 2020-11-24 2022-05-27 网联清算有限公司 Database reading and writing method, device, server and medium
CN112541038A (en) * 2020-12-01 2021-03-23 杭州海康威视数字技术股份有限公司 Time series data management method, system, computing device and storage medium
CN112883066B (en) * 2021-03-29 2022-07-08 电子科技大学 Method for estimating multi-dimensional range query cardinality on database
CN113722763A (en) * 2021-09-10 2021-11-30 北京沃东天骏信息技术有限公司 Data processing method and device
CN115268816B (en) * 2022-08-17 2026-01-16 维沃移动通信有限公司 Split screen control method and device, electronic equipment and readable storage medium
CN115633006A (en) * 2022-10-10 2023-01-20 中国银行股份有限公司 Method and device for solving data overrun of core service system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521234A (en) * 2010-10-28 2012-06-27 微软公司 Partitioning online databases
CN104765794A (en) * 2015-03-25 2015-07-08 深圳市创梦天地科技有限公司 Database partitioning method and device
US9690671B2 (en) * 2013-11-01 2017-06-27 Cloudera, Inc. Manifest-based snapshots in distributed computing environments

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8595184B2 (en) * 2010-05-19 2013-11-26 Microsoft Corporation Scaleable fault-tolerant metadata service
US9489443B1 (en) * 2013-05-24 2016-11-08 Amazon Technologies, Inc. Scheduling of splits and moves of database partitions
CN106897344A (en) * 2016-07-21 2017-06-27 阿里巴巴集团控股有限公司 The data operation request treatment method and device of distributed data base

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521234A (en) * 2010-10-28 2012-06-27 微软公司 Partitioning online databases
US9690671B2 (en) * 2013-11-01 2017-06-27 Cloudera, Inc. Manifest-based snapshots in distributed computing environments
CN104765794A (en) * 2015-03-25 2015-07-08 深圳市创梦天地科技有限公司 Database partitioning method and device

Also Published As

Publication number Publication date
CN110275772B (en) 2022-12-13
CN110275772A (en) 2019-09-24

Similar Documents

Publication Publication Date Title
WO2019174608A1 (en) Data processing method and related device therefor
US11340672B2 (en) Persistent reservations for virtual disk using multiple targets
CN106843749B (en) Write request processing method, device and device
US10237342B2 (en) Coordinated and high availability storage access
EP3786802B1 (en) Method and device for failover in hbase system
US7966470B2 (en) Apparatus and method for managing logical volume in distributed storage systems
US8805978B1 (en) Distributed cluster reconfiguration
US20240248810A1 (en) Systems and methods for cross-regional back up of distributed databases on a cloud service
CN105933408B (en) A kind of implementation method and device of Redis universal middleware
US20130124916A1 (en) Layout of mirrored databases across different servers for failover
CN107818104B (en) Database deployment method, database deployment device, control equipment and system
US20140059312A1 (en) Recording medium, computer, and information processing system
WO2014107901A1 (en) Data storage method, database storage node failure processing method and apparatus
US7849264B2 (en) Storage area management method for a storage system
WO2018171728A1 (en) Server, storage system and related method
EP4250119A1 (en) Data placement and recovery in the event of partition failures
CN114253936B (en) Capacity shrinking method, device, equipment and medium of distributed database
CN115729693A (en) Data processing method, device, computer equipment, and computer-readable storage medium
US8838768B2 (en) Computer system and disk sharing method used thereby
US20170213046A1 (en) Database Report Offload Server
CN114785798A (en) Node calling method and device, computer equipment and storage medium
WO2005031577A1 (en) Logical partitioning in redundantstorage systems
WO2019232933A1 (en) Data storage method and system employing distributed database
CN112860494A (en) Data center switching method and related equipment thereof
US9256648B2 (en) Data handling in a cloud computing environment

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: 19766511

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: 19766511

Country of ref document: EP

Kind code of ref document: A1