CN106446031A - Quick node replacement method for large-scale cluster database - Google Patents

Quick node replacement method for large-scale cluster database Download PDF

Info

Publication number
CN106446031A
CN106446031A CN201610777769.3A CN201610777769A CN106446031A CN 106446031 A CN106446031 A CN 106446031A CN 201610777769 A CN201610777769 A CN 201610777769A CN 106446031 A CN106446031 A CN 106446031A
Authority
CN
China
Prior art keywords
node
database
cluster
user
synchronization
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.)
Pending
Application number
CN201610777769.3A
Other languages
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.)
TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd
Original Assignee
TIANJIN NANKAI UNIVERSITY GENERAL DATA 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 TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd filed Critical TIANJIN NANKAI UNIVERSITY GENERAL DATA TECHNOLOGIES Co Ltd
Priority to CN201610777769.3A priority Critical patent/CN106446031A/en
Publication of CN106446031A publication Critical patent/CN106446031A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a quick node replacement method for a large-scale cluster database. The method comprises the following steps of setting an unavailable state of a node; installing an installation program of a new node replacing the node, and performing new node and cluster configuration; setting a cluster mode to be read-only, and judging whether the execution of write operation is finished or not; after the execution of the write operation is finished, synchronizing metadata; and after the metadata synchronization is finished, recovering the cluster mode to be normal, setting a synchronous data flag for user data, and performing user data synchronization according to the synchronous data flag. According to the quick node replacement method for the large-scale cluster database, the data node replacement process is divided into two steps of metadata synchronization and user data synchronization; a user is prohibited to perform the write operation on the database during the metadata synchronization period, and the user is allowed to perform all database operations during the user data synchronization period; and the data volume of database metadata is not large in general, and the synchronization time is short, so that the time in which the user cannot perform the write operation on the database can be shortened to the maximum extent.

Description

A kind of large-scale cluster database fast Node replacement method
Technical field
The present invention relates to database node replaces field, more particularly, to a kind of large-scale cluster database fast Node is replaced Method.
Background technology
With the expansion of Cluster Database scale, the quantity of clustered node is continuously increased, and the damage of clustered node can become One common phenomenon.Simultaneously with the increase of data volume, the computing capability of individual node and storage capacity also can become bottleneck. It is required for being replaced upgrading to clustered node under both of these case, enable cluster normal work, the allusion quotation of this exactly present invention Type application scenarios.
Company-data node can also be replaced with manual method, the problem of so operation is:
One, need to stop current cluster, the business operation interrupting user is waiting keeper to be replaced operation.
Two, when data volume is huge, taking of replacement data node is very big, and the service pause time of user also can be very Long, this is insupportable for the higher user of some requirement of real-times.
Content of the invention
The invention solves the problems that above technical problem, provide a kind of large-scale cluster database fast Node replacement method.
For solving above-mentioned technical problem, the technical solution used in the present invention is:A kind of large-scale cluster database quickly saves Point replacement method, comprises the following steps:
Setting node down state;
The installation procedure of the new node replacing described node is installed, carries out described new node and cluster configuration;
It is read-only for arranging described cluster mode, judges whether write operation executes and completes;
After the completion of write operation execution, synchronous metadata;
After the completion of described metadata synchronization, it is normal for recovering described cluster mode, arranges synchrodata to the data of user Mark, carries out user data synchronization according to described synchrodata mark.
The present invention has the advantages and positive effects that:A kind of large-scale cluster database fast Node replacement method, will Back end replacement process is divided into two steps to carry out:Metadata synchronization and user data synchronization.Forbid user during metadata synchronization User is allowed to carry out all of database manipulation during carrying out write operation, user data synchronization to database.Database metadata Data volume typically little, lock in time is short, can reduce user to greatest extent and database can not be carried out with time of write operation, energy Back end in enough quick-replaceable large-scale cluster databases.
Specific embodiment
A kind of large-scale cluster database fast Node replacement method, comprises the following steps:
1) node down state is set, and shielding database, for the operation damaging node, reduces the nothing of database execution Effect operation.
2) replace to install and simplify the installation process replacing node, and automatically configured, make new node and cluster compatible, no User is needed to carry out by hand.
3) before node is replaced and carried out metadata synchronization, setting cluster mode is read-only first, stops cluster subsequently all of Write operation, and wait current write operation execution to complete.After confirming that cluster does not have write operation, start first number of sync database According to, after synchronously completing, synchrodata mark is arranged to the data of user, after being provided with, recover cluster mode be normal it is allowed to User carries out any operation.Now can see that from cluster state company-data is inconsistent.
4), after the completion of metadata synchronization, automatically recover to carry out, according to the data syn-chronization mark of setting, the synchronization that user reads data Operation, now any operation of not blocked user.After the completion of user data synchronization, company-data state consistency.
A kind of preferred forms of large-scale cluster database fast Node replacement method, if desired to one in cluster Node is replaced, then carry out in accordance with the following steps:
Step 1:Find that a node damages or needs to replace, setting node state is unavailable (UNAVAILABLE).
Step 2:Prepare new machine, install and origin node identical operating system.
Step 3:Origin node machine is withdrawn from from cluster, the IP of configuration new node is the same with origin node.
Step 4:Execution node replaces order, and node is replaced.
Step 5:After replacing order success, check cluster state, when cluster state is recovered normal, check all of User's table data is the same with before replacement.
Above embodiments of the invention are described in detail, but described content have been only presently preferred embodiments of the present invention, It is not to be regarded as the practical range for limiting the present invention.All impartial changes made according to the scope of the invention and improvement etc., all should Still belong within this patent covering scope.

Claims (1)

1. a kind of large-scale cluster database fast Node replacement method it is characterised in that:Comprise the following steps:
Setting node down state;
The installation procedure of the new node replacing described node is installed, carries out described new node and cluster configuration;
It is read-only for arranging described cluster mode, judges whether write operation executes and completes;
After the completion of write operation execution, synchronous metadata;
After the completion of described metadata synchronization, it is normal for recovering described cluster mode, arranges synchrodata mark to the data of user, User data synchronization is carried out according to described synchrodata mark.
CN201610777769.3A 2016-08-31 2016-08-31 Quick node replacement method for large-scale cluster database Pending CN106446031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610777769.3A CN106446031A (en) 2016-08-31 2016-08-31 Quick node replacement method for large-scale cluster database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610777769.3A CN106446031A (en) 2016-08-31 2016-08-31 Quick node replacement method for large-scale cluster database

Publications (1)

Publication Number Publication Date
CN106446031A true CN106446031A (en) 2017-02-22

Family

ID=58090721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610777769.3A Pending CN106446031A (en) 2016-08-31 2016-08-31 Quick node replacement method for large-scale cluster database

Country Status (1)

Country Link
CN (1) CN106446031A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984602A (en) * 2018-06-05 2018-12-11 网易(杭州)网络有限公司 A kind of database control method and Database Systems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090043887A1 (en) * 2002-11-27 2009-02-12 Oracle International Corporation Heartbeat mechanism for cluster systems
CN102158540A (en) * 2011-02-18 2011-08-17 广州从兴电子开发有限公司 System and method for realizing distributed database
CN102693324A (en) * 2012-01-09 2012-09-26 西安电子科技大学 Distributed database synchronization system, synchronization method and node management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090043887A1 (en) * 2002-11-27 2009-02-12 Oracle International Corporation Heartbeat mechanism for cluster systems
CN102158540A (en) * 2011-02-18 2011-08-17 广州从兴电子开发有限公司 System and method for realizing distributed database
CN102693324A (en) * 2012-01-09 2012-09-26 西安电子科技大学 Distributed database synchronization system, synchronization method and node management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984602A (en) * 2018-06-05 2018-12-11 网易(杭州)网络有限公司 A kind of database control method and Database Systems
CN108984602B (en) * 2018-06-05 2021-04-16 网易(杭州)网络有限公司 Database control method and database system

Similar Documents

Publication Publication Date Title
CN108536752B (en) Data synchronization method, device and equipment
CN102591964B (en) Implementation method and device for data reading-writing splitting system
CN102681917B (en) A kind of operating system and restorative procedure thereof
CN104239365A (en) Database connection pool and method for acquiring links in database connection pool
CN108205560B (en) Data synchronization method and device
CN104935618B (en) A kind of clustered deploy(ment) method
CN112364049B (en) Data synchronization script generation method, system, terminal and storage medium
CN110263095B (en) Data backup and recovery method and device, computer equipment and storage medium
CN105701159A (en) Data synchronization device and method
EP3147789B1 (en) Method for re-establishing standby database, and apparatus thereof
CN104462342B (en) database snapshot synchronization processing method and device
US20130041868A1 (en) Data synchronization
CN106547584A (en) A kind of backing method and device of application program
CN111177173A (en) System and method for realizing data synchronization optimization processing under big data environment
CN112367186B (en) Fault protection method and device based on 0penStack bare computer
CN106446031A (en) Quick node replacement method for large-scale cluster database
CN109491679B (en) CPLD online upgrading method and device
CN107621994A (en) The method and device that a kind of data snapshot creates
CN105760456B (en) A kind of method and apparatus keeping data consistency
CN112597242B (en) Extraction method based on application system data slices related to batch tasks
CN108984660A (en) A kind of MySQL database master-slave synchronisation data duplicate removal method
CN110569231B (en) Data migration method, device, equipment and medium
CN102413154A (en) Method of data information synchronization between systems and apparatus thereof
CN103327105A (en) Automatic slave node service recovering method of hadoop system
CN103281326A (en) Cluster system password-free accessing configuration method based on same secret key file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170222