WO2015014152A1 - 一种访问共享内存的方法和装置 - Google Patents

一种访问共享内存的方法和装置 Download PDF

Info

Publication number
WO2015014152A1
WO2015014152A1 PCT/CN2014/078436 CN2014078436W WO2015014152A1 WO 2015014152 A1 WO2015014152 A1 WO 2015014152A1 CN 2014078436 W CN2014078436 W CN 2014078436W WO 2015014152 A1 WO2015014152 A1 WO 2015014152A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
migrated
migrating
index
Prior art date
Application number
PCT/CN2014/078436
Other languages
English (en)
French (fr)
Inventor
李勇
王铁英
鲁水锋
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015014152A1 publication Critical patent/WO2015014152A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • TECHNICAL FIELD Embodiments of the present invention relate to communication technologies, and in particular, to a data migration processing method, apparatus, and system.
  • a key-Va lue type distributed data storage system has a set of multiple keys called a range. Each node is responsible for a part of the range of all key ranges, if a new node joins Or load balancing needs to redistribute the range that is responsible for each node in the cluster, that is, the segmentation of the range and the migration of the data responsible for the range.
  • Embodiments of the present invention provide a data migration processing method, apparatus, and system for improving data migration efficiency in a distributed storage system, thereby improving performance of the distributed storage system.
  • a first aspect of the present invention provides a data migration processing method, including:
  • the migrating node determines the data to be migrated and the data index corresponding to the data to be migrated; the migrating node migrates the data to be migrated and the data index corresponding to the data to be migrated to the migrating node.
  • the migrating node migrates the data to be migrated and the data index corresponding to the to-be-migrated data to the migrating node, including:
  • the migrating node migrates the data to be migrated to the migrating node
  • the migrating node migrates the data index corresponding to the data to be migrated to the migrating node.
  • the migrating node migrates the data index corresponding to the data to be migrated to the migrating node Previously, it also included:
  • the migrating node determines that the data to be migrated is updated
  • the migrating node synchronizes the updated data to the migrating node
  • the egress node updates the data index corresponding to the updated data to be migrated
  • the migrating node migrates the data index corresponding to the data to be migrated to the migrating node, and the migrating node migrates the updated data index corresponding to the updated data to be migrated to the migrating node.
  • the migrating node updates the data index corresponding to the updated data to be migrated, including: After receiving the synchronization data sent by the ingress node, the egress node updates the data index corresponding to the updated data to be migrated.
  • the migrating node determines data to be migrated and
  • the data index corresponding to the data to be migrated includes:
  • the migrating node determines data to be migrated according to keywords in the to-be-migrated interval
  • the migrating node filters the index data corresponding to the data to be migrated from the data index library according to keywords in the to-be-migrated interval.
  • the egress node is filtered from the data index library according to a keyword in the to-be-migrated interval Before the index data corresponding to the data to be migrated, the method further includes:
  • the eviction node sends the first indication information to the migrating node, where the first indication information is used to indicate that the migrating node creates and migrates the migration to be performed after the migration of the data to be migrated is completed.
  • the eviction node sends the second indication information to the migrating node, where the second indication information is used to indicate that the migrating node waits to receive index data corresponding to the data to be migrated.
  • a second aspect of the present invention provides a data migration processing method, including: The migrating node receives the data to be migrated sent by the migrating node and the data index corresponding to the data to be migrated;
  • the migrating node updates the local data and the data index corresponding to the local data according to the data to be migrated and the data index corresponding to the data to be migrated.
  • the inbound node receives the to-be-migrated data and the data index corresponding to the to-be-migrated data sent by the egress node, including:
  • the migrating node receives the data to be migrated sent by the migrating node
  • the inbound node receives a data index corresponding to the to-be-migrated data sent by the egress node.
  • the ingress node receives the data index corresponding to the to-be-migrated data sent by the egress node , Also includes:
  • the migrating node receives updated data sent by the migrating node
  • the inbound node receives the data index corresponding to the data to be migrated sent by the egress node, and includes:
  • the migrating node receives the updated data index corresponding to the updated data to be migrated sent by the migrating node.
  • the moving in node receives an update that is sent by the migrating node and that is corresponding to the updated data to be migrated. Before the data index, it also includes:
  • the migrating node sends a synchronization data success response to the egress node, so that the migrating node updates the data index corresponding to the updated data to be migrated.
  • the method Before sending the data index corresponding to the data to be migrated, the method further includes:
  • the migrating node If the migrating node receives the first indication information sent by the migrating node, the migrating node creates an index corresponding to the to-be-migrated data after the data to be migrated is received. Data
  • the migrating node waits to receive index data corresponding to the to-be-migrated data.
  • an eviction node including:
  • a determining module configured to determine data to be migrated and a data index corresponding to the data to be migrated
  • a migration module configured to migrate the data to be migrated and the data corresponding to the data to be migrated to the ingress node .
  • the migrating module is specifically configured to: migrate the data to be migrated to the migrating node;
  • the data index corresponding to the data to be migrated is migrated to the migration node.
  • the migrating module is further configured to: migrate the data index corresponding to the data to be migrated to the migration Before entering the node, determining that the data to be migrated is updated;
  • the migration module is further configured to synchronize updated data to the migrated node
  • the migrating node further includes:
  • An update module configured to update a data index corresponding to the updated data to be migrated
  • the migration module is further configured to:
  • the updating module is further configured to:
  • the egress node After receiving the synchronization data sent by the ingress node, the egress node updates the data index corresponding to the updated data to be migrated.
  • the determining module is specifically configured to: The keywords in the migration interval determine the data to be migrated;
  • the migrating node further includes: a sending module;
  • the determining module is further configured to determine whether the data index library is in a maintenance state before filtering the index data corresponding to the data to be migrated from the data index library according to a keyword in the interval to be migrated;
  • the sending module sends the first indication information to the migrating node, where the first indication information is used to indicate that the migrating node creates the data to be migrated after the migration of the data to be migrated is completed.
  • Corresponding index data is used to indicate that the migrating node creates the data to be migrated after the migration of the data to be migrated is completed.
  • the sending module sends the second indication information to the migrating node, where the second indication information is used to indicate that the migrating node waits to receive index data corresponding to the data to be migrated.
  • a moving in node including:
  • a receiving module configured to receive data to be migrated sent by the egress node and an index of data corresponding to the data to be migrated;
  • an update module configured to update the local data and the data index corresponding to the local data according to the data to be migrated and the data index corresponding to the data to be migrated.
  • the receiving module is specifically configured to: receive the data to be migrated sent by the egress node;
  • the receiving module is further configured to: Receiving updated data sent by the ejecting node before the data indexing;
  • the receiving module is further configured to:
  • the mobile node further includes: a sending module, configured to send, by the The migrated node is forwarded to the updated data index corresponding to the updated data to be migrated Sending the synchronization data successfully receives the response, so that the egress node updates the data index corresponding to the updated data to be migrated.
  • the moving in node further includes: a processing module And, after receiving the data index corresponding to the to-be-migrated data sent by the migrating node, if receiving the first indication information sent by the migrating node, creating the self-created after the data to be migrated is received Index data corresponding to the data to be migrated; if receiving the second indication information sent by the egress node, waiting to receive index data corresponding to the data to be migrated.
  • a fifth aspect of the present invention provides a system, comprising: the migrating node in any one of the possible implementations of the third aspect or the third aspect, and the possible implementation manner of any one of the fourth aspect or the fourth aspect Moved into the node.
  • the embodiment of the present invention provides a data migration processing method, device, and system.
  • the data to be migrated and the data index corresponding to the data to be migrated are determined by the egress node, and the data to be migrated and the data corresponding to the data to be migrated are migrated out of the node.
  • the index migration to the ingress node can reduce the disk I/O operations of the ingress node during the data migration process, improve the efficiency of data migration in the distributed storage system, and improve the performance of the distributed storage system.
  • Embodiment 1 is a flowchart of Embodiment 1 of a data migration processing method provided by the present invention
  • FIG. 2A is a schematic flowchart of determining data to be migrated and a data index corresponding to data to be migrated in Embodiment 1 of the data migration processing method provided by the present invention
  • FIG. 2B is a schematic diagram of a first embodiment of a data migration processing method according to the present invention
  • FIG. 3 is a flowchart of a second embodiment of a data migration processing method provided by the present invention
  • 4 is a flowchart of Embodiment 3 of a data migration processing method provided by the present invention
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of an eviction node according to the present invention.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of the migrating node provided by the present invention.
  • FIG. 9 is a schematic structural diagram of Embodiment 3 of the migrating node provided by the present invention.
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of an migrating node according to the present invention.
  • FIG. 1 is a schematic structural diagram of Embodiment 2 of an inbound node provided by the present invention
  • FIG. 1 is a schematic structural diagram of Embodiment 3 of the migrating node according to the present invention.
  • FIG. 13 is a schematic structural diagram of Embodiment 1 of the system provided by the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • Embodiment 1 is a flowchart of Embodiment 1 of a data migration processing method provided by the present invention. As shown in FIG. 1, the data migration processing method in this embodiment includes:
  • the S 1 0 migration node determines the data to be migrated and the data index corresponding to the data to be migrated.
  • the egress node migrates the data to be migrated and the data index corresponding to the data to be migrated to the migration node.
  • the scenario applicable to this embodiment is an index migration with data migration in a distributed data storage system.
  • the migrating node is a node that migrates data
  • the migrating node is a node that receives the migrating data.
  • the data index of this embodiment may include an index that is independent of the location of the data in the file, such as a secondary index or a full-text search.
  • the data index, etc. applicable in the process, the storage node usually establishes the secondary
  • the index is used to speed up the range lookup.
  • the range lookup is to implement a request to find all the keys in a range.
  • the query request of the range query is sent to multiple nodes, perform a full table scan query on each node, and merge the results. If the amount of node data is large, the full table scan efficiency is very low.
  • a secondary index is needed to speed up the range lookup.
  • the so-called secondary index records all the sets of keys containing a specific va lue.
  • Table 2 and Table 3 explain the relationship between the secondary index and the original data table.
  • Table 1 is the original data table
  • Table 2 is the secondary index table of the Age column
  • Table 3 is the secondary index table of the Sex column.
  • the secondary index table stores a list of key values ( l i s t ).
  • the node After the node receives the query request, if the column to be queried establishes a secondary index, it may first query the corresponding secondary index table, find a key list that meets the requirements, and then look up the data in the data table according to the found key set. This can greatly reduce the time of full table scan.
  • the data stored in the secondary index in the distributed data storage system only records which keys the column value exists in, and does not involve which file is stored on the disk and the specific storage location in the file. Therefore, this feature of the secondary index can be utilized to improve the performance of data migration in a distributed system.
  • the migrating node first reads data from the disk, determines whether the key is to be migrated, and migrates to the migrating node if it is to be migrated, and then moves the node to read data from the disk again after the data migration is completed, and gives the data. Indexing. It can be seen that in the prior art, the move-out node and the move-in node involve two disk input/output (I/O) operations during the data migration process, which affects the overall performance of the system.
  • I/O disk input/output
  • the S101 may include: the migrating node determines the data to be migrated according to the keyword in the interval to be migrated;
  • the migrating node filters the index data corresponding to the data to be migrated from the data index library according to the keywords in the to-be-migrated interval.
  • FIG. 2A is a schematic flowchart of determining a data to be migrated and a data index corresponding to the data to be migrated in the data migration processing method according to the first embodiment of the present invention.
  • the corresponding data indexing method may include:
  • the egress node determines whether the read keyword is a keyword in the to-be-migrated interval.
  • S1014 The migrated node migrates the to-be-shifted data corresponding to the read keyword.
  • the eviction node fills the read keyword to the data index to be migrated.
  • the migration node determines whether to traverse the keywords in the migration node.
  • the migrating node first reads the key to the memory, and determines whether the key is the key in the range to be migrated. If yes, the data corresponding to the key is determined to be the data to be migrated, and the key is filled to be migrated. In the data index, after all the keys in the evicted node are traversed, the data index corresponding to the segment to be migrated and the data index corresponding to the remaining segment range are generated. It can be understood that the filtered raw data index in the evicted node is logically deleted after the filtering is completed, and is still physically stored in the ejecting node, and is periodically deleted by the system.
  • S 1 02 may include:
  • the migrating node migrates the data to be migrated to the migrating node
  • the migrating node migrates the data index corresponding to the data to be migrated to the migrating node.
  • the migrating node may generate a data index corresponding to the data to be migrated during the migration process of the data to be migrated, and migrate the data index corresponding to the data to be migrated to the data index to be migrated after the data to be migrated is migrated to the migrating node. If the data to be migrated is not migrated, the data index corresponding to the data to be migrated starts to migrate.
  • the migrating node determines the data to be migrated and the data index corresponding to the data to be migrated, and then migrates the data to be migrated and the data index corresponding to the data to be migrated to the migrating node, thereby omitting the migration after the data migration ends.
  • the node performs the process of indexing disk data to improve the system integrity.
  • FIG. 2B is a schematic diagram of the first embodiment of the data migration processing method provided by the present invention. As shown in FIG. 2B, the data migration processing method in this embodiment may include:
  • the S20 egress node reads the disk data into the memory to determine whether the keyword needs to be migrated.
  • the keywords to be migrated are 4, 5, and 6, and the keywords 4, 5, and 6 are distributed in different data files. In this case, two data files need to be scanned.
  • the egress node determines, according to the keyword, whether to add it to the data index table to be migrated.
  • the filtering of the data index may be performed by using the S202.
  • the filtering process of the data index may include: adding a keyword that needs to be migrated to the data index table to be migrated, and obtaining the corresponding segment range to be migrated after the data index filtering is completed.
  • the data index and the data index corresponding to the remaining segment range, and the filtered raw data index in the migrating node is logically deleted after the filtering is completed, and is still physically stored in the migrating node, and the system periodically It is deleted.
  • the migrating node migrates the data to be migrated to the migrating node.
  • the data index table to be migrated has also been generated. S204.
  • the migrating node migrates the data index table corresponding to the data to be migrated to the migrating node.
  • S 202 and S 2 03 may occur simultaneously.
  • the data migration processing method provided in this embodiment is to read the disk data into the memory by the eviction node, determine whether the keyword needs to be migrated, and determine whether to add the data to the data index table to be migrated according to the keyword, and then The data to be migrated and the data index corresponding to the data to be migrated are migrated to the ingress node, which can reduce disk I/O operations during the data migration process of the ingress node, improve the efficiency of data migration in the distributed storage system, and improve the efficiency.
  • the performance of a distributed storage system can reduce disk I/O operations during the data migration process of the ingress node, improve the efficiency of data migration in the distributed storage system, and improve the efficiency.
  • FIG. 3 is a flowchart of a second embodiment of a data migration processing method according to the present invention.
  • the data migration processing method in this embodiment is based on the embodiment shown in FIG.
  • the keywords in the migration interval are filtered from the data index database to obtain the index data corresponding to the data to be migrated, determine whether the data index library is in the maintenance state, and in the scenario where the data is migrated during the data migration process, the node is moved out.
  • the operations performed are described, including:
  • the S 30 migration node determines the data to be migrated.
  • the egress node determines whether the data index library is in a maintenance state. If yes, execute S303; otherwise, execute S304.
  • the migrating node sends the first indication information to the migrating node, where the first indication information is used to indicate that the migrating node creates the index data corresponding to the data to be migrated after the data migration to be migrated is completed.
  • the migrating node sends the second indication information to the migrating node, where the second indication information is used to indicate that the migrating node waits to receive the index data corresponding to the data to be migrated.
  • the egress node determines whether the data index library is in the maintenance state. If the data index library of the ejected node is in the maintenance state (that is, the data index creation state is being created or failed to be created), then the migration is performed. The outbound node cannot filter out the data index file to be migrated. The first indication information needs to be sent to the inbound node to indicate that the index migration is not performed. The inbound node needs to establish itself. Otherwise, the inbound node is notified to receive and migrate data. Corresponding data index.
  • the egress node filters the index data corresponding to the data to be migrated from the data index library according to keywords in the to-be-migrated interval. 5306.
  • the migrating node migrates the data to be migrated to the migrating node.
  • the migrating node determines that the data to be migrated is updated.
  • the migrating node synchronizes the updated data to the migrating node.
  • the migrated node updates and updates the data index corresponding to the data to be migrated.
  • S 309 may include: after receiving the synchronization data successfully received by the ingress node, the egress node updates the data index corresponding to the updated data to be migrated.
  • the migration node determines that the data to be migrated is updated, synchronizes the updated data to the migrated node, and then updates and updates.
  • the data index corresponding to the data to be migrated if there is a write operation for the remaining segment range during the migration process, it is not necessary to perform the above operation of synchronizing the updated data to the migrated node.
  • the migrating node migrates the updated data index corresponding to the updated data to be migrated to the migrating node.
  • the data migration processing method provided in this embodiment determines whether the data index library is in a maintenance state before the migration node extracts the index data corresponding to the data to be migrated from the data index library according to the keyword in the interval to be migrated. No, the second indication information is sent to the ingress node, where the second indication information is used to indicate that the ingress node is waiting to receive the index data corresponding to the data to be migrated, and the data to be migrated is migrated to the inmigrated node, and then the data to be migrated is determined to occur.
  • Update synchronize the updated data to the migrating node, and update the data index corresponding to the updated data to be migrated, and then migrate the updated data index corresponding to the updated data to be migrated to the migrating node, which can be implemented. Reduce the disk I/O operations of the inbound nodes during the data migration process, improve the efficiency of data migration in the distributed storage system, and improve the performance of the distributed storage system.
  • FIG. 4 is a flowchart of a third embodiment of a data migration processing method according to the present invention. As shown in FIG. 4, the data migration processing method in this embodiment includes:
  • the ingress node receives the data to be migrated sent by the egress node and the data index corresponding to the data to be migrated.
  • the ingress node updates the local data and the data index corresponding to the local data according to the data to be migrated and the data index corresponding to the data to be migrated.
  • S402 can include:
  • the ingress node receives the data to be migrated sent by the egress node;
  • the ingress node receives the data index corresponding to the data to be migrated sent by the egress node.
  • the ingress node updates the local data and the data index corresponding to the local data according to the data to be migrated and the data index corresponding to the data to be migrated, and does not need to read data from the disk after the data migration ends, and gives the data. Establish a data index.
  • the data migration processing method provided in this embodiment receives the data to be migrated and the data index corresponding to the data to be migrated, and then updates the local data according to the data to be migrated and the data index corresponding to the data to be migrated.
  • the data index corresponding to the local data can reduce the disk I/O operations of the inbound node during the data migration process, improve the efficiency of data migration in the distributed storage system, and improve the performance of the distributed storage system.
  • the data migration processing method of this embodiment based on the embodiment shown in FIG. 4, describes the operations performed by the ingress node in the scenario in which the data is migrated during the data migration process, including:
  • the S50 ingress node receives the data to be migrated sent by the egress node.
  • the migrating node waits to receive the index data corresponding to the data to be migrated.
  • the migrating node if the migrating node receives the first indication information sent by the migrating node, the migrating node creates the index data corresponding to the data to be migrated after the data to be migrated is received.
  • the inbound node receives the updated data sent by the evacuating node.
  • the ingress node sends the synchronization data to the egress node to successfully receive the response, so that the egress node updates the data index corresponding to the updated data to be migrated.
  • the inbound node receives the updated data index corresponding to the updated data to be migrated sent by the egress node.
  • the data migration processing method after receiving the data to be migrated sent by the egressing node, the receiving node receives the updated data sent by the ejecting node, and sends the synchronization data to the egress node to successfully receive the response, so as to move out.
  • the node updates the data index corresponding to the updated data to be migrated,
  • the updated data index corresponding to the updated data to be migrated sent by the egress node can be used to reduce disk I/O operations during the data migration process of the ingress node, and improve the efficiency of data migration in the distributed storage system. , thereby improving the performance of distributed storage systems.
  • the data migration processing method in this embodiment describes the interaction process between the egress node and the ingress node in detail, including:
  • the evicted node starts to migrate data to be migrated.
  • the migrating node initiates data synchronization between the migrating node and the migrating node.
  • the inbound node starts to receive data to be migrated.
  • the migration node determines whether the data index library is in a maintenance state. If yes, execute S605, otherwise execute S607.
  • the migrating node sends the first indication information to the migrating node.
  • the ingress node After receiving the first indication information, the ingress node waits for the data transmission to be completed, and scans the disk to generate a data index.
  • the migrating node starts filtering the locally stored data index table.
  • the migrating node sends the second indication information to the migrating node.
  • the ingress node determines whether the second indication information is received. If yes, execute S61 0. Otherwise, execute S 61 1.
  • the data index library of the migrating node is in the maintenance state, for example, the data index creation state is being created or the creation fails, because the data index file to be migrated cannot be filtered, the first indication message needs to be sent to the migrating node. This time, no index migration is performed, and the ingress node needs to establish itself; otherwise, the second indication information is sent to the ingress node, and the inbound node is notified to prepare to receive the index.
  • the inbound node waits to receive the data index sent by the egress node.
  • the ingress node determines whether the inbound node is dropped, waiting for the standby node message.
  • the migration node determines that there is a write operation on the data to be migrated.
  • the general principle of writing and reading during the migration process is to move out of the node service before the migration ends and the inbound node does not serve. If there is a write operation for the segment to be migrated during the migration process, In the data migration phase, data synchronization between two nodes is started. For example, the operation is for keywords to be migrated. These data changes need to be synchronized to the ingress node to ensure the consistency of the original data on the two nodes. You need to update the filtered secondary index file to be migrated, add or delete specific keywords in the keyword table, and ensure the consistency of the data index to be migrated.
  • the read keywords are either non-migrated keywords or keywords to be migrated, because the service node is still the data migration node, and the original data index It still exists, so you can complete the read operation by using the secondary index at this time.
  • the migrating node sends the updated data to the migrating node.
  • the egress node determines whether the synchronization data sent by the ingress node is successfully received, and if yes, executes S61 5; otherwise, executes S 61 6 .
  • the migrated node updates the data index corresponding to the updated data to be migrated.
  • the migrating node is the data of the temporary update of the migrating node.
  • the migration node determines that the migration of the data to be migrated is completed.
  • the migrating node sends the updated data index corresponding to the updated data to be migrated to the migrating node.
  • the migration node determines that the data index migration is completed.
  • the new migration request should be sent to the migration node, and the migration node determines the data suitable for the migration, and then completes the The above data migration operation is similar to the process.
  • the drop operation is not performed for the moved node and the ejected node, and the data migration and the data index processing are continued, and the cluster can be utilized after the data migration ends.
  • the table structure synchronization mechanism to complete the dr 0 p operation.
  • a data set (range) that is responsible for the migration node is switched to the standby node of the node, and the standby node has exactly the same data as the previous migration node. Information, so subsequent data migration can continue.
  • the inbound node is down, temporarily offline, or there is a problem with the network, the migrated data will not receive the response from the inbound node. Should wait until the move-in node resumes; at the same time, because the synchronization function is enabled between the two nodes during the data migration process, if the synchronized data (caused by the data operation) does not receive the response, the new generation should be generated.
  • the data is temporarily stored, and the synchronized data is sent after waiting for the moving node to go online.
  • the data migration processing method after receiving the data to be migrated sent by the egressing node, the receiving node receives the updated data sent by the ejecting node, and sends the synchronization data to the egress node to successfully receive the response, so as to move out.
  • the node updates the data index corresponding to the updated data to be migrated, and then receives the updated data index corresponding to the updated data to be migrated sent by the egress node, thereby reducing the disk I in the data migration process of the ingress node.
  • /O operations improve the efficiency of data migration in distributed storage systems, thereby improving the performance of distributed storage systems.
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of the migrating node according to the present invention.
  • the migrating node of the present embodiment includes: a determining module 71 and a migrating module 72, where the determining module 71 is configured to determine The migration data and the data index corresponding to the data to be migrated are used to migrate the data to be migrated and the data index corresponding to the data to be migrated to the migration node.
  • the migration module 72 is specifically configured to:
  • the data index corresponding to the data to be migrated is migrated to the migrated node.
  • the device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 1.
  • the principle and the technical effect are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of the migrating node according to the present invention.
  • the eviction node of this embodiment based on the embodiment shown in FIG. 7, further includes: an update module 73 and a sending The module 74 is further configured to: determine that the data to be migrated is updated before the data index corresponding to the data to be migrated is migrated to the inmigrated node;
  • the migration module 72 is also used to synchronize the updated data to the migration node
  • the update module 73 is configured to update a data index corresponding to the updated data to be migrated;
  • the migration module 72 is further configured to: migrate the updated data index corresponding to the updated data to be migrated to the migration node.
  • the update module 73 is further configured to: after receiving the synchronization data sent by the ingress node, the migration node updates the data index corresponding to the updated data to be migrated.
  • determining module 7 1 is specifically used to:
  • the index data corresponding to the data to be migrated is filtered from the data index library according to keywords in the to-be-migrated interval.
  • the determining module 71 is further configured to determine whether the data index library is in a maintenance state before filtering the index data corresponding to the data to be migrated from the data index library according to keywords in the to-be-migrated interval;
  • the sending module 74 sends the first indication information to the migrating node, where the first indication information is used to indicate that the migrating node creates the index data corresponding to the data to be migrated after the data migration to be migrated is completed.
  • the sending module 74 sends the second indication information to the migrating node, where the second indication information is used to indicate that the migrating node waits to receive the index data corresponding to the data to be migrated.
  • the device in this embodiment may be used to perform the technical solution executed by the migrating node in the embodiment of the method shown in FIG. 3 or the method in the method shown in FIG. 6.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 9 is a schematic structural diagram of Embodiment 3 of the migrating node according to the present invention.
  • the migrating node of this embodiment includes: a transmitter 9 1 , a receiver 92 , a memory 9 3 , and a separate transmission
  • the processor 91, the receiver 92 and the processor 94 are connected to the processor 94.
  • the eviction node may also include a common component such as an antenna, a baseband processing component, a medium-frequency processing component, and an input/output device.
  • the embodiment of the present invention is not limited herein.
  • the memory 931 stores a set of program codes
  • the processor 94 is configured to call the program code stored in the memory 9.3 for performing the following operations:
  • the data to be migrated and the data index corresponding to the data to be migrated are migrated to the migrated node.
  • the apparatus of this embodiment may be used to execute the method embodiment shown in FIG. 3 or the method shown in FIG.
  • the technical solution implemented by the migrating node in the example is similar to the technical solution and will not be described here.
  • FIG. 10 is a schematic structural diagram of Embodiment 1 of the migrating node according to the present invention.
  • the migrating node in this embodiment includes: a receiving module 11 and an updating module 12, where the receiving module 11 is configured to receive The data to be migrated sent by the egress node and the data index corresponding to the data to be migrated; the update module 12 is configured to update the local data and the data index corresponding to the local data according to the data to be migrated and the data index corresponding to the data to be migrated.
  • the receiving module 11 is specifically configured to:
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 4, and the principle and the technical effect are similar, and details are not described herein again.
  • FIG. 11 is a schematic structural diagram of Embodiment 2 of the migrating node according to the present invention.
  • the migrating node of this embodiment based on the embodiment shown in FIG. 10, further includes: a sending module 13 and processing
  • the module 14 is further configured to: before receiving the data index corresponding to the data to be migrated sent by the migrating node, receive the updated data sent by the migrating node; the receiving module 11 is further configured to: receive the sent by the migrating node The updated data index corresponding to the updated data to be migrated.
  • the sending module 13 is configured to send a synchronization data success receiving response to the egress node after receiving the updated data index corresponding to the updated data to be migrated sent by the egress node, so that the egress node updates and updates The data index corresponding to the data to be migrated.
  • the processing module 14 is configured to: before receiving the data index corresponding to the data to be migrated sent by the migrating node, if the first indication information sent by the migrating node is received, the data corresponding to the data to be migrated is created after the data to be migrated is received. Index data; if receiving the second indication information sent by the egress node, waiting to receive index data corresponding to the data to be migrated.
  • FIG. 12 is a schematic structural diagram of Embodiment 3 of the migrating node according to the present invention.
  • the migrating node in this embodiment includes: a transmitter 1 21, a receiver 122, a memory 12 3, and respectively The transmitter 121, the receiver 122, and the processor 124 are connected to the processor 124.
  • the ingress node may also include a common component such as an antenna, a baseband processing component, a medium-frequency processing component, and an input/output device, and the embodiment of the present invention is not limited thereto.
  • the memory 123 stores a set of program codes, and the processor 124 is configured to call the program code stored in the memory 123 for performing the following operations:
  • the device in this embodiment may be used to perform the technical solution executed by the migrating node in the embodiment of the method shown in FIG. 5 or the method in the method shown in FIG. 6.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 13 is a schematic structural diagram of Embodiment 1 of the system provided by the present invention.
  • the system in this embodiment may include: any one of the migration nodes 1 in the embodiment shown in FIG. 7 to FIG. 9 . Any one of the embodiments shown in FIG. 10 and FIG. 10 to FIG. 12 is moved into the node 200.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into 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 components displayed for the unit may or may not be physical units, ie may be located in one place. Or it can be distributed to multiple network elements. 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 invention 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 hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (proce ss or ) to perform the embodiments of the present invention. Part of the steps of the method.
  • the foregoing storage medium includes: a USB flash drive, a removable 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 codes. Medium.

Landscapes

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

Abstract

本发明实施例提供一种数据迁移处理方法、装置及系统,该方法包括:迁出节点确定待迁移数据和与待迁移数据对应的数据索引;迁出节点将待迁移数据和与待迁移数据对应的数据索引迁移到迁入节点。本发明的技术方案,可以实现减少迁入节点在数据迁移过程中磁盘的I/O操作,提高分布式存储系统中数据迁移的效率,进而提高分布式存储系统的性能。

Description

一种访问共享内存的方法和装置
技术领域 本发明实施例涉及通信技术, 尤其涉及一种数据迁移处理方法、 装置 及系统。 背景技术 关键字-对象值 (Key-Va lue ) 类型的分布式数据存储系统中多个 key组 成的集合称为区间 ( range )每个节点负责全部 key range中的一部分 range , 如果有新节点加入或者负载均衡时需要对集群中各个节点负责的 range进行 重新分配, 即进行 range的切分和该 range负责的数据的迁移。
存储系统的性能。 发明内容 本发明实施例提供一种数据迁移处理方法、 装置及系统, 用以提高分布 式存储系统中数据迁移的效率, 进而提高分布式存储系统的性能。
本发明第一方面, 提供一种数据迁移处理方法, 包括:
迁出节点确定待迁移数据和与所述待迁移数据对应的数据索引; 所述迁出节点将所述待迁移数据和与所述待迁移数据对应的数据索引迁 移到迁入节点。
在第一方面的第一种可能的实现方式中, 所述迁出节点将所述待迁移数 据和与所述待迁移数据对应的数据索引迁移到迁入节点, 包括:
所述迁出节点将所述待迁移数据迁移到所述迁入节点;
所述迁出节点将所述待迁移数据对应的数据索引迁移到迁入节点。
根据第一方面的第一种可能的实现方式, 在第一方面的第二种可能的实 现方式中, 所述迁出节点将所述待迁移数据对应的数据索引迁移到迁入节点 之前, 还包括:
所述迁出节点确定所述待迁移数据发生更新;
所述迁出节点将更新的数据同步到所述迁入节点;
所述迁出节点更新与更新后的待迁移数据对应的数据索引;
所述迁出节点将所述待迁移数据对应的数据索引迁移到迁入节点,包括: 所述迁出节点将与更新后的待迁移数据对应的更新后的数据索引迁移到 迁入节点。
根据第一方面的第二种可能的实现方式, 在第一方面的第三种可能的实 现方式中, 所述迁出节点更新与更新后的待迁移数据对应的数据索引, 包括: 所述迁出节点在接收到所述迁入节点发送的同步数据成功接收响应之 后, 更新与更新后的待迁移数据对应的数据索引。
结合第一方面或第一方面的第一种至第三种可能的实现方式中任意一 种, 在第一方面的第四种可能的实现方式中, 所述迁出节点确定待迁移数据 和与所述待迁移数据对应的数据索引, 包括:
所述迁出节点根据待迁移区间中的关键字确定待迁移数据;
所述迁出节点根据待迁移区间中的关键字从数据索引库中过滤得到与所 述待迁移数据对应的索引数据。
根据第一方面的第四种可能的实现方式, 在第一方面的第五种可能的实 现方式中, 所述迁出节点根据待迁移区间中的关键字从数据索引库中过滤得 到与所述待迁移数据对应的索引数据之前, 还包括:
所述迁出节点确定所述数据索引库是否处于维护状态;
若是, 则所述迁出节点向所述迁入节点发送第一指示信息, 所述第一指 示信息用于指示所述迁入节点在所述待迁移数据迁移完成之后自行创建与所 述待迁移数据对应的索引数据;
若否, 则所述迁出节点向所述迁入节点发送第二指示信息, 所述第二指 示信息用于指示所述迁入节点等待接收与所述待迁移数据对应的索引数据。
本发明第二方面, 提供一种数据迁移处理方法, 包括: 迁入节点接收迁出节点发送的待迁移数据和与所述待迁移数据对应的数 据索引;
所述迁入节点根据待迁移数据和与所述待迁移数据对应的数据索引更新 本地数据和与所述本地数据对应的数据索引。
在第二方面的第一种可能的实现方式中, 所述迁入节点接收迁出节点发 送的待迁移数据和与所述待迁移数据对应的数据索引, 包括:
所述迁入节点接收所述迁出节点发送的所述待迁移数据;
所述迁入节点接收所述迁出节点发送的所述待迁移数据对应的数据索 引。
根据第二方面的第一种可能的实现方式, 在第二方面的第二种可能的实 现方式中, 所述迁入节点接收所述迁出节点发送的所述待迁移数据对应的数 据索引之前, 还包括:
所述迁入节点接收所述迁出节点发送的更新的数据;
所述迁入节点接收所述迁出节点发送的所述待迁移数据对应的数据索 引, 包括:
所述迁入节点接收所述迁出节点发送的与更新后的待迁移数据对应的更 新后的数据索引。
根据第二方面的第二种可能的实现方式, 在第二方面的第三种可能的实 现方式中, 所述迁入节点接收所述迁出节点发送的与更新后的待迁移数据对 应的更新后的数据索引之前, 还包括:
所述迁入节点向所述迁出节点发送同步数据成功接收响应, 以使所述迁 出节点更新与更新后的待迁移数据对应的数据索引。
结合第二方面或第二方面的第一种至第三种可能的实现方式中任意一 种, 在第二方面的第四种可能的实现方式中, 所述迁入节点接收所述迁出节 点发送的所述待迁移数据对应的数据索引之前, 还包括:
若所述迁入节点接收到所述迁出节点发送的第一指示信息, 则所述迁入 节点在所述待迁移数据接收完成之后自行创建与所述待迁移数据对应的索引 数据;
若所述迁入节点接收到所述迁出节点发送的第二指示信息, 则所述迁入 节点等待接收与所述待迁移数据对应的索引数据。
本发明第三方面, 提供一种迁出节点, 包括:
确定模块, 用于确定待迁移数据和与所述待迁移数据对应的数据索引; 迁移模块, 用于将所述待迁移数据和与所述待迁移数据对应的数据索 ^ ) 迁移到迁入节点。
在第三方面的第一种可能的实现方式中, 所述迁移模块, 具体用于: 将所述待迁移数据迁移到所述迁入节点;
将所述待迁移数据对应的数据索引迁移到迁入节点。
根据第三方面的第一种可能的实现方式, 在第三方面的第二种可能的实 现方式中, 所述迁移模块, 还用于: 在将所述待迁移数据对应的数据索引迁 移到迁入节点之前, 确定所述待迁移数据发生更新;
所述迁移模块, 还用于将更新的数据同步到所述迁入节点;
所述迁出节点, 还包括:
更新模块, 用于更新与更新后的待迁移数据对应的数据索引;
所述迁移模块, 还用于:
将与更新后的待迁移数据对应的更新后的数据索引迁移到迁入节点。 根据第三方面的第二种可能的实现方式, 在第三方面的第三种可能的实 现方式中, 所述更新模块, 还用于:
所述迁出节点在接收到所述迁入节点发送的同步数据成功接收响应之 后, 更新与更新后的待迁移数据对应的数据索引。
结合第三方面或第三方面的第一种至第三种可能的实现方式中任意一 种, 在第三方面的第四种可能的实现方式中, 所述确定模块, 具体用于: 根据待迁移区间中的关键字确定待迁移数据;
根据待迁移区间中的关键字从数据索引库中过滤得到与所述待迁移数据 对应的索引数据。 根据第三方面的第四种可能的实现方式, 在第三方面的第五种可能的实 现方式中, 所述迁出节点, 还包括: 发送模块;
所述确定模块, 还用于在根据待迁移区间中的关键字从数据索引库中过 滤得到与所述待迁移数据对应的索引数据之前, 确定所述数据索引库是否处 于维护状态;
若是, 则所述发送模块向所述迁入节点发送第一指示信息, 所述第一指 示信息用于指示所述迁入节点在所述待迁移数据迁移完成之后自行创建与所 述待迁移数据对应的索引数据;
若否, 则所述发送模块向所述迁入节点发送第二指示信息, 所述第二指 示信息用于指示所述迁入节点等待接收与所述待迁移数据对应的索引数据。
本发明第四方面, 提供一种迁入节点, 包括:
接收模块, 用于接收迁出节点发送的待迁移数据和与所述待迁移数据对 应的数据索引;
更新模块, 用于根据待迁移数据和与所述待迁移数据对应的数据索引更 新本地数据和与所述本地数据对应的数据索引。
在第四方面的第一种可能的实现方式中, 所述接收模块, 具体用于: 接收所述迁出节点发送的所述待迁移数据;
接收所述迁出节点发送的所述待迁移数据对应的数据索引。
根据第四方面的第一种可能的实现方式, 在第四方面的第二种可能的实 现方式中, 所述接收模块, 还用于在接收所述迁出节点发送的所述待迁移数 据对应的数据索引之前, 接收所述迁出节点发送的更新的数据;
所述接收模块还用于:
接收所述迁出节点发送的与更新后的待迁移数据对应的更新后的数据索 引。
根据第四方面的第二种可能的实现方式, 在第四方面的第三种可能的实 现方式中, 所述迁入节点, 还包括: 发送模块, 用于在接收所述迁出节点发 送的与更新后的待迁移数据对应的更新后的数据索引之前, 向所述迁出节点 发送同步数据成功接收响应, 以使所述迁出节点更新与更新后的待迁移数据 对应的数据索引。
结合第四方面或第四方面的第一种至第三种可能的实现方式中任意一 种, 在第四方面的第四种可能的实现方式中, 所述迁入节点, 还包括: 处理 模块,用于在接收所述迁出节点发送的所述待迁移数据对应的数据索引之前, 若接收到所述迁出节点发送的第一指示信息, 则在所述待迁移数据接收完成 之后自行创建与所述待迁移数据对应的索引数据; 若接收到所述迁出节点发 送的第二指示信息, 则等待接收与所述待迁移数据对应的索引数据。
本发明第五方面, 提供一种系统, 包括: 第三方面或第三方面中任意一 种可能的实现方式中的迁出节点和第四方面或第四方面中任意一种可能的实 现方式中的迁入节点。
本发明实施例提供一种数据迁移处理方法、 装置及系统, 通过迁出节点 确定待迁移数据和与待迁移数据对应的数据索引, 迁出节点再将待迁移数据 和与待迁移数据对应的数据索引迁移到迁入节点, 可以实现减少迁入节点在 数据迁移过程中的磁盘 I /O操作, 提高分布式存储系统中数据迁移的效率, 进而提高分布式存储系统的性能。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明提供的数据迁移处理方法实施例一的流程图;
图 2A 为本发明提供的数据迁移处理方法实施例一中确定待迁移数据和 与待迁移数据对应的数据索引的流程示意图;
图 2B为本发明提供的数据迁移处理方法实施例一的原理示意图; 图 3为本发明提供的数据迁移处理方法实施例二的流程图; 图 4为本发明提供的数据迁移处理方法实施例三的流程图;
图 7为本发明提供的迁出节点实施例一的结构示意图;
图 8为本发明提供的迁出节点实施例二的结构示意图;
图 9为本发明提供的迁出节点实施例三的结构示意图;
图 1 0为本发明提供的迁入节点实施例一的结构示意图;
图 1 1为本发明提供的迁入节点实施例二的结构示意图;
图 1 2为本发明提供的迁入节点实施例三的结构示意图;
图 1 3为本发明提供的系统实施例一的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明提供的数据迁移处理方法实施例一的流程图,如图 1所示, 本实施例的数据迁移处理方法包括:
S 1 0 迁出节点确定待迁移数据和与待迁移数据对应的数据索引。
S 1 02、 迁出节点将待迁移数据和与待迁移数据对应的数据索引迁移到迁 入节点。
本实施例适用的场景为分布式数据存储系统中进行数据迁移时附带索引 迁移。
具体来说, 迁出节点为迁出数据的节点, 迁入节点为接收迁出数据的节 点, 本实施例的数据索引可以包括与数据在文件中位置无关的索引, 例如二 级索引或者全文检索过程中适用的数据索引等, 存储节点通常通过建立二级 索引来加速范围查找, 范围查找是为了实现一次请求查找一个范围内所有的 key , 范围查询的查询请求被发送到多个节点,在每一个节点执行全表扫描查 询, 并对结果进行合并。 如果节点数据量较大, 全表扫描效率非常低, 此时 就需要建立二级索引来加速范围查找, 所谓二级索引就是记录了所有含有一 个特定 va lue的 key的集合, 以下通过表 1、 表 2和表 3来解释二级索引和 原始数据表的关系, 表 1为原始数据表, 表 2为 Age列的二级索引表, 表 3 为 Sex列的二级索引表。
表 1
Figure imgf000009_0001
表 2
Figure imgf000009_0002
表 3
Figure imgf000009_0003
从表 1、 表 2和表 3可以看出, 二级索引表存储的是一系列的 key的列 表( l i s t ) 。
节点接收到查询请求之后, 如果待查询的列建立了二级索引, 可以先查 询对应的二级索引表, 找到符合要求的 key l i s t , 然后根据查找出来的 key 集合, 去数据表中查找数据, 这样就可以大大减少全表扫描的时间。 分布式数据存储系统中的二级索引存储的数据只是记录了某一个列值存 在于哪些 key中, 不涉及存储在磁盘中的哪个文件以及文件中的具体的存储 位置。 所以可以利用二级索引的这一特性提高分布式系统中的数据迁移的性 能。
现有技术中迁出节点首先从磁盘读取数据, 判断该 key是否要被迁移, 如果要被迁移则迁移到迁入节点, 等数据迁移结束之后迁入节点再次从磁盘 读取数据, 给数据建立索引。 可以看出, 现有技术中迁出节点和迁入节点在 数据迁移过程中涉及到两次的磁盘输入 /输出(Input /output , 简称 I /O)操 作, 影响系统整体性能。
可选地, S101可以包括: 迁出节点根据待迁移区间中的关键字确定待迁 移数据;
迁出节点根据待迁移区间中的关键字从数据索引库中过滤得到与待迁移 数据对应的索引数据。
图 2A为本发明提供的数据迁移处理方法实施例一中确定待迁移数据和 与待迁移数据对应的数据索引的流程示意图,如图 2A所示, 本实施例中待迁 移数据和与待迁移数据对应的数据索引的方法, 可以包括:
S101 开始数据迁移。
S1012、 迁出节点从磁盘读出关键字到内存。
S 1013、 迁出节点判断读出的关键字是否为待迁移区间中的关键字。 S1014、 迁出节点迁移读出的关键字对应的待迁数据。
51015、 迁出节点填充读出的关键字至待迁移的数据索引。
51016、 迁出节点判断是否遍历迁移节点中的关键字。
S1017、 数据迁移及索引过滤结束。
具体来说, 迁出节点首先会读取 key到内存, 判断该 key是否为待迁移 的 range中的 key , 若是, 则确定该 key对应的数据为待迁移数据, 同时将 该 key填充至待迁移的数据索引中, 待遍历完迁出节点中的所有 key , 即可 生成待迁移段 range对应的数据索引和剩余段 range对应的数据索引。 可以理解的是, 迁出节点中被过滤的原始数据索引在过滤完成后在逻辑 上处于被删除的状态, 而在物理上仍存储于迁出节点,待系统定期将其删除。
可选地, S 1 02可以包括:
迁出节点将待迁移数据迁移到迁入节点;
迁出节点将待迁移数据对应的数据索引迁移到迁入节点。
具体来说, 迁出节点可以在待迁移数据的迁移过程中, 生成待迁移数据 对应的数据索引, 并在将待迁移数据迁移到迁入节点之后, 再将待迁移数据 对应的数据索引迁移到迁入节点, 可以避免待迁移数据未迁移完成而待迁移 数据对应的数据索引开始迁移的情况。
本实施例中迁出节点确定待迁移数据和与待迁移数据对应的数据索引, 再将待迁移数据和与待迁移数据对应的数据索引迁移到迁入节点, 省去了数 据迁移结束后迁入节点进行磁盘数据扫描建立索引的过程, 提高系统整体性
•6匕
fi 。
图 2B为本发明提供的数据迁移处理方法实施例一的原理示意图, 如图 2B所示, 本实施例的数据迁移处理方法, 可以包括:
S20 迁出节点读取磁盘数据到内存, 判断该关键字是否需要被迁移。 本实施例以要迁移的关键字为 4、 5、 6, 而关键字 4、 5、 6又分布在不 同的数据文件中, 此时就需要扫描两个数据文件。
5202、 迁出节点根据该关键字判断是否要将其加入到待迁移的数据索引 表中。
具体来说,通过 S202可以完成数据索引的过滤,数据索引的过滤过程可 以包括: 将确定需要迁移的关键字添加入待迁移的数据索引表中, 数据索引 过滤完成后得到待迁移段 range对应的数据索引和剩余段 range对应的数据 索引, 而迁出节点中被过滤的原始数据索引在过滤完成后在逻辑上处于被删 除的状态, 而在物理上仍存储于迁出节点, 待系统定期将其删除。
5203、 迁出节点将待迁移数据迁移到迁入节点。
待迁移数据迁移完成之后, 待迁移的数据索引表也已经生成。 S 204、 迁出节点将待迁移数据对应的数据索引表迁移到迁入节点。
需要说明的是, S 202和 S 2 03可以是同时发生的。
本实施例提供的数据迁移处理方法,通过迁出节点读取磁盘数据到内存, 判断该关键字是否需要被迁移, 根据该关键字判断是否要将其加入到待迁移 的数据索引表中, 再将待迁移数据和与待迁移数据对应的数据索引迁移到迁 入节点, 可以实现减少迁入节点在数据迁移过程中的磁盘 I / O操作, 提高分 布式存储系统中数据迁移的效率, 进而提高分布式存储系统的性能。
图 3为本发明提供的数据迁移处理方法实施例二的流程图,如图 3所示, 本实施例的数据迁移处理方法, 在图 1所示实施例的基础上, 迁出节点在根 据待迁移区间中的关键字从数据索引库中过滤得到与待迁移数据对应的索引 数据之前, 确定数据索引库是否处于维护状态, 并对数据迁移过程中存在写 入操作的场景中, 迁出节点所执行的操作进行说明, 包括:
S 30 迁出节点确定待迁移数据。
5302、 迁出节点确定数据索引库是否处于维护状态,若是, 则执行 S 303 ; 否则, 执行 S 304。
5303、 迁出节点向迁入节点发送第一指示信息, 第一指示信息用于指示 迁入节点在待迁移数据迁移完成之后自行创建与待迁移数据对应的索引数 据。
5304、 迁出节点向迁入节点发送第二指示信息, 第二指示信息用于指示 迁入节点等待接收与待迁移数据对应的索引数据。
具体来说, 待迁移数据迁移开始之后, 迁出节点确定数据索引库是否处 于维护状态, 若迁出节点的数据索引库处于维护状态 (即数据索引创建状态 为正在创建或创建失败) , 则迁出节点无法过滤出待迁移的数据索引文件, 需要发送第一指示信息给迁入节点表示本次不进行索引迁移, 迁入节点需要 自行建立; 反之, 则通知迁入节点准备接收与待迁移数据对应的数据索引。
S 305、 迁出节点根据待迁移区间中的关键字从数据索引库中过滤得到与 待迁移数据对应的索引数据。 5306、 迁出节点将待迁移数据迁移到迁入节点。
5307、 迁出节点确定待迁移数据发生更新。
5308、 迁出节点将更新的数据同步到迁入节点。
5309、 迁出节点更新与更新后的待迁移数据对应的数据索引。
可选地, S 309可以包括: 迁出节点在接收到迁入节点发送的同步数据成 功接收响应之后, 更新与更新后的待迁移数据对应的数据索引。
具体来说, 本实施例中, 若迁移过程中对于待迁移段 range有写入操作, 则迁出节点确定待迁移数据发生更新, 将更新的数据同步到迁入节点, 再更 新与更新后的待迁移数据对应的数据索引; 若迁移过程中对于剩余段 range 有写入操作, 则不需要执行上述将更新的数据同步到迁入节点的操作。
S 31 0、 迁出节点将与更新后的待迁移数据对应的更新后的数据索引迁移 到迁入节点。
本实施例提供的数据迁移处理方法, 通过迁出节点在根据待迁移区间中 的关键字从数据索引库中过滤得到与待迁移数据对应的索引数据之前, 确定 数据索引库是否处于维护状态, 若否, 则向迁入节点发送第二指示信息, 第 二指示信息用于指示迁入节点等待接收与待迁移数据对应的索引数据, 将待 迁移数据迁移到迁入节点, 再确定待迁移数据发生更新, 将更新的数据同步 到迁入节点, 并更新与更新后的待迁移数据对应的数据索引, 再将与更新后 的待迁移数据对应的更新后的数据索引迁移到迁入节点, 可以实现减少迁入 节点在数据迁移过程中的磁盘 I /O操作, 提高分布式存储系统中数据迁移的 效率, 进而提高分布式存储系统的性能。
图 4为本发明提供的数据迁移处理方法实施例三的流程图,如图 4所示, 本实施例的数据迁移处理方法, 包括:
5401、 迁入节点接收迁出节点发送的待迁移数据和与待迁移数据对应的 数据索引。
5402、 迁入节点根据待迁移数据和与待迁移数据对应的数据索引更新本 地数据和与本地数据对应的数据索引。 可选地, S402可以包括:
迁入节点接收迁出节点发送的待迁移数据;
迁入节点接收迁出节点发送的待迁移数据对应的数据索引。
具体来说, 迁入节点根据待迁移数据和与待迁移数据对应的数据索引更 新本地数据和与本地数据对应的数据索引,而不需要再在数据迁移结束之后, 从磁盘读取数据, 给数据建立数据索引。
本实施例提供的数据迁移处理方法, 通过迁入节点接收迁出节点发送的 待迁移数据和与待迁移数据对应的数据索引, 再根据待迁移数据和与待迁移 数据对应的数据索引更新本地数据和与本地数据对应的数据索引, 可以实现 减少迁入节点在数据迁移过程中的磁盘 I /O操作, 提高分布式存储系统中数 据迁移的效率, 进而提高分布式存储系统的性能。 本实施例的数据迁移处理方法, 在图 4所示实施例的基础上, 对数据迁移过 程中存在写入操作的场景中, 迁入节点所执行的操作进行说明, 包括:
S50 迁入节点接收迁出节点发送的待迁移数据。
S502、 若迁入节点接收到迁出节点发送的第二指示信息, 则迁入节点等 待接收与待迁移数据对应的索引数据。
可选地, 若迁入节点接收到迁出节点发送的第一指示信息, 则迁入节点 在待迁移数据接收完成之后自行创建与待迁移数据对应的索引数据。
S503、 迁入节点接收迁出节点发送的更新的数据。
5504、 迁入节点向迁出节点发送同步数据成功接收响应, 以使迁出节点 更新与更新后的待迁移数据对应的数据索引。
5505、 迁入节点接收迁出节点发送的与更新后的待迁移数据对应的更新 后的数据索引。
本实施例提供的数据迁移处理方法, 通过迁入节点接收迁出节点发送的 待迁移数据之后, 接收迁出节点发送的更新的数据, 向迁出节点发送同步数 据成功接收响应,以使迁出节点更新与更新后的待迁移数据对应的数据索引, 再接收迁出节点发送的与更新后的待迁移数据对应的更新后的数据索引, 可 以实现减少迁入节点在数据迁移过程中的磁盘 I /O操作, 提高分布式存储系 统中数据迁移的效率, 进而提高分布式存储系统的性能。 本实施例的数据迁移处理方法, 对迁出节点和迁入节点的交互过程进行详细 说明, 包括:
5601、 迁出节点开始迁移待迁移数据。
5602、 迁出节点启动迁出节点与迁入节点之间的数据同步。
5603、 迁入节点开始接收待迁移数据。
S604、 迁出节点判断数据索引库是否处于维护状态,若是, 则执行 S 605 , 否则执行 S607。
5605、 迁出节点向迁入节点发送第一指示信息。
5606、 迁入节点接收到第一指示信息后, 等待数据发送完成, 扫描磁盘 生成数据索引。
S607、 迁出节点开始过滤本地存储的数据索引表。
5608、 迁出节点向迁入节点发送第二指示信息。
5609、 迁入节点判断是否接收到第二指示信息, 若是, 执行 S61 0 , 否则, 执行 S 61 1。
具体来说, 若迁出节点的数据索引库处于维护状态, 例如数据索引创建 状态为正在创建或创建失败, 因为无法过滤出待迁移的数据索引文件, 需要 发送第一指示消息给迁入节点表示本次不进行索引迁移, 迁入节点需要自行 建立; 反之则向迁入节点发送第二指示信息, 通知迁入节点准备接收索引。
561 0、 迁入节点等待接收迁出节点发送的数据索引。
561 1、 迁入节点确定是否迁入节点掉线, 等待备用节点消息。
S61 2、 迁出节点确定待迁移数据存在写入操作。
具体来说, 迁移过程中的写与读的总体原则是迁移结束前迁出节点服务 而迁入节点不服务。 若迁移过程中对于待迁移段 range有写入操作, 则需要 在数据迁移阶段开启两个节点之间的数据同步, 如操作针对的是待迁出的关 键字, 这些数据更改需要同步到迁入节点, 保证原始数据在两个节点上的一 致性; 同时, 需要更新过滤出的待迁移的二级索引文件, 增加或者删除关键 字表中的特定关键字, 保证待迁移的数据索引的一致性; 若迁移过程中对于 剩余段 range有写入操作, 则不需要开启两个节点之间的数据同步; 若迁移 过程中有读操作, 读的关键字不管是非迁移的关键字还是待迁移的关键字, 因为服务节点还是数据迁出节点, 而原始的数据索引仍然存在, 所以此时可 以通过使用二级索引完成读操作。
S61 3、 迁出节点向迁入节点发送更新的数据。
S614、迁出节点判断是否接收到迁入节点发送的同步数据成功接收响应, 若是, 则执行 S61 5 , 否则, 执行 S 61 6。
561 5、 迁出节点更新与更新后的待迁移数据对应的数据索引。
561 6、 迁出节点为迁入节点暂存更新的数据。
561 7、 迁出节点确定待迁移数据迁移完成。
S61 8、 迁出节点向迁入节点发送与更新后的待迁移数据对应的更新后的 数据索引。
S61 9、 迁入节点确定数据索引迁移完成。
进一步地, 若数据迁移过程中有新的数据迁移请求, 由于迁移过程中迁 入节点不提供服务, 所以新的迁移请求应该发往迁出节点, 迁出节点确定适 合迁移的数据, 然后完成和上述数据迁移操作类似的过程。
若数据迁移过程中有表的 drop操作或者数据索引的 drop操作, 则对于 迁入节点和迁出节点都不执行 drop操作, 继续数据的迁移和数据索引的处 理, 在数据迁移结束之后可以利用集群的表结构同步机制来完成 d r 0 p操作。
若数据迁移过程中数据迁出节点发生宕机, 该迁出节点负责的一段数据 集合( range )会被切换到该节点的备用节点上, 该备用节点上具有和之前迁 出节点完全一样的数据信息, 所以随后的数据迁移可以继续完成。 若迁入节 点宕机、暂时离线或网络出现问题, 此时迁移的数据收不到迁入节点的响应, 应该等待, 直到迁入节点重新恢复; 同时因为在数据迁移过程中, 两个节点 之间开启了同步功能, 如果同步的数据(数据操作造成的)也接收不到响应, 此时应该把新生成的数据暂存, 等待迁入节点上线之后把同步的数据发送过 去
本实施例提供的数据迁移处理方法, 通过迁入节点接收迁出节点发送的 待迁移数据之后, 接收迁出节点发送的更新的数据, 向迁出节点发送同步数 据成功接收响应,以使迁出节点更新与更新后的待迁移数据对应的数据索引, 再接收迁出节点发送的与更新后的待迁移数据对应的更新后的数据索引, 可 以实现减少迁入节点在数据迁移过程中的磁盘 I /O操作, 提高分布式存储系 统中数据迁移的效率, 进而提高分布式存储系统的性能。
图 7为本发明提供的迁出节点实施例一的结构示意图, 如图 7所示, 本 实施例的迁出节点, 包括: 确定模块 71和迁移模块 72 , 其中, 确定模块 71 用于确定待迁移数据和与待迁移数据对应的数据索引;迁移模块 72用于将待 迁移数据和与待迁移数据对应的数据索引迁移到迁入节点。
可选地, 迁移模块 72具体用于:
将待迁移数据迁移到迁入节点;
将待迁移数据对应的数据索引迁移到迁入节点。
本实施例的装置, 可以用于执行图 1所示方法实施例的技术方案, 其实 现原理和技术效果类似, 此处不再赘述。
图 8为本发明提供的迁出节点实施例二的结构示意图, 如图 8所示, 本 实施例的迁出节点, 在图 7所示实施例的基础上, 还包括: 更新模块 73和发 送模块 74 , 其中, 迁移模块 72还用于: 在将待迁移数据对应的数据索引迁 移到迁入节点之前, 确定待迁移数据发生更新;
迁移模块 72还用于将更新的数据同步到迁入节点;
更新模块 73用于更新与更新后的待迁移数据对应的数据索引;
迁移模块 72还用于:将与更新后的待迁移数据对应的更新后的数据索引 迁移到迁入节点。 更新模块 7 3还用于:迁出节点在接收到迁入节点发送的同步数据成功接 收响应之后, 更新与更新后的待迁移数据对应的数据索引。
进一步地, 确定模块 7 1具体用于:
根据待迁移区间中的关键字确定待迁移数据;
根据待迁移区间中的关键字从数据索引库中过滤得到与待迁移数据对应 的索引数据。
更进一步地,确定模块 7 1还用于在根据待迁移区间中的关键字从数据索 引库中过滤得到与待迁移数据对应的索引数据之前, 确定数据索引库是否处 于维护状态;
若是, 则发送模块 74向迁入节点发送第一指示信息, 第一指示信息用于 指示迁入节点在待迁移数据迁移完成之后自行创建与待迁移数据对应的索引 数据;
若否, 则发送模块 74向迁入节点发送第二指示信息, 第二指示信息用于 指示迁入节点等待接收与待迁移数据对应的索引数据。
本实施例的装置, 可以用于执行图 3所示方法实施例或图 6所示方法实 施例中迁出节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再 赘述。
图 9为本发明提供的迁出节点实施例三的结构示意图, 如图 9所示, 本 实施例的迁出节点, 包括: 包括发射器 9 1、 接收器 92、 存储器 9 3以及分别 与发射器 91、接收器 92和存储器 9 3连接的处理器 94。 当然, 迁出节点还可 以包括天线、 基带处理部件、 中射频处理部件、 输入输出装置等通用部件, 本发明实施例在此不再任何限制。
其中, 存储器 9 3中存储一组程序代码, 且处理器 94用于调用存储器 9 3 中存储的程序代码, 用于执行以下操作:
确定待迁移数据和与待迁移数据对应的数据索引;
将待迁移数据和与待迁移数据对应的数据索引迁移到迁入节点。
本实施例的装置, 可以用于执行图 3所示方法实施例或图 6所示方法实 施例中迁出节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再 赘述。
图 10为本发明提供的迁入节点实施例一的结构示意图, 如图 10所示, 本实施例的迁入节点, 包括: 接收模块 11和更新模块 12 , 其中, 接收模块 11用于接收迁出节点发送的待迁移数据和与待迁移数据对应的数据索引; 更 新模块 12用于根据待迁移数据和与待迁移数据对应的数据索引更新本地数 据和与本地数据对应的数据索引。
可选地, 接收模块 11具体用于:
接收迁出节点发送的待迁移数据;
接收迁出节点发送的待迁移数据对应的数据索引。
本实施例的装置, 可以用于执行图 4所示方法实施例的技术方案, 其实 现原理和技术效果类似, 此处不再赘述。
图 11为本发明提供的迁入节点实施例二的结构示意图, 如图 11所示, 本实施例的迁入节点, 在图 10所示实施例的基础上, 还包括: 发送模块 13 和处理模块 14 , 其中, 接收模块 11还用于在接收迁出节点发送的待迁移数 据对应的数据索引之前,接收迁出节点发送的更新的数据; 接收模块 11还用 于: 接收迁出节点发送的与更新后的待迁移数据对应的更新后的数据索引。
发送模块 1 3用于在接收迁出节点发送的与更新后的待迁移数据对应的 更新后的数据索引之前, 向迁出节点发送同步数据成功接收响应, 以使迁出 节点更新与更新后的待迁移数据对应的数据索引。
处理模块 14用于在接收迁出节点发送的待迁移数据对应的数据索引之 前, 若接收到迁出节点发送的第一指示信息, 则在待迁移数据接收完成之后 自行创建与待迁移数据对应的索引数据; 若接收到迁出节点发送的第二指示 信息, 则等待接收与待迁移数据对应的索引数据。
本实施例的装置, 可以用于执行图 5所示方法实施例或图 6所示方法实 施例中迁出节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再 赘述。 图 1 2为本发明提供的迁入节点实施例三的结构示意图, 如图 12所示, 本实施例的迁入节点, 包括: 包括发射器 1 21、 接收器 122、 存储器 12 3以及 分别与发射器 121、接收器 122和存储器 1 23连接的处理器 124。 当然, 迁入 节点还可以包括天线、 基带处理部件、 中射频处理部件、 输入输出装置等通 用部件, 本发明实施例在此不再任何限制。
其中, 存储器 12 3中存储一组程序代码, 且处理器 124用于调用存储器 123中存储的程序代码, 用于执行以下操作:
接收迁出节点发送的待迁移数据和与待迁移数据对应的数据索引; 根据待迁移数据和与待迁移数据对应的数据索引更新本地数据和与本地 数据对应的数据索引。
本实施例的装置, 可以用于执行图 5所示方法实施例或图 6所示方法实 施例中迁出节点所执行的技术方案, 其实现原理和技术效果类似, 此处不再 赘述。
需要说明的是, 上述各实施例对应的结构示意图仅为一种示意, 各部分 或模块的连接关系不限于图中示出的形式, 可以以实际应用中的情况为准。
图 1 3为本发明提供的系统实施例一的结构示意图, 如图 1 3所示, 本实 施例的系统, 可以包括: 图 7至图 9所示实施例中的任意一种迁出节点 1 00 和图 1 0至图 1 2所示实施例中的任意一种迁入节点 200。
在本发明所提供的几个实施例中, 应该理解到, 所揭露的装置和方法, 可以通过其它的方式实现。例如, 以上所描述的装置实施例仅仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外 的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或 直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连 接, 可以是电性, 机械或其它的形式。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单 元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以釆用硬件加软件 功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元, 可以存储在一个计算机 可读取存储介质中。 上述软件功能单元存储在一个存储介质中, 包括若干指 令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 或处理器( proce s s or )执行本发明各个实施例所述方法的部分步骤。 而前述 的存储介质包括: U盘、 移动硬盘、 只读存储器(Read-On ly Memory , ROM ) 、 随机存取存储器 ( Random Acce s s Memory , RAM ) 、 磁碟或者光盘等各种可以 存储程序代码的介质。
本领域技术人员可以清楚地了解到, 为描述的方便和简洁, 仅以上述各 功能模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功能分 配由不同的功能模块完成, 即将装置的内部结构划分成不同的功能模块, 以 完成以上描述的全部或者部分功能。 上述描述的装置的具体工作过程, 可以 参考前述方法实施例中的对应过程, 在此不再赘述。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求
1、 一种数据迁移处理方法, 其特征在于, 包括:
迁出节点确定待迁移数据和与所述待迁移数据对应的数据索引; 所述迁出节点将所述待迁移数据和与所述待迁移数据对应的数据索引 迁移到迁入节点。
2、 根据权利要求 1所述的方法, 其特征在于, 所述迁出节点将所述待 迁移数据和与所述待迁移数据对应的数据索引迁移到迁入节点, 包括: 所述迁出节点将所述待迁移数据迁移到所述迁入节点;
所述迁出节点将所述待迁移数据对应的数据索引迁移到迁入节点。
3、 根据权利要求 2所述的方法, 其特征在于, 所述迁出节点将所述待 迁移数据对应的数据索引迁移到迁入节点之前, 还包括:
所述迁出节点确定所述待迁移数据发生更新;
所述迁出节点将更新的数据同步到所述迁入节点;
所述迁出节点更新与更新后的待迁移数据对应的数据索引;
所述迁出节点将所述待迁移数据对应的数据索引迁移到迁入节点, 包 括:
所述迁出节点将与更新后的待迁移数据对应的更新后的数据索引迁移 到迁入节点。
4、 根据权利要求 3所述的方法, 其特征在于, 所述迁出节点更新与更 新后的待迁移数据对应的数据索引, 包括:
所述迁出节点在接收到所述迁入节点发送的同步数据成功接收响应之 后, 更新与更新后的待迁移数据对应的数据索引。
5、 根据权利要求 1—4任一项所述的方法, 其特征在于, 所述迁出节点 确定待迁移数据和与所述待迁移数据对应的数据索引, 包括:
所述迁出节点根据待迁移区间中的关键字确定待迁移数据;
所述迁出节点根据待迁移区间中的关键字从数据索引库中过滤得到与 所述待迁移数据对应的索引数据。
6、 根据权利要求 5所述的方法, 其特征在于, 所述迁出节点根据待迁 移区间中的关键字从数据索引库中过滤得到与所述待迁移数据对应的索引 数据之前, 还包括:
所述迁出节点确定所述数据索引库是否处于维护状态;
若是, 则所述迁出节点向所述迁入节点发送第一指示信息, 所述第一指 示信息用于指示所述迁入节点在所述待迁移数据迁移完成之后自行创建与 所述待迁移数据对应的索引数据;
若否, 则所述迁出节点向所述迁入节点发送第二指示信息, 所述第二指 示信息用于指示所述迁入节点等待接收与所述待迁移数据对应的索引数据。
7、 一种数据迁移处理方法, 其特征在于, 包括:
迁入节点接收迁出节点发送的待迁移数据和与所述待迁移数据对应的 数据索引;
所述迁入节点根据待迁移数据和与所述待迁移数据对应的数据索引更 新本地数据和与所述本地数据对应的数据索引。
8、 根据权利要求 7所述的方法, 其特征在于, 所述迁入节点接收迁出 节点发送的待迁移数据和与所述待迁移数据对应的数据索引, 包括:
所述迁入节点接收所述迁出节点发送的所述待迁移数据;
所述迁入节点接收所述迁出节点发送的所述待迁移数据对应的数据索 引。
9、 根据权利要求 8所述的方法, 其特征在于, 所述迁入节点接收所述 迁出节点发送的所述待迁移数据对应的数据索引之前, 还包括:
所述迁入节点接收所述迁出节点发送的更新的数据;
所述迁入节点接收所述迁出节点发送的所述待迁移数据对应的数据索 引, 包括:
所述迁入节点接收所述迁出节点发送的与更新后的待迁移数据对应的 更新后的数据索引。
10、 根据权利要求 9所述的方法, 其特征在于, 所述迁入节点接收所述 迁出节点发送的与更新后的待迁移数据对应的更新后的数据索引之前,还包 括:
所述迁入节点向所述迁出节点发送同步数据成功接收响应,以使所述迁 出节点更新与更新后的待迁移数据对应的数据索引。
1 1、 根据权利要求 8-1 0中任一项所述的方法, 其特征在于, 所述迁入 节点接收所述迁出节点发送的所述待迁移数据对应的数据索引之前, 还包 括:
若所述迁入节点接收到所述迁出节点发送的第一指示信息,则所述迁入 节点在所述待迁移数据接收完成之后自行创建与所述待迁移数据对应的索 引数据;
若所述迁入节点接收到所述迁出节点发送的第二指示信息,则所述迁入 节点等待接收与所述待迁移数据对应的索引数据。
12、 一种迁出节点, 其特征在于, 包括:
确定模块, 用于确定待迁移数据和与所述待迁移数据对应的数据索引; 迁移模块,用于将所述待迁移数据和与所述待迁移数据对应的数据索引 迁移到迁入节点。
1 3、 根据权利要求 1 2所述的迁出节点, 其特征在于, 所述迁移模块, 具体用于:
将所述待迁移数据迁移到所述迁入节点;
将所述待迁移数据对应的数据索引迁移到迁入节点。
14、 根据权利要求 1 3所述的迁出节点, 其特征在于, 所述迁移模块, 还用于: 在将所述待迁移数据对应的数据索引迁移到迁入节点之前, 确定所 述待迁移数据发生更新;
所述迁移模块, 还用于将更新的数据同步到所述迁入节点;
所述迁出节点, 还包括:
更新模块, 用于更新与更新后的待迁移数据对应的数据索引;
所述迁移模块, 还用于: 将与更新后的待迁移数据对应的更新后的数据索引迁移到迁入节点。
15、 根据权利要求 14所述的迁出节点, 其特征在于, 所述更新模块, 还用于:
所述迁出节点在接收到所述迁入节点发送的同步数据成功接收响应之 后, 更新与更新后的待迁移数据对应的数据索引。
16、 根据权利要求 1 2—1 5任一项所述的迁出节点, 其特征在于, 所述确 定模块, 具体用于:
根据待迁移区间中的关键字确定待迁移数据;
根据待迁移区间中的关键字从数据索引库中过滤得到与所述待迁移数 据对应的索引数据。
17、 根据权利要求 1 6所述的迁出节点, 其特征在于, 所述迁出节点, 还包括: 发送模块;
所述确定模块,还用于在根据待迁移区间中的关键字从数据索引库中过 滤得到与所述待迁移数据对应的索引数据之前,确定所述数据索引库是否处 于维护状态;
若是, 则所述发送模块向所述迁入节点发送第一指示信息, 所述第一指 示信息用于指示所述迁入节点在所述待迁移数据迁移完成之后自行创建与 所述待迁移数据对应的索引数据;
若否, 则所述发送模块向所述迁入节点发送第二指示信息, 所述第二指 示信息用于指示所述迁入节点等待接收与所述待迁移数据对应的索引数据。
18、 一种迁入节点, 其特征在于, 包括:
接收模块,用于接收迁出节点发送的待迁移数据和与所述待迁移数据对 应的数据索引;
更新模块,用于根据待迁移数据和与所述待迁移数据对应的数据索引更 新本地数据和与所述本地数据对应的数据索引。
19、 根据权利要求 1 8所述的迁入节点, 其特征在于, 所述接收模块, 具体用于: 接收所述迁出节点发送的所述待迁移数据;
接收所述迁出节点发送的所述待迁移数据对应的数据索引。
20、 根据权利要求 1 9所述的迁入节点, 其特征在于, 所述接收模块, 还用于在接收所述迁出节点发送的所述待迁移数据对应的数据索引之前,接 收所述迁出节点发送的更新的数据;
所述接收模块还用于:
接收所述迁出节点发送的与更新后的待迁移数据对应的更新后的数据 索引。
21、 根据权利要求 20所述的迁入节点, 其特征在于, 所述迁入节点, 还包括: 发送模块, 用于在接收所述迁出节点发送的与更新后的待迁移数据 对应的更新后的数据索引之前, 向所述迁出节点发送同步数据成功接收响 应, 以使所述迁出节点更新与更新后的待迁移数据对应的数据索引。
22、 根据权利要求 1 9-21中任一项所述的迁入节点, 其特征在于, 所述 迁入节点, 还包括: 处理模块, 用于在接收所述迁出节点发送的所述待迁移 数据对应的数据索引之前, 若接收到所述迁出节点发送的第一指示信息, 则 在所述待迁移数据接收完成之后自行创建与所述待迁移数据对应的索引数 据; 若接收到所述迁出节点发送的第二指示信息, 则等待接收与所述待迁移 数据对应的索引数据。
23、 一种系统, 其特征在于, 包括: 如权利要求 12-1 7任一项所述的迁 出节点和如权利要求 18-22任一项所述的迁入节点。
PCT/CN2014/078436 2013-07-31 2014-05-26 一种访问共享内存的方法和装置 WO2015014152A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310329438.X 2013-07-31
CN201310329438.XA CN104348862B (zh) 2013-07-31 2013-07-31 数据迁移处理方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2015014152A1 true WO2015014152A1 (zh) 2015-02-05

Family

ID=52430948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078436 WO2015014152A1 (zh) 2013-07-31 2014-05-26 一种访问共享内存的方法和装置

Country Status (2)

Country Link
CN (1) CN104348862B (zh)
WO (1) WO2015014152A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018099397A1 (zh) * 2016-12-01 2018-06-07 腾讯科技(深圳)有限公司 数据库集群中数据迁移的方法、装置及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034080A (zh) * 2015-03-10 2016-10-19 中兴通讯股份有限公司 分布式系统中元数据的迁移方法及装置
CN107766386B (zh) * 2016-08-22 2023-01-10 中兴通讯股份有限公司 一种solr数据迁移方法和装置
CN107153512B (zh) * 2017-04-01 2020-05-08 华为技术有限公司 一种数据迁移方法和装置
CN108595108A (zh) * 2017-12-29 2018-09-28 北京奇虎科技有限公司 一种数据的迁移方法和装置
WO2020037686A1 (zh) * 2018-08-24 2020-02-27 袁振南 基于数据结构的垃圾回收方法、计算机及存储介质
CN110196851B (zh) * 2019-05-09 2024-05-10 腾讯科技(深圳)有限公司 一种数据存储方法、装置、设备及存储介质
CN112699080A (zh) * 2021-01-11 2021-04-23 成都深思科技有限公司 一种高速多路网络数据迁移方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063500A (zh) * 2011-01-04 2011-05-18 北京凯铭风尚网络技术有限公司 一种数据迁移的方法及装置
CN102968498A (zh) * 2012-12-05 2013-03-13 华为技术有限公司 数据处理方法及装置
CN103136340A (zh) * 2013-02-04 2013-06-05 北京大学 一种在集群中快速迁移海量空间数据的方法
CN103186537A (zh) * 2011-12-27 2013-07-03 腾讯科技(北京)有限公司 一种基于索引排序的数据读写方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299198B (zh) * 2008-06-13 2011-08-31 南京邮电大学 一种动态自适应的网格数据迁移方法
CN102469440B (zh) * 2010-11-16 2014-06-11 中国移动通信集团公司 用户数据迁移方法、系统和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063500A (zh) * 2011-01-04 2011-05-18 北京凯铭风尚网络技术有限公司 一种数据迁移的方法及装置
CN103186537A (zh) * 2011-12-27 2013-07-03 腾讯科技(北京)有限公司 一种基于索引排序的数据读写方法及装置
CN102968498A (zh) * 2012-12-05 2013-03-13 华为技术有限公司 数据处理方法及装置
CN103136340A (zh) * 2013-02-04 2013-06-05 北京大学 一种在集群中快速迁移海量空间数据的方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018099397A1 (zh) * 2016-12-01 2018-06-07 腾讯科技(深圳)有限公司 数据库集群中数据迁移的方法、装置及存储介质
US11243922B2 (en) 2016-12-01 2022-02-08 Tencent Technology (Shenzhen) Company Limited Method, apparatus, and storage medium for migrating data node in database cluster

Also Published As

Publication number Publication date
CN104348862A (zh) 2015-02-11
CN104348862B (zh) 2018-03-16

Similar Documents

Publication Publication Date Title
WO2015014152A1 (zh) 一种访问共享内存的方法和装置
EP3564835B1 (en) Data redistribution method and apparatus, and database cluster
CN106777225B (zh) 一种数据的迁移方法和系统
US20170293633A1 (en) Distributed file system
EP3361387B1 (en) Data transmission method, equipment and system
US10831612B2 (en) Primary node-standby node data transmission method, control node, and database system
US11500832B2 (en) Data management method and server
US20070288548A1 (en) Protocol optimization for client and server synchronization
CN105512266A (zh) 一种实现分布式数据库操作一致性的方法及装置
WO2019001017A1 (zh) 集群间数据迁移方法、系统、服务器及计算机存储介质
WO2015157904A1 (zh) 一种文件同步方法、服务器及终端
CN110727738B (zh) 基于数据分片的全局路由系统、电子设备及存储介质
CN103546572A (zh) 一种云存储装置以及多云存储联网系统和方法
CN113010496A (zh) 一种数据迁移方法、装置、设备和存储介质
US10642817B2 (en) Index table update method, and device
CN114422537B (zh) 多云存储系统、多云数据读写方法及电子设备
CN103607429A (zh) 云计算业务实现方法和系统
WO2018053838A1 (zh) 一种负载均衡的方法及相关设备
WO2021179584A1 (zh) Druid集群的迁移方法、装置、计算机设备及存储介质
WO2016090985A1 (zh) 缓存的读取、读取处理方法及装置
CN114884880A (zh) 数据传输方法以及系统
CN114443216A (zh) 一种云平台镜像管理方法及管理系统
CN115706727A (zh) 云桌面数据的迁移方法、节点和服务器
TW201914352A (zh) 網路通訊系統的控制方法與邊緣運算裝置
CN113271229B (zh) 设备控制方法及装置、存储设备、安全设备、交换机、路由器及服务器

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

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

Country of ref document: EP

Kind code of ref document: A1