CN105549909B - A kind of optimization method of cluster sequence class consensus information persistence - Google Patents

A kind of optimization method of cluster sequence class consensus information persistence Download PDF

Info

Publication number
CN105549909B
CN105549909B CN201510926027.8A CN201510926027A CN105549909B CN 105549909 B CN105549909 B CN 105549909B CN 201510926027 A CN201510926027 A CN 201510926027A CN 105549909 B CN105549909 B CN 105549909B
Authority
CN
China
Prior art keywords
information
persistence
value
sequence class
cluster sequence
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.)
Active
Application number
CN201510926027.8A
Other languages
Chinese (zh)
Other versions
CN105549909A (en
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 CN201510926027.8A priority Critical patent/CN105549909B/en
Publication of CN105549909A publication Critical patent/CN105549909A/en
Application granted granted Critical
Publication of CN105549909B publication Critical patent/CN105549909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device

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)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of optimization methods of cluster sequence class consensus information persistence, when carrying out persistence to cluster sequence class consensus information, according to certain persistence interval, the partial information value chosen in cluster sequence class consensus information carries out persistence, that is the current persistent value of information of cluster sequence class consensus information is set as N, persistence interval is set as extent, then only carries out persistence to the value that the value of information is N+n*extent, n is nonnegative integer.The beneficial effects of the present invention are: interval persistence is carried out to cluster sequence class consensus information, reduces persistence frequency, so that cluster global failure can be coped with and improve the efficiency of persistence, reduces persistence cost.

Description

A kind of optimization method of cluster sequence class consensus information persistence
Technical field
The invention mainly relates to distributed computing field, specifically a kind of cluster sequence class consensus information persistence it is excellent Change method.
Background technique
In the realization of cluster Consistency service, to cope with cluster global failure, such as cluster power-off, all node collapses Extreme case, it is necessary to the consensus information persistence that will be stored.
There is a type of cluster consensus information, can be described as cluster sequence class consensus information, it is certain to refer to that those are deferred to Calculation method is developed, successor value can be predicted and type of cluster consensus information with uniqueness.Such as it is It unites revisions number SCN (i.e. system change number), it changes once, just increases 1 certainly.
Cluster sequence class consensus information, generally has following characteristics: 1, being allocated by cluster Consistency service, it is necessary to complete Office is unique;2, change frequency may be very high;3, the IO amount very little of persistence.Therefore, to cluster sequence class consensus information into When row persistence, although the IO total amount very little that sequence itself generates, due to change frequency height, IO times number is very high, according to disk The characteristics of, the cost of persistence is still very big.
Summary of the invention
In order to solve deficiency in the prior art, the present invention provides a kind of the excellent of cluster sequence class consensus information persistence Change method carries out interval persistence to cluster sequence class consensus information, reduces persistence frequency, so that cluster can be coped with Global failure, and the efficiency of persistence can be improved, reduce persistence cost.
The present invention to achieve the above object, is achieved through the following technical solutions:
A kind of optimization method of cluster sequence class consensus information persistence is carried out to cluster sequence class consensus information When persistence, according to certain persistence interval, the partial information value chosen in cluster sequence class consensus information is carried out persistently Change, i.e. the current persistent value of information of cluster sequence class consensus information is set as N, and persistence interval is set as extent, then only right The value that the value of information is N+n*extent carries out persistence, and n is nonnegative integer;The reality of the persistence of cluster sequence class consensus information It is existing the following steps are included:
Step 1, starting cluster Consistency service;
Step 2 judges that the persistence file of cluster sequence class consensus information whether there is, if persistence file is deposited 3 are being thened follow the steps, if persistence file is not present, is thening follow the steps 4;
Step 3, read cluster sequence class consensus information persistence file in cluster sequence class consensus information with And the value of information of cluster sequence class consensus information enters memory, gos to step 5 after the completion of reading;
The value of information of cluster sequence class consensus information is set as initial value by step 4, also as current persistence information Value, sequence execute step 5;
Step 5, according to client request by cluster sequence class consensus information and cluster sequence class consensus information The value of information synchronizes update between each node, and sequence executes step 6 after the completion of updating;
Step 6 judges whether the updated value of information meets the condition of the persistence of cluster sequence class consensus information, i.e., The updated value of information is set as M, and divided by extent after subtracting N with M, remainder zero, then updated value of information M meets cluster sequence The persistence condition of column class consensus information, otherwise updated value of information M does not meet holding for cluster sequence class consensus information Longization condition;If the updated value of information meets the condition of the persistence of cluster sequence class consensus information, then follow the steps 7, if the updated value of information does not meet the condition of the persistence of cluster sequence class consensus information, jumps and execute step 5;
Step 7 carries out persistence to the value of information of cluster sequence class consensus information, i.e., when cluster sequence class consistency is believed When the value of information of breath is updated to M, and M meets the condition of persistence, and extent is divided between persistence, then to the information of M+extent It is worth and carries out persistence, after the completion of persistence, jumps to step 5;
When step 8, cluster Consistency service normally stop, it is lasting that current cluster sequence class consensus information value is carried out Change.
When carrying out persistence to cluster sequence class consensus information, only to the information in cluster sequence class consensus information Value is that the value of the integral multiple at persistence interval carries out persistence.
The prior art is compared, the beneficial effects of the invention are that: it is lasting that the present invention carries out cluster sequence class consensus information When change, according to certain persistence interval, the partial information value chosen in cluster sequence class consensus information carries out persistence, subtracts Lack persistence frequency, so that cluster global failure can be coped with and improve the efficiency of persistence, reduces persistence cost.
Detailed description of the invention
Attached drawing 1 is broad flow diagram of the invention.
Specific embodiment
With reference to the drawings and specific embodiments, the invention will be further described.It should be understood that these embodiments are merely to illustrate The present invention rather than limit the scope of the invention.In addition, it should also be understood that, after reading the content taught by the present invention, this field Technical staff can make various changes or modifications the present invention, and such equivalent forms equally fall within the application the appended claims Limited range.
A kind of optimization method of cluster sequence class consensus information persistence is carried out to cluster sequence class consensus information When persistence, according to certain persistence interval, the partial information value chosen in cluster sequence class consensus information is carried out persistently Change, i.e. the current persistent value of information of cluster sequence class consensus information is set as N, and persistence interval is set as extent, then only right The value that the value of information is N+n*extent carries out persistence, and n is nonnegative integer;It is not every for cluster sequence class consensus information Secondary variation all carries out persistence, but behind some persistence interval, then persistence is carried out, persistence frequency can be reduced in this way Number, and cluster global failure can be coped with and improve the persistence efficiency of cluster sequence class consensus information, reduce persistence Cost.As shown in Figure 1, the realization of the persistence of cluster sequence class consensus information the following steps are included:
Step 1, starting cluster Consistency service.
Step 2 judges that the persistence file of cluster sequence class consensus information whether there is, if persistence file is deposited 3 are being thened follow the steps, if persistence file is not present, is thening follow the steps 4.
Step 3, read cluster sequence class consensus information persistence file in cluster sequence class consensus information with And the value of information of cluster sequence class consensus information enters memory, gos to step 5 after having read;For No. SCN, Ru Dangji When the whole collapse of group restores again, No. SCN of persistence is read from disk, is updated since No. SCN of newest persistence, Since No. SCN No. SCN for being necessarily smaller than newest persistence that cluster has been updated before, the SCN newly updated Unique characteristic in complete or collected works group number is still maintained.
The value of information of cluster sequence class consensus information is set as initial value by step 4, also as current persistence information Value, sequence execute step 5.
Step 5, according to client request by cluster sequence class consensus information and cluster sequence class consensus information The value of information synchronizes update between each node, and sequence executes step 6 after the completion of updating;Cluster sequence class consistency is believed Breath, is subject to the cluster sequence class consensus information value and its value of information (in memory) of update, for example, the value of information ratio of node A The value of information of node B is new, then just with the value of information of the value of information overlay node B of node A.
Step 6 judges whether the updated value of information meets the condition of the persistence of cluster sequence class consensus information, i.e., The updated value of information is set as M, and divided by extent after subtracting N with M, remainder zero, then updated value of information M meets cluster sequence The persistence condition of column class consensus information, otherwise updated value of information M does not meet holding for cluster sequence class consensus information Longization condition;If the updated value of information meets the condition of the persistence of cluster sequence class consensus information, then follow the steps 7, if the updated value of information does not meet the condition of the persistence of cluster sequence class consensus information, jumps and execute step 5.
Step 7 carries out persistence to the value of information of cluster sequence class consensus information, i.e., when cluster sequence class consistency is believed When the value of information of breath is updated to M, and M meets the condition of persistence, and extent is divided between persistence, then to the information of M+extent It is worth and carries out persistence, after the completion of persistence, jumps to step 5;For example, for SCN, persistence gap size is Extent, the current persistent value of information are that N, then by M+extent persistence, is updated to M when No. SCN when being updated to M for No. SCN When+extent, then persistence M+2*extent, and so on;No. SCN of this section [M+1, M+extent-1] be not at this time Persistence is carried out again.
When step 8, cluster Consistency service normally stop, it is lasting that current cluster sequence class consensus information value is carried out Change.
When carrying out persistence to cluster sequence class consensus information, only to the information in cluster sequence class consensus information Value is the value progress persistence of the integral multiple at persistence interval, for example, persistence gap size is extent for SCN, The current persistent value of information is N, then N is the integral multiple of extent.
Obviously, the above embodiment of the present invention be only to clearly illustrate example of the present invention, and not be pair The restriction of embodiments of the present invention.For those of ordinary skill in the art, may be used also on the basis of the above description To make other variations or changes in different ways.There is no necessity and possibility to exhaust all the enbodiments.And these Belong to the obvious changes or variations that connotation of the invention is extended out and still falls within protection scope of the present invention.

Claims (2)

1. a kind of optimization method of cluster sequence class consensus information persistence, which is characterized in that consistent to cluster sequence class Property information when carrying out persistence, according to certain persistence interval, choose the partial information in cluster sequence class consensus information Value carries out persistence, i.e. the current persistent value of information of cluster sequence class consensus information is set as N, and persistence interval is set as Extent then only carries out persistence to the value that the value of information is N+n*extent, and n is nonnegative integer;Cluster sequence class consistency letter The realization of the persistence of breath the following steps are included:
Step 1, starting cluster Consistency service;
Step 2 judges that the persistence file of cluster sequence class consensus information whether there is, if persistence file exists, It executes step 3 and thens follow the steps 4 if persistence file is not present;
Step 3, read cluster sequence class consensus information persistence file in cluster sequence class consensus information and collection The value of information of group's sequence class consensus information enters memory, gos to step 5 after the completion of reading;
The value of information of cluster sequence class consensus information is set as initial value by step 4, also as the current persistence value of information, Sequence executes step 5;
Step 5, according to client request by the information of cluster sequence class consensus information and cluster sequence class consensus information Value synchronizes update between each node, and sequence executes step 6 after the completion of updating;
Step 6 judges whether the updated value of information meets the condition of the persistence of cluster sequence class consensus information, that is, updates The value of information afterwards is set as M, and divided by extent after subtracting N with M, remainder zero, then updated value of information M meets cluster sequence class The persistence condition of consensus information, otherwise updated value of information M does not meet the persistence of cluster sequence class consensus information Condition;If the updated value of information meets the condition of the persistence of cluster sequence class consensus information, 7 are thened follow the steps, such as The updated value of information of fruit does not meet the condition of the persistence of cluster sequence class consensus information, then jumps and execute step 5;
Step 7 carries out persistence to the value of information of cluster sequence class consensus information, i.e., when cluster sequence class consensus information When the value of information is updated to M, and M meets the condition of persistence, and extent is divided between persistence, then to the value of information of M+extent into Row persistence after the completion of persistence, jumps to step 5;
When step 8, cluster Consistency service normally stop, current cluster sequence class consensus information value is subjected to persistence.
2. a kind of optimization method of cluster sequence class consensus information persistence according to claim 1, which is characterized in that It is only lasting to the value of information in cluster sequence class consensus information when carrying out persistence to cluster sequence class consensus information The value for changing the integral multiple at interval carries out persistence.
CN201510926027.8A 2015-12-12 2015-12-12 A kind of optimization method of cluster sequence class consensus information persistence Active CN105549909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510926027.8A CN105549909B (en) 2015-12-12 2015-12-12 A kind of optimization method of cluster sequence class consensus information persistence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510926027.8A CN105549909B (en) 2015-12-12 2015-12-12 A kind of optimization method of cluster sequence class consensus information persistence

Publications (2)

Publication Number Publication Date
CN105549909A CN105549909A (en) 2016-05-04
CN105549909B true CN105549909B (en) 2019-03-12

Family

ID=55829112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510926027.8A Active CN105549909B (en) 2015-12-12 2015-12-12 A kind of optimization method of cluster sequence class consensus information persistence

Country Status (1)

Country Link
CN (1) CN105549909B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024032A (en) * 2010-11-29 2011-04-20 广州明朝网络科技有限公司 Distributed data caching and persisting method and system based on Erlang
CN104484469A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Expansion method for supporting non-halt of multi-hash map database cluster system
CN104484472A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Database cluster for mixing various heterogeneous data sources and implementation method
CN104615657A (en) * 2014-12-31 2015-05-13 天津南大通用数据技术股份有限公司 Expanding and shrinking method for distributed cluster with nodes supporting multiple data fragments
CN104866380A (en) * 2015-06-18 2015-08-26 北京搜狐新媒体信息技术有限公司 Method and device for processing state transition of cluster management system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601222B2 (en) * 2010-05-13 2013-12-03 Fusion-Io, Inc. Apparatus, system, and method for conditional and atomic storage operations

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024032A (en) * 2010-11-29 2011-04-20 广州明朝网络科技有限公司 Distributed data caching and persisting method and system based on Erlang
CN104484469A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Expansion method for supporting non-halt of multi-hash map database cluster system
CN104484472A (en) * 2014-12-31 2015-04-01 天津南大通用数据技术股份有限公司 Database cluster for mixing various heterogeneous data sources and implementation method
CN104615657A (en) * 2014-12-31 2015-05-13 天津南大通用数据技术股份有限公司 Expanding and shrinking method for distributed cluster with nodes supporting multiple data fragments
CN104866380A (en) * 2015-06-18 2015-08-26 北京搜狐新媒体信息技术有限公司 Method and device for processing state transition of cluster management system

Also Published As

Publication number Publication date
CN105549909A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
US11755675B2 (en) Method and apparatus for managing region tag
KR20160145482A (en) Method and apparatus of implementing spiking neural network
US9733835B2 (en) Data storage method and storage server
CN103136114A (en) Storage method and storage device
CN106445677A (en) Load balancing method and device
CN104301425A (en) Object registration center service cluster implementation method based on object type and Hash ring
CN104702691B (en) Distributed load equalizing method and device
CN109542684A (en) A kind of storage remote copy method, device, equipment and storage medium
Smékalová Evaluating the cohesion policy: targeting of disadvantaged municipalities
KR20170016168A (en) Tile-based map data updating system and method thereof
CN114385932A (en) Meteorological data query method and device
Dantas et al. How past vicariant events can explain the Atlantic Forest biodiversity
CN105549909B (en) A kind of optimization method of cluster sequence class consensus information persistence
Ye et al. A two-layer geo-cloud based dynamic replica creation strategy
CN108073472A (en) A kind of memory correcting and eleting codes location mode perceived based on temperature
CN105005586A (en) Degree feature replacement policy based stream type graph sampling method
CN104731716B (en) A kind of date storage method
JP6221701B2 (en) Control program, control device, and control method
JP5712851B2 (en) Data division apparatus, data division method, and data division program
CN112184900B (en) Method, device and storage medium for determining elevation data
CN104820633B (en) Calculate the monitoring method and device of equipment
CN104102557A (en) Cloud computing platform data backup method based on clustering
CN110909062A (en) Data processing method and device, electronic equipment and readable storage medium
De Keersmaeker et al. A spatially explicit empirical model on actual and potential ancient forest plant diversity in a fragmented landscape
US10402422B2 (en) Method and system for synchronizing data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant