CN106503010B - A kind of method and device of database change write-in subregion - Google Patents

A kind of method and device of database change write-in subregion Download PDF

Info

Publication number
CN106503010B
CN106503010B CN201510564356.2A CN201510564356A CN106503010B CN 106503010 B CN106503010 B CN 106503010B CN 201510564356 A CN201510564356 A CN 201510564356A CN 106503010 B CN106503010 B CN 106503010B
Authority
CN
China
Prior art keywords
data block
timeslice
key range
time point
block
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
CN201510564356.2A
Other languages
Chinese (zh)
Other versions
CN106503010A (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201510564356.2A priority Critical patent/CN106503010B/en
Publication of CN106503010A publication Critical patent/CN106503010A/en
Application granted granted Critical
Publication of CN106503010B publication Critical patent/CN106503010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

Abstract

The invention discloses the method and devices that a kind of database changes write-in subregion, are related to data processing field, solve the problems, such as that monotonic increase piece key is chosen in database fragment cluster to carry out causing data fragmentation unbalanced when subregion.The method comprise the steps that obtaining the timeslice key range of latest data block in database current slice, latest data block is the data block of presently written data, Pre-splitter time point is determined in the timeslice key range, the latest data block is divided at Pre-splitter time point, two sub-blocks are generated, will be moved in another fragment by the sub-block of timeslice key range starting point of the Pre-splitter time point.Present invention is mainly used for data of the database to write-in to carry out equiblibrium mass distribution.

Description

A kind of method and device of database change write-in subregion
Technical field
The present invention relates to data processing fields, and the method and device of write-in subregion is changed more particularly to a kind of database.
Background technique
In the fragment cluster of MongoDB database, piece key determines which in cluster every data should be written to On a fragment, by the equilibrium for being moved to fragment load of data block between each fragment, therefore when fragment is arranged, need A key is chosen from data acquisition system, the foundation for using the key to split as data, this key is exactly piece key.The selection of piece key is very Important, data can be divided into the data block of same piece key by MongoDB according to selected piece key, then these data blocks It will be distributed in fragment according to the general sequence of piece key.However, when the load of data write-in is larger and has selected monotonic increase piece When key such as time monotonic increase piece key, new data can only be written in a time newest data block that obtain information content huge Data block, lead to the unequal distribution of data.Since the load of data write-in is higher, MongoDB is moved in each fragment The speed of data block can not much keep up with the writing speed of data, once and the information content size of data block is more than a fixed number Value, then can not just move between fragment to it, so that mass data is deposited on a fragment, leads to hard disk Capacity be rapidly reached the limit.
Summary of the invention
In view of this, the invention proposes the method and device that a kind of database changes write-in subregion, main purpose is Solve the problems, such as that monotonic increase piece key is chosen in database fragment cluster to carry out causing data fragmentation unbalanced when subregion.
First aspect according to the present invention, the present invention provides a kind of methods that database changes write-in subregion, comprising:
The timeslice key range of latest data block in database current slice is obtained, latest data block is presently written data Data block;
Pre-splitter time point is determined in the timeslice key range of latest data block;
Latest data block is divided at Pre-splitter time point, generates two sub-blocks;
It will be moved in another fragment by the sub-block of timeslice key range starting point of Pre-splitter time point.
The second aspect according to the present invention, the present invention provides the devices that a kind of database changes write-in subregion, comprising:
Acquiring unit, for obtaining the timeslice key range of latest data block in database current slice, latest data block For the data block of presently written data;
Determination unit, for determining the Pre-splitter time in the timeslice key range for the latest data block that acquiring unit obtains Point;
Unit is divided, for dividing latest data block at the Pre-splitter time point that selecting unit selects, generates two A sub-block;
Mobile unit, for will divide unit generation using Pre-splitter time point as the subdata of timeslice key range starting point Block is moved in another fragment.
By above-mentioned technical proposal, the method and device of database change write-in subregion provided in an embodiment of the present invention, energy The timeslice key range of latest data block in database current slice is enough obtained, and determines Pre-splitter in the timeslice key range The latest data block is divided at Pre-splitter time point, two sub-blocks is generated, wherein when with Pre-splitter by time point Between point be timeslice key range starting point sub-block due to being also not inserted into data, be moved into another fragment, when After real time reaches Pre-splitter time point, new data can be automatically write by the new fragment where mobile sub-block In, it is higher than the speed that data block is divided automatically and moved so as to avoid the speed due to the latest data block write-in data before division Degree causes the capacity of current slice excessively high, it is ensured that equiblibrium mass distribution of the data in database fragment cluster.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the method for database change write-in subregion provided in an embodiment of the present invention;
Fig. 2 shows a kind of structural schematic diagrams of the device of database change write-in subregion provided in an embodiment of the present invention;
Fig. 3 shows the structural representation of the device of another database change write-in subregion provided in an embodiment of the present invention Figure.
Specific embodiment
It is described more fully the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although showing this public affairs in attached drawing The exemplary embodiment opened, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated here Example is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the model of the disclosure It encloses and is fully disclosed to those skilled in the art.
In the business using database, with the development of business, the data volume generated is also increasing, therefore based on number It comes into being according to the database framework of fragment.Overall data is exactly split in multiple storage equipment by data fragmentation, every in this way The data volume of a storage equipment is opposite to become smaller, to meet database performance demand.When fragment is arranged, need from data acquisition system One key of middle selection, the foundation for using the key to split as data, this key are referred to as piece key.It is initially inserted into data in the database When, data can be inserted into the data block in a fragment, as the data volume of data block is gradually increased, the load of the fragment It gradually increases, in this case, the part of the data block written data would generally be divided away and be moved automatically by database It moves in other fragments, to guarantee that the data distribution of each fragment is balanced.
In embodiments of the present invention, it due to the foundation split using time monotonic increase piece key as data, can lead in this way Cause data to be written to always in newest fragment, while if data write-in load too high, the mobile number between each fragment When can not much keep up with the writing speed of data according to the speed of block, the data volume that will lead to current slice increases, and a denier It is more than certain numerical value according to the information content size of block, then can not just be moved between fragment to it, so that a large amount of numbers According to being deposited on a fragment, the capacity of hard disk is caused to be rapidly reached the limit.
Cause data fragmentation uneven to solve to choose in database fragment cluster when monotonic increase piece key carries out subregion The problem of weighing apparatus, the embodiment of the invention provides a kind of methods that database changes write-in subregion, as shown in Figure 1, this method comprises:
101, the timeslice key range of latest data block in database current slice is obtained.
Since data are written into data block, the data area that each data block is included is the value according to piece key Come what is divided, if carrying out subregion to database, it is necessary to be operated to data block.Therefore in embodiments of the present invention, need The timeslice key range that step 101 obtains latest data block in database current slice is executed, current slice is database fragment The fragment of data is currently written in cluster, wherein the timeslice key range of latest data block is the fragment in current slice In be currently written data data block timeslice key range.
102, Pre-splitter time point is determined in the timeslice key range of latest data block.
After getting the timeslice key range of latest data block, latest data block is divided automatically and is moved in order to prevent Speed is slower than the occurrence of current slice load too high caused by writing speed, therefore needs of the embodiment of the present invention shift to an earlier date The part that data are not written in latest data block is divided, the empty data block of data is not written, before being divided Mention is to need to know the node of division, therefore the embodiment of the present invention needs to be implemented step 102 in the timeslice key of latest data block Pre-splitter time point is determined in range.What needs to be explained here is that the Pre-splitter time point of selection have to ensure it is pre- at this Data block after splitting time point is not written into the data block after data, that is, the Pre-splitter time point as empty data Block.
103, latest data block is divided at Pre-splitter time point, generates two sub-blocks.
After obtaining the Pre-splitter time point of latest data block in a step 102, needing will most at the Pre-splitter time point New data block carries out splitting operation, generates two sub-blocks, and one of sub-block is empty data block, is not written into number According to another sub-block is the part of written data in latest data block before dividing, and will continue to write to data.
104, it will be moved in another fragment by the sub-block of timeslice key range starting point of Pre-splitter time point.
When latest data block is be split off after at Pre-splitter time point, need to be not written into the sub-block of data, also It is to be moved in another fragment by the sub-block of timeslice key range starting point of Pre-splitter time point, when system time reaches in advance After splitting time point, new data can be automatically written into using Pre-splitter time point as the sub-block of timeslice key range starting point In the fragment at place, to guarantee that the load of the fragment where the latest data block before division does not exceed the limit.
The method of database change write-in subregion provided in an embodiment of the present invention, can obtain in database current slice most The timeslice key range of new data block, and Pre-splitter time point is determined in the timeslice key range, by the latest data block It is divided at Pre-splitter time point, generates two sub-blocks, wherein using Pre-splitter time point as timeslice key range starting point Sub-block due to being also not inserted into data, be moved into another fragment, when practical between reach the Pre-splitter time After point, new data can be automatically write by the new fragment where mobile sub-block, so as to avoid due to division The speed that the speed of preceding latest data block write-in data is divided automatically and moved higher than data block leads to the capacity of current slice It is excessively high, it is ensured that equiblibrium mass distribution of the data in database fragment cluster.
Further, in order to preferably understand above-mentioned method shown in FIG. 1, as to the thin of above embodiment Change and extension, the embodiment of the present invention will be described in detail for the step in Fig. 1.
In embodiments of the present invention by taking time monotonic increase piece key as an example, current slice is newest in database fragment cluster Data block is namely currently written into the data block of data, such as being currently written into the data block of data is latest data block M, Timeslice key range is [Tm, T ∞), then the timeslice key range for obtaining latest data block in database current slice is [Tm, T ∞)。
Since timeslice key mapping is in [Tm, T ∞) in data be all written into latest data block M, therefore with the time Passage, the capacity of latest data block M be it is increasing, capacity of fragment moves closer to the limit where leading to it.In order to keep away Exempt from the generation of the above problem, database provides the automatic function of splitting data block in the prior art, will write in data block The partial resolution for entering data comes out and is moved in other fragments, to prevent the capacity of current slice from reaching capacity.But number The function of the automatic fractionation data block provided according to library can not split and the part of data not be written in mobile data block, therefore work as Data are written the speed of latest data block M and much larger than database split the latest data block M automatically and by the data after fractionation When block is moved to the speed in other fragments, the capacity of the fragment will be rapidly reached the limit.To solve the above-mentioned problems, of the invention Embodiment needs split the part that data are not written in latest data block M in advance, obtain in latest data block M not The part of data is written and is moved, to guarantee that the capacity of current slice is not up to the limit.
As an alternative embodiment, current slice in meeting real-time monitoring data library fragment cluster of the embodiment of the present invention Data volume, when the data volume of current slice be greater than preset threshold when, the timeslice of latest data block M in current slice can be obtained Key range [Tm, T ∞), and Pre-splitter time point is determined in the timeslice key range, thus by latest data block M in Pre-splitter Time point is split.
Since the key of the embodiment of the present invention is to split and be not written in mobile latest data block the part of data, In the timeslice key range [T of latest data block Mm, T ∞) in determine Pre-splitter time point allow for the latest data block M is split into two parts, and data are never written in a portion.As an alternative embodiment, the embodiment of the present invention can With by current point in time TnowA time point T laterfutureIt is determined as Pre-splitter time point.Due in current point in time Tnow Place, there are two types of data write states, and one kind is being currently written into data, and one kind is data not being written, if in current point in time TnowThe case where place divides latest data block M, then is probably currently written into data is interfered, and is led to not correct Latest data block M is divided.And in current point in time TnowTime point T laterfutureThe data write state at place only has A kind of situation, i.e., data mode is not written.Therefore in time point TfutureLatest data block M centainly can divide by place To the part that data are not written.
As the timeslice key range [T in latest data block Mm, T ∞) in determine Pre-splitter time point TfutureAfterwards, so that it may In Pre-splitter time point TfuturePlace divides latest data block M, since database can not be to empty data block i.e. data The part that data are not written in block is divided automatically, therefore, the embodiment of the invention provides a kind of optional embodiment, by The triggering that database is instructed based on splitting operation is by latest data block M in Pre-splitter time point TfuturePlace is divided.Specific In implementation process, sp l it order can be used in Pre-splitter time point TfuturePlace divides latest data block M, generates Two sub-blocks, sub-block A and sub-block B.Wherein, two sub-blocks have respectively new timeslice key range, If sub-block B is the part that data are not written, then the timeslice key range of sub-block B is [Tfuture, T ∞), to divide in advance Split time point TfutureTerminal T ∞ with the timeslice key range of the latest data block M before division is as temporal piece key range Beginning and end;The timeslice key range of sub-block A is [Tm, Tfuture), with the time of the latest data block M before division The starting point T of piece key rangemWith Pre-splitter time point TfutureBeginning and end as temporal piece key range.
When by latest data block M in Pre-splitter time point TfuturePlace is divided the sub-block B that data are not written Afterwards, it needs for sub-block B to be moved in another fragment, so that the capacity of fragment where latest data block M before dividing be avoided to reach To the limit.Since database can not carry out the part that data are not written in the empty data block i.e. data block obtained after division Autonomic Migration Framework, therefore, the embodiment of the invention provides a kind of optional embodiments, are instructed by database based on moving operation Triggering will be with Pre-splitter time point TfutureSub-block B for timeslice key range starting point is moved in another fragment.Specific In implementation process, moveChunk order can be used to migrate sub-block B, be moved into another fragment.When by subnumber After being moved in another fragment according to block B, if the real time reaches Pre-splitter time point TfutureBefore, new data can be counted Continue to automatically write according to library in the fragment where sub-block A;If the real time reaches Pre-splitter time point TfutureLater, newly Data can be automatically write by database in the fragment where sub-block B, to avoid before dividing where latest data block M point The capacity of piece reaches capacity.
The embodiment of the present invention passes through the data volume of current slice in the fragment cluster of monitoring data library, when the data of current slice When amount is greater than preset threshold, the Pre-splitter and migration to latest data block are triggered, thus fragment where avoiding latest data block Capacity reaches capacity.In addition, by repeatedly in the division and migration operation of future time point trigger data block, be capable of it is balanced The data of write-in are distributed in database fragment cluster.
As the application to method shown in above-mentioned Fig. 1, the embodiment of the invention provides a kind of databases to change write-in subregion Device, as shown in Fig. 2, the device includes: acquiring unit 21, determination unit 22, division unit 23 and mobile unit 24, In,
Acquiring unit 21, for obtaining the timeslice key range of latest data block in database current slice, latest data Block is the data block of presently written data;
Determination unit 22, for determining Pre-splitter in the timeslice key range for the latest data block that acquiring unit 21 obtains Time point;
Unit 23 is divided, it is raw for dividing latest data block at the Pre-splitter time point that determination unit 22 determines At two sub-blocks;
Mobile unit 24, for that will divide that unit 23 generates using Pre-splitter time point as the son of timeslice key range starting point Data block is moved in another fragment.
Further, as shown in figure 3, acquiring unit 21 includes:
Monitoring module 211, the data volume for current slice in the fragment cluster of monitoring data library;
Module 212 is obtained, for obtaining newest number in current slice when the data volume of current slice is greater than preset threshold According to the timeslice key range of block.
Further, determination unit 22 is used in the timeslice key range of latest data block, after current point in time Any one time point be determined as Pre-splitter time point.
Further, the triggering that division unit 23 is used to instruct based on splitting operation is by latest data block in the Pre-splitter time Click through line splitting.
Further, the triggering that mobile unit 24 is used to instruct based on moving operation will be using Pre-splitter time point as timeslice The sub-block of key range starting point is moved in another fragment.
The device of database change write-in subregion provided in an embodiment of the present invention, can obtain in database current slice most The timeslice key range of new data block, and Pre-splitter time point is determined in the timeslice key range, by the latest data block It is divided at Pre-splitter time point, generates two sub-blocks, wherein using Pre-splitter time point as timeslice key range starting point Sub-block due to being also not inserted into data, be moved into another fragment, when practical between reach the Pre-splitter time After point, new data can be automatically write by the new fragment where mobile sub-block, so as to avoid due to division The speed that the speed of preceding latest data block write-in data is divided automatically and moved higher than data block leads to the capacity of current slice It is excessively high, it is ensured that equiblibrium mass distribution of the data in database fragment cluster.
In addition, data volume of the embodiment of the present invention by current slice in the fragment cluster of real-time monitoring data library, when current When the data volume of fragment is greater than preset threshold, the Pre-splitter and migration to latest data block are triggered, to avoid latest data block The capacity of place fragment reaches capacity.Meanwhile by repeatedly in the division and migration operation of future time point trigger data block, energy Enough balanced data that write-in is distributed in database fragment cluster.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be and not represent the superiority and inferiority of each embodiment for distinguishing each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, In Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the denomination of invention according to an embodiment of the present invention (as determined in website The device of Hyperlink rank) in some or all components some or all functions.The present invention is also implemented as being used for Some or all device or device programs of method as described herein are executed (for example, computer program and calculating Machine program product).It is such to realize that program of the invention can store on a computer-readable medium, or can have one Or the form of multiple signals.Such signal can be downloaded from an internet website to obtain, or be provided on the carrier signal, Or it is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (8)

1. a kind of method of database change write-in subregion, which is characterized in that the described method includes:
The timeslice key range of latest data block in database current slice is obtained, the latest data block is presently written data Data block;
Pre-splitter time point is determined in the timeslice key range of the latest data block;
The latest data block is divided at the Pre-splitter time point, generates two sub-blocks, when the Pre-splitter Between put after data block be empty data block;
It will be moved in another fragment by the sub-block of timeslice key range starting point of the Pre-splitter time point.
2. the method according to claim 1, wherein described obtain latest data block in database current slice Timeslice key range, comprising:
The data volume for monitoring current slice in the database fragment cluster, when the data volume of the current slice is greater than default threshold When value, the timeslice key range of latest data block in the current slice is obtained.
3. the method according to claim 1, wherein being determined in the timeslice key range of the latest data block Pre-splitter time point, comprising:
In the timeslice key range of the latest data block, any one time point after current point in time is determined as pre- point Split time point.
4. the method according to claim 1, wherein the latest data block is clicked through in the Pre-splitter time Line splitting, comprising:
Triggering based on splitting operation instruction divides the latest data block at the Pre-splitter time point.
5. the method according to claim 1, wherein two sub-blocks of the generation, comprising:
Generate sub-block A and sub-block B;
The sub-block A is with the starting point of the timeslice key range of the latest data block before dividing and the Pre-splitter time Beginning and end of the point as temporal piece key range;
The sub-block B is with the end of the timeslice key range of the latest data block before the Pre-splitter time point and division Beginning and end of the point as temporal piece key range;
It will be moved in another fragment by the sub-block of timeslice key range starting point of the Pre-splitter time point, comprising:
It will be moved in another fragment by the sub-block B of timeslice key range starting point of the Pre-splitter time point.
6. the method according to claim 1, wherein will be risen by timeslice key range of the Pre-splitter time point The sub-block of point is moved in another fragment, comprising:
Triggering based on moving operation instruction will be moved by the sub-block of timeslice key range starting point of the Pre-splitter time point It moves in another fragment.
7. a kind of device of database change write-in subregion, which is characterized in that described device includes:
Acquiring unit, for obtaining the timeslice key range of latest data block in database current slice, the latest data block For the data block of presently written data;
Determination unit, for determining Pre-splitter in the timeslice key range for the latest data block that the acquiring unit obtains Time point;
Unit is divided, for being divided the latest data block at the Pre-splitter time point that the determination unit determines It splits, generates two sub-blocks, the data block after the Pre-splitter time point is empty data block;
Mobile unit, for by it is described division unit generate using the Pre-splitter time point as the son of timeslice key range starting point Data block is moved in another fragment.
8. device according to claim 7, which is characterized in that the acquiring unit includes:
Monitoring module, for monitoring the data volume of current slice in the database fragment cluster;
Module is obtained, for obtaining newest in the current slice when the data volume of the current slice is greater than preset threshold The timeslice key range of data block.
CN201510564356.2A 2015-09-07 2015-09-07 A kind of method and device of database change write-in subregion Active CN106503010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510564356.2A CN106503010B (en) 2015-09-07 2015-09-07 A kind of method and device of database change write-in subregion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510564356.2A CN106503010B (en) 2015-09-07 2015-09-07 A kind of method and device of database change write-in subregion

Publications (2)

Publication Number Publication Date
CN106503010A CN106503010A (en) 2017-03-15
CN106503010B true CN106503010B (en) 2019-11-26

Family

ID=58287833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510564356.2A Active CN106503010B (en) 2015-09-07 2015-09-07 A kind of method and device of database change write-in subregion

Country Status (1)

Country Link
CN (1) CN106503010B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851525B (en) * 2018-07-24 2022-08-26 华为云计算技术有限公司 Data fragmentation method, related equipment and computer storage medium
CN109857725A (en) * 2019-02-20 2019-06-07 北京百度网讯科技有限公司 Data base management method and device, server and computer-readable medium
CN111600799B (en) * 2020-05-20 2022-05-20 金蝶蝶金云计算有限公司 Fragment routing method, server and computer storage medium
CN114238450B (en) * 2022-02-22 2022-08-16 阿里云计算有限公司 Time partitioning method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7992037B2 (en) * 2008-09-11 2011-08-02 Nec Laboratories America, Inc. Scalable secondary storage systems and methods
CN102629247B (en) * 2011-12-31 2014-09-17 华为数字技术(成都)有限公司 Method, device and system for data processing
CN103929500A (en) * 2014-05-06 2014-07-16 刘跃 Method for data fragmentation of distributed storage system
CN104883394A (en) * 2015-04-28 2015-09-02 浙江大学 Method and system for server load balancing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"MongDB 分片和复本集介绍";tullyliu;《https://tullyliu.iteye.com/blog/820161》;20101124;1-6页 *

Also Published As

Publication number Publication date
CN106503010A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
US10263879B2 (en) I/O stack modeling for problem diagnosis and optimization
CN106503010B (en) A kind of method and device of database change write-in subregion
US20160188227A1 (en) Method and apparatus for writing data into solid state disk
CN103744617B (en) The merging compression method of a kind of key-value storage Data File and device
CN105843819B (en) Data export method and device
US10235379B2 (en) Identification of high deduplication data
CN104239133A (en) Log processing method, device and server
US11151144B2 (en) Sorting tables in analytical databases
CN110147281A (en) Optimize method, apparatus, the electronic equipment that snowflake algorithm is applied in financial business
EP3523720B1 (en) Task scheduling
US20150331712A1 (en) Concurrently processing parts of cells of a data structure with multiple processes
US10146783B2 (en) Using file element accesses to select file elements in a file system to defragment
CN108809704A (en) Data deduplication statistical method based on dynamic time windows and device
US10929347B2 (en) Defragmenting files having file blocks in multiple point-in-time copies
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment
CN107515724B (en) Method and apparatus for reproducing input and output of storage system
CN106681837A (en) Data sheet based data eliminating method and device
US20190294701A1 (en) Data replication in a distributed file system
US10198209B2 (en) Memory storage recycling
US20180225110A1 (en) Legacy program code analysis and optimization
CN114968028A (en) Method, apparatus, and medium for dynamically changing menu layout based on user behavior analysis
GB2525613A (en) Reduction of processing duplicates of queued requests
CN105069108B (en) Based on PaaS system big data querying method and device
US10552059B2 (en) Data migration with placement based on access patterns
CN111522512A (en) Optimized cold and hot data separation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant