CN102314505B - Based on the buffer zone version production method of partial ordering relation - Google Patents

Based on the buffer zone version production method of partial ordering relation Download PDF

Info

Publication number
CN102314505B
CN102314505B CN201110263513.8A CN201110263513A CN102314505B CN 102314505 B CN102314505 B CN 102314505B CN 201110263513 A CN201110263513 A CN 201110263513A CN 102314505 B CN102314505 B CN 102314505B
Authority
CN
China
Prior art keywords
buffer zone
timestamp
version
data block
base cluster
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
CN201110263513.8A
Other languages
Chinese (zh)
Other versions
CN102314505A (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.)
Beijing Kingbase Information Technologies Co Ltd
Original Assignee
Beijing Kingbase Information 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 Beijing Kingbase Information Technologies Co Ltd filed Critical Beijing Kingbase Information Technologies Co Ltd
Priority to CN201110263513.8A priority Critical patent/CN102314505B/en
Publication of CN102314505A publication Critical patent/CN102314505A/en
Application granted granted Critical
Publication of CN102314505B publication Critical patent/CN102314505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of buffer zone version production method based on partial ordering relation, be used in data base cluster system.When loading data block to buffer zone first, this data block is buffer zone version, and the timestamp of data block is the timestamp of buffer zone version; If subsequent load is greater than the timestamp of buffer zone version to the timestamp of the data block of buffer zone, then using the timestamp of this data block as the new timestamp of buffer zone version; After amendment buffer zone completes, be this new timestamp by the update of time stamp of data base cluster system.The present invention can guarantee that the buffer zone version of same data block is dull renewal in its life cycle, and carry out communication with other node again without the need to the renewal for version each time, thus decrease the internodal traffic of data-base cluster, improve the performance of data base cluster system.

Description

Based on the buffer zone version production method of partial ordering relation
Technical field
The present invention relates to the production method of buffer zone version in a kind of data-base cluster, particularly relate to a kind of production method based on buffer zone version in the data-base cluster of partial ordering relation realization, belong to data-base cluster technical field.
Background technology
Along with rapid development of economy, number of users, data volume present explosive growth.Under the ever-increasing applied environment of user's request, acid test is proposed to database technology.For all databases, except recording correct result, be also faced with the challenge of following several respects: how to improve processing speed, the load balancing of fulfillment database; How to ensure the availability of database, data security and how to realize data set extensibility.
In order to tackle above-mentioned technological challenge, people use for reference the technical concept of computer cluster (get up highly closely to have cooperated by one group of loose integrated computer software and/or signal wiring evaluation work), get up to form data base cluster system by multiple DataBase combining.Data base cluster system (DatabaseClusterSystem, be called for short DBCS) Clustering is combined with Database Systems, it is one group of complete, autonomous calculation processing unit (node), each node all has the hardware resources such as CPU, internal memory and disk alone, runs independently operating system and autonomous Database Systems.Each node is by high speed private networks or the interconnection of business universal network, and cooperated computing each other, provides paralleling transaction process to serve as unified Database Systems.
In data base cluster system, due to multiple database node (abbreviation node) parallel running, multiple node can be caused all to read or revise same data block, thus be formed in whole data base cluster system the multiple versions that there is same data block.In order to ensure that the data block of multiple version is effectively managed, prevent the data block that node visit is out-of-date, people are generally data block and add a new attribute, i.e. data block version property.After data block is loaded into buffer zone, be namely called buffer zone version.In order to ensure the consistance of buffer zone version between multinode, each node in the process producing buffer zone version must with other node communication, to produce content on all four buffer zone version.In the prior art, generally adopt central controlled method to produce buffer zone version, namely carried out the generation of unified management buffer zone version by a Version Control device, each node is to the new buffer zone version of Version Control device application.The shortcoming of this mode is that one is that the expense of communication is larger, and two is performance bottlenecks that Version Control device itself may become data base cluster system.
Summary of the invention
For the deficiency existing for prior art, technical matters to be solved by this invention is to provide a kind of buffer zone version production method based on partial ordering relation.Use the method significantly can reduce the traffic in data base cluster system between each node.
For realizing above-mentioned goal of the invention, the present invention adopts following technical scheme:
Based on a buffer zone version production method for partial ordering relation, be used in data base cluster system, wherein,
When loading data block to buffer zone first, described data block is buffer zone version, and the timestamp of described data block is the timestamp of buffer zone version;
If subsequent load is greater than the timestamp of described buffer zone version to the timestamp of the data block of described buffer zone, then using the timestamp of this data block as the new timestamp of described buffer zone version;
After the described buffer zone of amendment completes, be this new timestamp by the update of time stamp of data base cluster system.
When the node in data base cluster system reads described buffer zone version, first the timestamp of described buffer zone version is checked, if the timestamp of described buffer zone version is greater than the current timestamp of described data base cluster system, be then the timestamp that described data base cluster system is new by the time stamp setting of described buffer zone version.
When transmitting described buffer zone version to other node, the timestamp of more described buffer zone version and the timestamp of receiving node, get wherein the greater as the new timestamp of described buffer zone version.
If the timestamp of described buffer zone version is greater than the timestamp of described receiving node, then using the timestamp of described buffer zone version as the new timestamp of described receiving node.
The present invention utilizes the partial ordering relation between the version of different buffer zones, ensure that the buffer zone version of same data block is dull renewal in its life cycle, and carry out communication with other node again without the need to the renewal for version each time, thus decrease the internodal traffic of data-base cluster, improve the performance of data base cluster system.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Fig. 1 is in the version production method of buffer zone provided by the present invention, guarantees the operational flowchart of buffer zone version partial ordering relation.
Embodiment
In the version production method of buffer zone provided by the present invention, first for each data block adds a new attribute, i.e. data block version property.This data block version property timestamp represents.Each node in data base cluster system can arrange oneself timestamp.Each node safeguards oneself timestamp respectively, and this timestamp increases over time and constantly.The buffer zone version dullness of same data block increases, but between the buffer zone version of different pieces of information block, it doesn't matter.In whole data base cluster system, the data block buffer of multiple different editions can be there is.Wherein, the maximum buffer zone of version is latest edition, and the buffer zone of other version is expired version.Expired version can be used for the backtracking operation realizing buffer zone.
When buffer zone is only relevant with the operation of single node, the timestamp of current time stamp as data block of this node can be got.When data block is loaded into buffer zone first, namely this data block becomes buffer zone version, and the timestamp of data block also becomes the timestamp of buffer zone version.When subsequent load data block is to buffer zone, if the timestamp of the data block of subsequent load is greater than the current timestamp of buffer zone version, then using the timestamp of this data block as the new timestamp of buffer zone version.After buffer zone has been revised, upgrading its timestamp has been the current timestamp of data base cluster system.When there is the exchange of buffer zone between each node, needing stab correction time, preventing new buffer zone versioning timestamp to be less than old buffer zone versioning timestamp, thus cause accessing expired buffer zone.
In order to address this problem, invention introduces the partial ordering relation concept in mathematics.Mathematically, if R is the relation on nonempty set A, if R is reflexive, antisymmetric and transmits, then title R is the partial ordering relation on A.In the present invention, partial ordering relation can be understood as two buffer zone versions timestamp between the ordinal relation of " being more than or equal to " or " being less than or equal to " and so on.Therefore, there is partial ordering relation in different buffer zones version on timestamp.
Below in conjunction with the drawings and specific embodiments, specific embodiment of the invention step is described further, but this embodiment can not be interpreted as limitation of the invention.
In certain data base cluster system based on shared disk, comprise 4 database nodes and a global resource management node.Wherein, database node refers to the server providing database service, and accept the data base querying request of user, and return results, it belongs to the ingredient of data base cluster system, can have one or more; Global resource management node refers to the node providing data base cluster system shared resource management service, and it is the core component of data base cluster system.
When the node in data base cluster system reads buffer zone version from disk buffer, first check the timestamp of buffer zone version.If when the timestamp of buffer zone version is greater than the timestamp of current database group system, be then the timestamp that data base cluster system is new by the time stamp setting of buffer zone version.When transmitting buffer zone version to other node, comparing the timestamp of this buffer zone version and the timestamp of receiving node, getting wherein the greater as the new timestamp of buffer zone version, and the timestamp that it can be used as receiving node new.
Below for Fig. 1, describe the situation of change of buffer zone version in the process of visit data block in detail.
In a step 101, node produces data block Access Events, proposes a certain data block (i.e. buffer zone version) request of access.In a step 102, judge whether there is this data block in local buffer: if there is the buffer zone comprising this data block, then jump procedure 103; If there is not the buffer zone comprising this data block, then jump procedure 107; In step 103, judge whether this buffer zone version is latest edition by timestamp: if latest edition, then jump procedure 104; If not latest edition, then jump procedure 108.
At step 104, the associative operation of the data block that conducts interviews; In step 105, judge whether the data block of accessing is modified: if be modified, then jump procedure 106; If unmodified, then jump procedure 112; In step 106, buffer zone version time is Given this latest edition, and the timestamp arranging buffer zone version is the current timestamp of data base cluster system, jumps to step 112, completes the accessing operation of buffer zone.
On the other hand, in step 107, judge whether other node has this data block: if exist, then jump procedure 108; If do not exist, then jump procedure 110.In step 108, transmit the data block of latest edition to other node request, and receive local buffer; Then step 109 is proceeded to.In step 109, judge whether the timestamp of buffer zone version is greater than the current timestamp of data base cluster system: if be greater than the current timestamp of data base cluster system, then jump procedure 111; Otherwise step 104 is returned in redirect.In step 110, from disk, read block is to local buffer, and after completing, step 109 is returned in redirect.In step 111, be the timestamp that data base cluster system is new by the time stamp setting of buffer zone version, after completing, step 104 is returned in redirect.
By above-mentioned operation steps, can ensure that the buffer zone version of same data block is dull renewal (meeting the requirement of partial ordering relation) in its life cycle, and carrying out communication with other node again without the need to the renewal for version each time, only to need when transmitting the page communication once.
Above the buffer zone version production method based on partial ordering relation provided by the present invention is described in detail.To those skilled in the art, to any apparent change that it does under the prerequisite not deviating from connotation of the present invention, all by formation to infringement of patent right of the present invention, corresponding legal liabilities will be born.

Claims (2)

1., based on a buffer zone version production method for partial ordering relation, be used in data base cluster system, it is characterized in that:
When loading data block to buffer zone first, described data block is buffer zone version, and the timestamp of described data block is the timestamp of buffer zone version;
When the node in data base cluster system reads described buffer zone version, checking the timestamp of described buffer zone version: if the timestamp of described buffer zone version is greater than the timestamp of described data base cluster system, is then the timestamp that described data base cluster system is new by the time stamp setting of described buffer zone version; If the timestamp being loaded into the data block of described buffer zone is greater than the timestamp of described buffer zone version, then using the timestamp of this data block as the new timestamp of described buffer zone version, after the version of amendment described buffer zone, be this new timestamp by the update of time stamp of data base cluster system;
When transmitting described buffer zone version to other node, the timestamp of more described buffer zone version and the timestamp of receiving node, get wherein the greater as the new timestamp of described buffer zone version.
2. buffer zone as claimed in claim 1 version production method, is characterized in that:
If the timestamp of described buffer zone version is greater than the timestamp of described receiving node, then using the timestamp of described buffer zone version as the new timestamp of described receiving node.
CN201110263513.8A 2011-09-07 2011-09-07 Based on the buffer zone version production method of partial ordering relation Active CN102314505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110263513.8A CN102314505B (en) 2011-09-07 2011-09-07 Based on the buffer zone version production method of partial ordering relation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110263513.8A CN102314505B (en) 2011-09-07 2011-09-07 Based on the buffer zone version production method of partial ordering relation

Publications (2)

Publication Number Publication Date
CN102314505A CN102314505A (en) 2012-01-11
CN102314505B true CN102314505B (en) 2016-04-13

Family

ID=45427670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110263513.8A Active CN102314505B (en) 2011-09-07 2011-09-07 Based on the buffer zone version production method of partial ordering relation

Country Status (1)

Country Link
CN (1) CN102314505B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897761B (en) 2014-05-27 2023-01-13 华为技术有限公司 Cluster storage method and device
CN106940699B (en) * 2016-01-05 2021-02-05 创新先进技术有限公司 Synchronous processing method, device, server and system for memory data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1524239A (en) * 2001-06-01 2004-08-25 �׹��Ĺ��ʹ�˾ Consistent read in a distributed database environment
CN101110706A (en) * 2007-07-23 2008-01-23 中兴通讯股份有限公司 Configuration data synchronization method
CN101188566A (en) * 2007-12-13 2008-05-28 沈阳东软软件股份有限公司 A method and system data buffering and synchronization under cluster environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1524239A (en) * 2001-06-01 2004-08-25 �׹��Ĺ��ʹ�˾ Consistent read in a distributed database environment
CN101110706A (en) * 2007-07-23 2008-01-23 中兴通讯股份有限公司 Configuration data synchronization method
CN101188566A (en) * 2007-12-13 2008-05-28 沈阳东软软件股份有限公司 A method and system data buffering and synchronization under cluster environment

Also Published As

Publication number Publication date
CN102314505A (en) 2012-01-11

Similar Documents

Publication Publication Date Title
US10949447B2 (en) Blockchain-based data synchronizing and data block parsing method and device
CN111338766B (en) Transaction processing method and device, computer equipment and storage medium
US10891267B2 (en) Versioning of database partition maps
KR101863398B1 (en) Method and system for synchronization mechanism on multi-server reservation system
CN107391758B (en) Database switching method, device and equipment
CN111597015B (en) Transaction processing method and device, computer equipment and storage medium
CN102314506B (en) Based on the distributed buffering district management method of dynamic index
US10275347B2 (en) System, method and computer program product for managing caches
CN102088484B (en) Write lock method of distributed file system and a system thereof
US9020949B2 (en) Method and system for centralized issue tracking
JP2023546249A (en) Transaction processing methods, devices, computer equipment and computer programs
US20180004777A1 (en) Data distribution across nodes of a distributed database base system
US20130191523A1 (en) Real-time analytics for large data sets
US20110225121A1 (en) System for maintaining a distributed database using constraints
US11314717B1 (en) Scalable architecture for propagating updates to replicated data
CN101183379A (en) Attribute level federation from multiple data sources
JP2009522660A (en) Method and apparatus for searchable data services
CN103473696A (en) Method and system for collecting, analyzing and distributing internet business information
US10747739B1 (en) Implicit checkpoint for generating a secondary index of a table
WO2020024903A1 (en) Method and device for searching for blockchain data, and computer readable storage medium
JP2023541298A (en) Transaction processing methods, systems, devices, equipment, and programs
US20110225120A1 (en) System for maintaining a distributed database using leases
CN110825704A (en) Data reading method, data writing method and server
CN102314505B (en) Based on the buffer zone version production method of partial ordering relation
CN102339305B (en) Database cluster failure recovery method on basis of partial ordering relation logs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant