WO2016122546A1 - Transactional key-value store - Google Patents
Transactional key-value store Download PDFInfo
- Publication number
- WO2016122546A1 WO2016122546A1 PCT/US2015/013602 US2015013602W WO2016122546A1 WO 2016122546 A1 WO2016122546 A1 WO 2016122546A1 US 2015013602 W US2015013602 W US 2015013602W WO 2016122546 A1 WO2016122546 A1 WO 2016122546A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- volatile
- snapshot
- page
- pages
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2315—Optimistic concurrency control
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
- G06F11/1451—Management of the data involved in backup or backup restore by selection of backup contents
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0685—Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/84—Using snapshots, i.e. a logical point-in-time copy of the data
Definitions
- FIS.1 is a se ematfo diagram of a multMjere computing sysem In which examples oftho resent isdowe can be implemented,
- FIG..2A iustetas an xam le -database managem nt system, i 00SJ FG..28 iustates another example database - anag me t system with s edfe -example data tectums.
- FIG, 3 depicts an -example database management system In a mylfreore multi-node competing system usi g a generali ed tree data structure,
- FIG. S depicts example atabase, mangemen-f system that indfudes distifeatsd togging to bulk, -and maintan data in n ps ot data, ges in pon-vaM!e r ndom access m « mor (HVRAM) corresponding to data In volatile data i agee ' volatile random access memory (VRAM).
- HVRAM volatile random access memory
- FIG SA de lete an example datab e management system win a distributed log gleaner pocess a «d partitioned snapshot data ages in
- FIG, ⁇ 8 depicts ie mapper arid reducer pocesses of an exam e dlstnoyf d tog gleaner rocess forganerattoa artitioned sna s ha date pos 45.
- Fid, iC illustrates exampl ortioned s a ho data ages
- si 21 F0, 1A is a fo chat of an mimn ⁇ * tm $ for accessing data stored In volatile data ages
- FIG. TB ss a flowchart of an example met od for generating:
- FIG. SB is fiowefiaft of an exar pla method for a lightweight, ea al-fee snapshot cache
- FIG. illustrates ao ample of a master-tee dafa structure with move -fcits and fbstent lns accordng to t e present disdosum..
- FIG, 10B depicts an exa ple of search and inset fa a has Index data structure according to the p t disclosure
- FIG, 10C is flowchart of a method for inserting a data p ge into a hash index data st ctue, acc di g to fee resent disclosure
- FIG, 11 A depcs an exam le scan/append only Reap data structue ccoding to the present disclosure.
- FIG, 118 depicts an e s m l of a scan/read fh a ap data stuct e In voiat!e memory. ! 323! FIG- 11C depicts -m example sispapstetdata page eonstfudloR In seariap end only hs data steciijre.
- M2 J IG.11 P is iD chari of a method for writing- records to a scan/append mty data stotyr , coordtni to t e reset 4 &b m,
- FIG 11 E Is tovchsrt of a method c ning data: records to a scanappend ony data structure, according to the present disclosure
- Vailoiis aspects of the present disclosure part %® us d individyal or in com&snat&3 ⁇ 4n with one anoihtrio rovide ACID compliant key-value d a starts that seals up far use in databases resident in som ul g systems th man processing coes ( g... s op the -order f thousands) * lage V AMs, and hu - NVHM*f$,
- a d NVRAM of iha computing system can ba dislrl yfail across multi le Itaf pppaetad u das, plt te mm .can integrated: Into a stem-o ⁇ oip ($oG ⁇ Accodingly, implementations of tlie present disclosure c : provide fee functionality far multi le cores i multiple SoCs to exee te many concurrent tiaasaotiofis on data "m t e data pages stored In the istributed VWM and VR M arrays lthaut a central concofrenoy eontfsSar.
- Some im ptemenia oy s include lataaasas ir* h fen d ta, My dl ng me!adsta or Index data, can fee stored
- a data page can include a ke or a mt of teys.
- T data p ges can Pa assodatad with one 3 ⁇ 4nofer Kiroyp m or ' more dual pointers.
- each key or ange of keys can be associated with a du pointer that lnol «d@a Wiofepi or addresses of physical taions of the corresponding data pages ontsWng the data record in th data gea in VRAM and the AM * he data pages In the VRAM and f e NVRAIV?
- ear* i>e organized accodi g is arious dat structure as iastratad by the ec mpfe data slryeturaa desed ' bed herein, in some scenarios, It Is ossible for a particylar data record to fee contained In a volatile data page the A and in a logically equivalent snapshot dat age, in the NV A ,
- any UVRAM can provide far venous nieehanlsnia to kee lra
- V A and readily available to tie prooasaln# cores.
- By keeping comraodlv tissd dats In RA potentially slo transactions that include u dates, ch nges,, or delai ns of data records in the secondary storage m HV AM can da redyoad or eliminated. Changes to the data records ip In the volatile data ages he logged and later he commitee! o the snapshot pages In a distributed log gleaner process se rated from tie esceoylan of the transaction to halp avoid software and hardware bottlenecks.
- a computationally l ⁇ htw3 ⁇ 4i ⁇ cache of s aps ol ages can ha pialytaiaad in the VRAM is rovide fast, nearly wm tee access for read ⁇ -on!v transactions
- i otemantaitens read-oniv transactions that are dlraoted toward records not already contained
- the snapshot cache can occasionally Include multiple copies of the snapshot data pages without violating correctness in the database.
- the cached snapshot: data ages can pa kept in i VRAM for a predetermined .amount of fims after is most mi read. A ⁇ >fdtt3 ⁇ 4gi ⁇ comm n ⁇ read
- VRAM 30 computational cost of maintaining coherent nomor -cac es In VRAM 30 can tail the pynider of processor cores 25 that can operate effectively on
- mm muM-mm systems may fiavo o-nl two to eight Ipiofce-nneeted s ckets for iooesso-r cores,
- c n store data the VRA 30 , such as stale random access memory (S A ⁇ S, or dynamle random m ms. mornory % ⁇ > wmi i diSk -Das d dat fcssas, mm mom dsta c p be stoad In N AM 40 piamosi rs, h ® ani# mamory. spin transfer -torque, etc,).
- S A ⁇ S stale random access memory
- dynamle random access memory m ms. mornory % ⁇ > wmi i diSk -Das d dat fcssas, mm mom dsta c p be stoad In N AM 40 piamosi rs, h ® ani# mamory. spin transfer -torque, etc,).
- iinlte iffsk-tesei dat ses, 0 can be slgnltetiii faster than hard disks, and with some iV A devices, can c the edom iee of the V , Ai % m® of t e so g ty e soigass, d ta: stoed VRA 3Q and NVRAM 40 am aeoesssd in amy random der, !hys offering sigr3 ⁇ 4iea «!
- s stem 1 can Inoiyde muiple interconnected nodes 20,
- a node 20 ca include rmiiiple Indivi ual processor oores or multi-core s stam ⁇ l s (SoCis) isp se aid interccnneeted wii3 ⁇ 4 one a «o ?er hrough a droul % t$ ( «,p, s ode board m ® rmtfser board), Irs such Implementations, m SoC c n Include igit l, analog, add mk ⁇ d 3 ⁇ 4 s3 ⁇ 4naf logic fonclionai all on a single oblp substrata, SoCe&r ojmmon in high oum com uting systems because of their low power co sum tion lowcosi «n*i small si3 ⁇ 4e.
- the crizodemode coiTsm icaion co n ctions 57 between nodes 20 can Inoiyde v ri us electr fie and h tonls commu ication protocols, end meda for relayi g data, commands, and re u sts from nod ⁇ 20 to another noda 20,
- a arlfcylar c m 25*1 In node 20*1 can e uest data stomd in volatile data ages 3S In VRAM.30.
- VRAM totMteee 27 a d NVRAM snfarfaea 4? can include fyoofena!liy for aadmeatng id ⁇ ptysieal locator of a ' partfe !ar volatile data pago 35 or nonv l lte 4S ' W fh nofrospondipg VRAM: tO or NVRAM 40. in one ex m le fni feniepiaion, the VR M frifsriaos 27 t NV A Interface 4?
- c p include or a oss metadata that i cludes the physica sd pjss of tm root ages of a paraoulaf stora e ' targeted S3 ⁇ 4? a transaction.
- a particular dat page containing a data record" associated with a key car* be tend asing a data structure by which the sioraga is .organized. Examples of data strucures , that c n take aoVarstage of the v ious op® rational capabilities of eorrtputrrsg system 10 r d scri ed herein.
- V A SO (e.g. s O AMi)
- sm femematlons of the- t mimmmm use 3 ⁇ 4 3 ⁇ 4 n om ⁇ W i NVRAM 0.
- f «4 ⁇ l
- Some NVRAM 40 sye as phase-change memory (PCS% s in transfer torque* magnetic r nd m aocoss me oy ($ (S AMX and monristors * offer erformance- close f ⁇ or equal to that of ORAM or SRAM tote, buiwii fie rraiwoM of Hash memor , p$4 ⁇ l Ex m le of tie present ⁇ Isctesurs include performaree
- V A 40 tec nologies are sil ex ected to ave higher lafero m V 3 : * h a DRAM,
- a PCM product may have 6 to 30 ⁇ read latency and 100 ⁇ $ writs latency.
- varous i le ntaion can VRAM 39 to- store so-o led " t dat that Is fre uenty accessed
- so ⁇ afei 'told data * ttsaf is accessed loss frequenly can be m i m rid mt of NV A& 40 m- eeded fthoy of3 ⁇ 4Jye decrease in poffeo oo .
- FIG, 2A iysifstos a icfwmatie view a! a mm 100 lit ®mM voiaieooovoiatie RAM -s st m io aeoordariee m various essm te sm lenientattofis of too pj3 ⁇ 4s®r3 ⁇ 4 lsifes e.
- s shown t * DB fS 100 can include vartoos com onent processes or tedlq «alty 5 such as fog gleaner 1 0, data structures.120, andor a snapshot caste 130, .As escri ed hereJfr, yqh component prm»f so s or funefioriaKty c n km impfemwtt d as a
- the DB S 100, and n of is compo ent functionally, ears fee embodied as cpopoter exeeutebe code that Include Instr cti ns., that when executed by a roce sor In a com utng s ism, mm a pmmmi to configured to perferni fujctoisNy described iiereift
- the rlidctte lty of log gleaner 110, data sifyclyes 120, end a snapshot cache 30 can b #tid yted m$ m iti ie nodes .20 * As such, the funqtio atlt of each one of the components el the DBMS 100, while described herein as .discrete rdodefes, an he the result of the var us processing cores 25, VRAM 30, and VRAM 0, of tie multiple nodes M m the sustain 10 performing dependent or independent operations that n the composite achieve, the fun&ieoalrty of the DBMS 100.
- n be m®4 to by Id databases that can re fy!y exploit the ca abilities of mull- processor .c m utng systems with ianje VRAM 30 and NV AM 40 a s, sooh as syste 10.
- da ases can be fuiy AGI oornpttant and scalable to thousands, of processing cores 25, Databases I plem nted i accoding with the examples of the present disclosure improve the utteii o o the V A 30 and n AM 40 and.
- v rous databases according to the present o3 ⁇ 4olesufe- use a t3 ⁇ 4hiwe3 ⁇ 4pi o tirnistiooon irfenoy- control COCO).
- a database can maintain data ages In both the NVRAM 40 $ the VRAM 30 without gtebat metadata to ttack where records are eached., instead of global metadata, data ases ears, be bull using variations of DBMS 100 that ears maintain physically independent., bet logically equivalen, copies of each data age in V ⁇ 30 and MViRAM 0, The copies of ' the data pages resident In both VRAM 3d nd 40 rovide a --duality In the dai tmM for
- the data em be s nshmnfead between the two str yet mm fetches.
- m ⁇ f simple ersion of an IS t ean include a two*
- ope is fniatteran emtely residents In AM, horaas !Pa other s i sid esident reoorda can Pa ncited nto the i mQfy- mskts3 ⁇ 4nis tree. If the insertion causes the memory resident tree to exceed predefemitned ⁇ 3 ⁇ 4e t rasholcl, the oonflgpous segment of mttim is r amove torn Sis memoy resi ent tree and merged into t disk- re ⁇ dent tree..
- the erformance eharssiehstles of the LS tre@a stem from the fact that each of the te components is turned to the characteristics of lis und l ng st ge me&iuw. and that data a officiate nioaed a ross me i$ In raiilno bate a3 ⁇ 4 sing m method similar to a merge sort
- log gleaner 110 can use straSied snapshots tftat mirror each volatile data page in siegle- snapshot dat page In a hlerarohfcal fashion.
- stratified snapshot refers to a data structure In NVRAM 40 In which oniy data pag s that am affected b a particular tranaapl n are siiangad, As s eti, when a volatile data age 35 Is droppecl to s ve W U 30 consunipion, sedsfeahila transactions can. react a: sngle snapsiibt data pape o P errnsne If tie feciyestedi record m and3 ⁇ 4r retrieve the requested record,
- C006GJ Tf3 ⁇ 4e log 9tesn ⁇ f 110 cars isidude function ally for ⁇ Meeing log entries corresponding to the senaizapie imnsaciions execute daa records eonfsifmi in vc!aite data ages 35 in V M 30 p3 ⁇ 4? the many mm 2S,
- the tog gteaner 110 can %wn w m m m e co!tected tog ⁇ nines aocordirig to vanoys chafactenstics aissoc&ted it : the tog mt , h as time of e ecution, key range, and the lke.
- IWWl i data s&uctures 120 mm fcy m DBMS 1 S can pe epeclfiealy tyned tor yarioys yrposas and operation wttd UVPtM 40.
- Aosord ! mms imam w ®& m ⁇ » m ty es* m
- the snapshot cache 130 can indud I3 ⁇ 4Htwelgni and wait: free buffer poo! of Irnmuiable snapshot pages lor readonly ra saefcns, s described herein s the snaps ot cac e 130 ; ca disthpyed anong the m®AM 40 of multiple- nodes 20 or t® local to sinc1 ⁇ 4 r «sd m n one ex m le impiemontattoa s nods 20 can incfyde a snapshot cache 130 tiat Incydes a snapshot pages niost recofsl ⁇ read by iransacttons executed is the cores 2S In that od 20. Addit nal details of the tocttonalty and capabilities of the snapshot cache 130 m® descri ed herein,
- FIG, 28 de ots an sample DBMS 101 ae «3 ⁇ 4iin ⁇ to mfiwm implementations of the present dtefoeeft, DBMS 101 , like example DB S 1D0 f can incl de a tog gieaner 110 nd a snapshot csetie 130.. in addlfen s DBMS 101 can include data strucfcims 120 iftat include specie data structure types acc rding to venous implementattons of $3 ⁇ 4e present disclosure.
- DBMS 101 cap include a master-irea dat structure 123 with ?W8d* and fosert m ssrfafebfc hash ind x data structure 126, . .and the end3 ⁇ 4csn only heap data.einjctiire 12?, As desehdad, each of the master-tree data type 123, seh l3 ⁇ 4 bi hash mm data structure 125 * . and fte a p nd&cad niy ea data strict**® 12? nave at»ute that m ke -them euitabie tor various types of use esMfc. Details of the specific -.e&ie data stnjcfcrgs 120 an described ' m additional detail herein in reference to urn eases,
- Execution of the trans ction can include ihoiie operations:, such as rea s,, ntes, updates, deletions, and t lite * on data record associated wit a particul r key in a particular storage.
- ihoiie operations such as rea s,, ntes, updates, deletions, and t lite * on data record associated wit a particul r key in a particular storage.
- ilia term 1 ⁇ 4oa ⁇ e s can refer to any collection of data ages org nized accor i g to. a particular dale structure.
- the storage can include collection of data ages ogansed in a tree- type ierarc y In iiictreach data page a node associated with other node data pages y corresp ndi g -edges.
- the edges that conned data pages can include pointers torn a rent data page to a child data age, in some examples, each daa ag , except for the reel page, can have at most one incoming pointer fr m a parent data page and one or more outgoing pointers Indicating child data pages.
- Each pointer can be ass cate with a key or rang ⁇ of keys.- ii?i Using fts ke , the transaction: cm find the. twt ⁇ * stoga m ⁇ in ⁇ V interface 27 arte NVRAfcf interlace 47, C m the root page, soph as volatile da page 354 or sna shot page 45-1 in the example ⁇ m, is found, tie keyi g core 25 n sear& tie data atiwtee type 121 for the data age t a $ «ci3 ⁇ 4d&s f e key, Thsstarch for the.
- each dat p ge , Inoiydlrg t! root data page s s can Include kftf polnfera that include iodications or adde ses of $ h sical loc ⁇ on of child pages.
- the oi ters in the pair of du pointers can also include hysic l .a3 ⁇ 4ms$es of the
- eerresponcing data pages in particular node 20 ccodingly it vo fti pointer m t e doai pointers can poiat to tie volatile data page 3S r sident
- one node 20 x such as nocte 03 ⁇ 4 white the s shot ointe can ' oftt t ⁇ corrs dng snapshot page 45
- another node 2 ⁇ ⁇ s «ch as node 20-3 fa&f$ Fie, 4 de ose an xam dual pointers 250 that can a# s ociated with a partl oJar H y and/or Included In a. data page i example soeriarios.
- Each du l pointer can Indii a value for a volatile pointer 251 andlor a value to the snapsfrot poiote 253, in one exaoipie. ; . i3 ⁇ 4otr» the volatile pointe 251 and the snapshot pointer 253 can ooth ⁇ mil Under such cireurnslan es, the DBMS 100 c n determine that the ne er a v&!aite dele page 3 ⁇ nor a snapshot page 4 ⁇ exi ts at Is associated with a particular key, Accordingly, the DBMS 100 can perform medity/add operate 410 to m or I stal a yolal data age ' 3 ⁇ that is asssclaisd with the k «#.
- the DBMS 00 oan update the voaile oi ter to indicate the physical location, ⁇ X ⁇ Qf ® ty Installed volatile data page 3S S 3 ⁇ 4 operation 420, if the transaction c a ges or modifies oatile data page 35, then the DBMS 100 can log the transactio to Install the eo responding snapshot paps, in operation 430.
- the DBMS 100 can store and maintain all data in a dat base in a transactional key- ⁇ atos data store with fixed size data ages with mkm tmMwii in VRAM 30 aod/or NVRA 40, in such
- a transactional kay ⁇ vai3 ⁇ 4sa data stoe according to ie resent disdosure can also include roost if not all metadata regarding ttie stucture and rg ni t of the data ase
- FIG, a illustrates one example imp!ama?3 ⁇ 4at» in which a version of the volatile data pages 35 can fee mi oed in fe stratified snapshot: 2?0, As d s ribed herein, the stratified snapshot can indode multiple l yers of onvolatile, or snapshot, data pages 45, f3 ⁇ 4073J ! « ⁇ sue** Implementations, the dual nature of the volatile data pages 35 in the VRAM 3 ⁇ 4 and S corresponding snapshot data pages 45 In NVRAM 40 bic nips salient and useful.
- a data a mn iadudea dual oiner 250 that can point to the physical iocaioo of other data pages, in one example, a dual pointer 2SD oan point to a pair of iogicaly equivalent data ages.
- a dual pointer 2SD oan point to a pair of iogicaly equivalent data ages.
- one of the pair Is In Vf3 ⁇ 4AM 30 and the other Is In NVRAM 40 00741 As desoriheo:
- pointer 250 can inciyde two associated pointers.
- One of the two pointers can iaoluda an address or oth imfatson of the ph ics! ' location of a volatile data page 35 In t e VRAM 30, and the other of the two pointers can include a addrsss or otter
- Each of the 4mi pointers 250 c n also include a status Indicator or otter metadata. Trie status imileatof and other metadaa it described In refers nee to fie specific ty es of data: str ⁇ ctes
- transacilop tha modifies tie latile data age 35 of fit pair dots not interfere will a process that ispdates the snapshot late page 45 of the pair. Similarly,; the process that .u dates the snapshot data page 45 does not attest tie cqiif sponPing agis ng volatile data page 35 ⁇ . Jim du lity and rnytel Independence of t e data pages all w- for higher degree of scalability tha oold cause so : fea3 ⁇ 4 and: hardware o Senoote in im- dala es.
- a key-value store of the present disclosure ears maintain the status and other metadata associated with the data ges ihoti a sepaate memory region for record Podies, mapping a fes, a centra! lock m nage, and the like.
- the data m i itm actual data g s can provide tor highly eceiaPle data management in whic contentious communications are restricted to data page level and the footprint of the contention is are proportional t the stee of the data In VRAM -30 and not In the sze of the dale In ie VRArVi 40.
- the transactional key- ⁇ m.- stom of tre present $s o$ura can m »yte dual pointer In t e
- VRAM m Ce.g, s t> to the root data page of the dat In the NV Afvl 40, This cao: Pa contrasted with l ⁇ m3 ⁇ 4m@f and !n-disk datapaaa management system that would need largo amoun of metadata stored In VRAM 30 to find and access the data in secondary persistent storage medium e.ct,, hanJ disks, fash memory, etc).
- nan be used to build m® mai tain m - n. databases with Ig!ht aig t OCC to osordipale concurrent traps pttos, Such a d tabas s fee built and maintain ⁇ by a corres ondingl tm iemeMtd atabase :mana.gement system or "DBMS" mat: tm respond to re uests to execute transactions on two sets of data pages that are lazily synced using jepicsl transaclsp logs.
- transaeiiof key-vafye store @f example DBMS 10S can store all data m fixed siz volatile dale pages.35 and sr&psftot data p -gas 45,.
- ail of tie volatile data pa s 3S & the snapsh t ais ag&s 4S Sao tm-4 KB data pages.
- QSif As descri ed !hanslR the volatile data pages 35m ' VR 30 cm represent the most recent versions of l s data in a database and tie nop- volatile, or snspstiei data pages 46
- In VR ff 40 can include eloneal snapshots of the data in the database.
- OB ⁇ S 100 can execute a ansiofion using a articular core 25 to. earfcrrn ⁇ peratioo or*, a data record, or tuple, associated with a particular ke .
- DBMS 100 To find tlie . ctata record as oaated with the key, the DBMS 100 n first Witt root a e of a particular target storage SOi associate with the key. Finding the root page of a targe!
- volatile data page 3$i is ft* root page of t e stor ge S0Q in VRAM S3 ⁇ 4,
- the mot page 3S-1 can bo associated with a range of keys that includes th# target key .of a particular transaplen.
- the roof volatile data pages can nclude dual ointer® 20, in various Impienieetetlorts, eac volatile daa page 35 can Include two outgoing: dual pointers 230.
- Eac one of the two aotgolng dual oints-is 250 can be associated with half of the range f keys associated with volatile dat page 35 that contains them, la the example shewn, the first half of the ke range of volatil data pegs 35M Is assooiatecl with a dual pointer i thai Includes a volatile pointer to ef lef volatile data page 35-2, The second half of the key ranga of volatile data ge 3 ⁇ 1 is associ ted with a. dual pointer 250 that includes a volatile pointer t3 ⁇ 4 child volatile data page 35* 2.
- Each one of the c ild volatile data pages 3S-2 and .3 ⁇ c n also inc e dual pointers £S0 to ⁇ hid pages,
- volatile dat age 3S-2 ear* Indude dual ointsf 250 that ints to a volatile data pa S mmm other nocte other than m®» 20-1.
- Volatile $ age 35*3 am Include a. dual pointer 250 thai Includes a volatile pointer 251 and a snapshot pointe 253., in the partic lar example shown, o e half of the key range associated with, the volatile data papa 3 ⁇ 3 is associated in a .dual paster 250 fiat; points to volaffe 4 ages thai contains the typ!e ass ci ted with the target key of fie transactTM.
- the first dual pointer 2S0 of . voiail data page 3 -3 can: also Include a contender to !Pe a « ps f page 45 that cor aim the tuple associated sth the target key,
- VoMIe data ge 3S-3 cart also include a second d «a! pointer 2S0 thai points to data pages associated with i3 ⁇ 4 mmnti half of lis ke rsi3 ⁇ 4& As S!h wh, iHes eo d dust pointer 25 ⁇ n includecte a *NUU * solati pointer 251 Indicat!rtg thai tf3 ⁇ 4# key does no mM In VRAM 3 ⁇ ..
- Rattier he sn shot pointer 253 ssidlcates thai key 1 ⁇ 4 found I snapshot cache ' 30 or In the atratfiad snapshot 27o ⁇ fn some exam les, tf e snapshot pointer 253 ear* Include a partition idantlfer and a pago identifier f at contains the key In IPs slratif!od snapshots 270 ⁇ e,g, f partition identifier *PO and snapshot page ⁇ 8 ⁇ 1
- the aiMpsho p ⁇ ntm 253 can poin to a copy of fha sn&pstiot.
- Intare anie Pl refers to the value or values associated ilii particular key 3 ⁇ 4 a k y-vatye pair
- each transaction la a3 ⁇ 4 eyi hy a particular core 25
- imptem naftons according th present dlsdtoaure use a tern of eonourrtoey control thai (km not require a centralized smcameiic contfolfe .
- DBMS 100 ⁇ m® a form of optimistic concurrency control that can in-pag looks during pnM ⁇ mrnlt or e mml phases of the trinsaegon
- implementators that use opirnistie ⁇ concu re cy control can greatly reduce the com utaio al ovepaid nd increase the scalability of va ious
- the mad-set 21 can Include the mni i wm m f
- Tips of tte hjples that a particular transaction wll access.
- anee a transaction finds a p3 ⁇ 4rf colar tu e associated .vsfth kev t the P BS 10 ca record the currant TIP associated t tfte tuple in a transctio specific tmd- mi 210, Tbe transactor* can then generate a new or updated teple tiiat wl fee associa d wif* a .key.
- the DBMS 100 can tha associte %m new or updated tuple with a fi TID to indicate Mi a Aai3 ⁇ 4e las bmn made to M tuple ⁇ uatee i ; 3 ⁇ 4 ⁇ K iiac ⁇ n *n a cone ⁇ KJ t wtw-w*t . ⁇ £ s 1..
- TIO3 ⁇ 4 c imiuti® a monotomcal increasing o& nier that In cates tiie vemjo of the tuple a d/or the transactors that tmi w
- DBMS 100 can verify i! a tuple associated with the k has not: hears altered b -i coney irenUraraa&fos since tre u le s rea4. The verification can include comparing the TID la e read-set 210 with the current TID ssociated m the tuple.. If the TID remains nchanged, the DB S 100 can assume that the tuple has not been chang d anoth r transaction since t e tuple was Initially read from the corresponding; dat pa ⁇ e. ifibe TID has c anjged, tie OEMS- 100 can infer that the tuple has een alter d.
- ⁇ ransa tor may only write-to ' scared mersrsor .
- tie comm hase ⁇ f t e tmn&acioi, which can occur aft r com leti n of the cam * prias ⁇ a! t!m trans ctors e ecui n, Baoause it s ars ba few to ft* mmk pl m af the transaction, iia write ⁇ ⁇ r 3 ⁇ 4e la the res! af t e transaction ca a ⁇ sliort, Ihus reducing t e chance of coatajilops writes.
- the DB S ' 100 locks ail records Irs tie volaite page 3i oefucted in the wflte ⁇ set 211 , t cars verify th ⁇ silus ; of . H ⁇ meemfe m the reset-set by s eckioi the jnwt . TIPs of th locked records after t3 ⁇ 4 epoch at the :frafsaotfo:fis Is inalteed. In soma
- IO01S0J if toe DS S 100 can verif ifta them has be n no c ang ⁇ to TID of toe oonaaponoilng reeonl in fia voiatiia data page 3S snco tha read-set was taken C , t eil that no other transactions have ch ged the TI0s since t ⁇ toBsponding res rd was rt d), ft®n It can cl ⁇ i r iine tnat i transseto Is sedslizafele.
- the DBS 100 oar?
- decentra&Eed logging can be based on ooars « ⁇ mined epochs to eliminate contenti us t&mmuf eattsrss.
- the DSyS 100 can ameliorate the Issue of afcprts resulting fmm changes to TiDa .that -cannot e wrM t?y use of i adl!e data sirycfyris 3 ⁇ 4slap Tr that Ineiydo echanism (e.g.,, moved or ch nged bts) d scibed is additional detail In eferent to figures a d operations esr»$ ndln ⁇ to iw particular dsta 3 ⁇ 4lry yr s.
- Som ii leioeoi lons of OCC can include niecftaplsnts for tracking s aiitf- 3 ⁇ 4p Pericfes B Cs ⁇ 3 ⁇ 4 m® ⁇ ®ttm conflicts ⁇ ,. or ⁇ x ropte, m one scenario, a tra s cti n: t1 can read a upl .torn the database, and a eo cyr pt ftfisasstton eau mm owr rtt fha vaiyt of the tu le mA ti.
- the DSMS car ?
- senafe&bilty ca ca be used m ot er aspects of the present disclosure to ac sv ⁇ ot er tepwerMts
- epochs can be used to pnovkfe dat base sna sh s that iong-!ivod rea onl w fMo can use to reduce a rts.
- This and oher epoch fcased mec anisms am described in additional dotal! haresn,
- volati d t : pages 35 can be stored In private log buffes 225 and/or figs s aoie to asoh nocte 20 » SoC, «« 26,
- various ir « l ⁇ o «iat ns s arao ®w construction of t s srafiftei snaps ot 270 from tte execution of tro transactions
- tie stratified sna shot 2715 can be distributed among the oorea 2S and/or the nodes 20.
- S eh- m $ a m include oistff&utsd logging, ma ing, an reduce to ® s3 ⁇ 4 iitica% glean and: organize the many con rrent transactions axeeyted y the man ocessing sores 2S on the volatile data pages 3S to e sure sariaiteaoiltly of the.
- Each epoch og file 207 csn -corespo d to 3 particular epoch
- the epochs can be uniformly c an across nodes 20 such that each feg writer 26 ⁇ can generate an e och log file 2 ⁇ ? for each epoch such, thai the start times .and/or t e sto times era consst nt a mes all epoch l g ties 26?..
- the DBMS 10 ⁇ ceo oreafe o Install voiaie date page 36 in VRA 30 based on the latest snapshot date page 4S ⁇ n NVRAM 40, Hwmm, $m mn violate sarialzaolt her3 ⁇ 4 other coRcufrent ra sacton ave already read the mrm sn shot data page 45>.
- the pointer->3 ⁇ 4ot 212 can e desalted as totorj analogous 1» a node-sot dat page version ml m mm® In- memory DIMS).
- the pomtaNMt 212 saws a different pyipoie.
- snapshot data page Isalfer pools are allocated locally in indi idual nodea 20, in som examples, nodes 20 can access the volatile data an huffe ols in ether aodes 20, However, sn pshot data age eso! or cac e 130 can be restricted to allow only the local SoQ aocesa to mnimize rem te-nod c asses.
- PH1S Because snapshot data pages 46 m l M t the snapshot data page cache 130 n include several properties that di lrsgyish it fi3 ⁇ 4ci after buffer pools.
- Strstlied snapshots 270 can ce used in various example IfnplOinientaiPns to and itpr ge efflciendes In the organisation of data stared i N ⁇ i3 ⁇ 4W & in partlcyfaf, strstifif snapshots 270 can be used to stem to and mtslwe data records f orft snapshot data pages 4 ⁇ stored In NVR 4 with reduced computational oveme d by avodpi co plex searches, reads
- the snapabot data pages 45 In Ili alratifled snapshots 270 are creeled or te log gleaner described herein. To vod the computational esource ex e se associated wfc generating a ne Image of the entire database h n fte snapshot data ges 45 are updated, the log gleaner can replace onl the modified parts of the database For ex m le, to chang- a a rec d im a parloiar snapshe data 4S, the og gleaner process m y inser a new data page that include the new version of the record.
- DB S 100 can cooibio multiple snaps ots o form a stm!iiad sna shot As described heren, newer
- E c snapshot cap include a com lete path t roug tie hierarc y of data p ges for every record In every epoch up to the time of the sna shot
- the root data age of a modiarj storage is always Included in the sna s ot
- he o l c ge from the privsous sna s ot is a change to one pointer tha points to a lower level data pa ⁇ e In t e hierarchy of snapshot data pages 4 ⁇ T e oi t s In l was l vels of the snapshot i t to the previous
- the tog gleane process ⁇ an include coordinated op rations perforterrorism by many c re in m y nodes 20,
- eac node 20 can geneate the epoch tog its 267 White only three nodes 20 are shown, operations of these thrsf ⁇ nodes 20 are illustrative of lit ir$ar ⁇ fi ⁇ de iog.gtea processes 110 th t Inolydo many more feocfes ,20., i S123 ⁇ 4i Once the epoch log Hies 267 are generated and stored in the
- MVRA 40» th next st ge o og glean r process 11 can include funning m p er 111 and reducer 1 S rocess s. As shown In FIG., 68,. the waft* pnscess 111 . can be efomed in each one of the nodes 20. Insuc
- the m er rocess 111 can roa i s from log fifes 267 as ociated wife a particular # ⁇ .
- the eper process 1 1 can read all of the tog entries for a s ecie period of time f ,g> f th « last 0 seconds).
- T e tmpp&t process 11 mn m se arate th log entries into buckets 273.
- Each bucket 273 c n contain a log entiles for s !
- the reducer process 113 can sort and partition the log entries in the. bucket based on the bound y keys for the storage determined fey the map e i l l Tre reducer process 113 can sand the artitioned log entries to line partitions 271 of the partitioned stratified sna shot 270 per bucket fbul24
- the ma per rocess s 111 ca « send meat Jog enides to a: reducer 13 an t e s me nocte 20. ⁇ n s ch Implementations, the -mapper 111 ca send the l ⁇ enties to the reducer' uffer IS.
- the mapper rocess 111 can then copy the enire bueke! 273 Into the t®m sp&e&ln.a single wile operation. Using a singl write operation ID oopy all the fb ⁇ entries n fie buffer its can be more efficient than
- multiple mappers 111 can copy buckets 273 of multiple log ttim to corresponding uffers S
- multiple mappers 111 can copy buckets 273 of multiple log ttim to corresponding uffers S
- e,g, :s v ⁇ ® tmp 11 can eopy log entries to % same feyff@f 273 co ftyrrentiv Su h ⁇ oroeesses ca Inw v® wfofm ce of writes In a local node 20 and in remote node 20 baeaisse etieh copying em foe one of the most resource intend operations i OBMB operations.
- the mapper 11.1 can ata oali rnp3 ⁇ 4lify ' the. state of feoto s buffer US to
- the ma er 11 can change a flag i3 ⁇ 4t to indicate thai a cop to tie resered buffer space has been populated, tWiZQ ⁇ -Once the log entries art placed n the appo riate log reducer buffer 115 " , the ' e reducer 113 can construe! snapshot data pages 45 in batches*
- a reducer can maintain two ufes.
- a mapper 1 3 can write to the current teb buffer IS «ntil it is full, as descri e** above.
- the reducer 113 can then wait until a! mappers ill complete thair c - rocesses *
- the restee can dum the log entries in the prevtous batof buffer to a file. Btfora dumping the leg ntrfee into tee iio. f the reducer can sort the lop entries by storages, ays, .and sefi featiqo ordw epocii order and frppoch odinals, The sortedi log enries are also referred to as 3 ⁇ 4ortedi ⁇ ijos,
- educe * is term used: herein to refer to a family of h3 ⁇ 4har»or3 ⁇ 4er fu ctions that analyze a recursive data structure and moomhl e tftroug use of a gvan popi lppfl ini n the results of ecursively praoeesipg Its constituent parts, 0u3 ⁇ 4an ⁇ up a return value, A reducer prooes s, or a rtdtwr, called fey cwelolog a ionetion, a lop node of a data atr uctens, an poesf hiy some default values to he used under certain condtions, The reducer can then combine elem nts of the data structure's hierarchy, using foe fono!lon in a systematic way, #13iJ PIO, 8C deplete visual represeni to3 ⁇ 4 of how Hi nods specific
- ointers can include the physical address In the VRAM 30 or HViRA 40 i local and mtrn nodes 20,
- Pa rii oping es! be effecltve when the query bad matches trie partitioning cores 25 access partitions of the stiaifiei snapslat ' 27Q resident m the same node 20),
- snapshot dials ges 45 can ⁇ M " ⁇ 3 ⁇ 4 complete new v rsion of the Key-value store or database. Instead, Hit DBMS n nmkrn cfeogss nl to snapifot data pages 4S t records or oint rs that ore char ed by corresponding transections the volatile doe pages 36. As stidi, the sna shot 270. in the N A 40 can m represented ay a composite, or stratified compilation, of snapshot pages 4S in oien the. changes to the nonvolatile data can fee represented b changes to the 4ml ointers 2S0 and their corres onding feeys,
- FIG.. ?A s a flowchart of a method ?00 for executing transaction aeeordmo, to various iifn leterrorism!attes of the rese t giseteeure.
- the transaction equest e b® receive from a oser :t syc3 ⁇ 4 as a client coffi yfingf device, a client a pii atfeii, an SM msi tiansaotioo.: or other operation performed y the OBfv!S 100.
- Such transaction requests ca Include Information r ⁇ ardin ⁇ the data on which the t tM should o eate, for example, th trihiactte request can i prise m mp key corresponding to a artfcyisr fypie, in related Im le it t iofis, tie transaction re uester induce an identifier associated with a particular storage,
- the DBMS 100 ears assign the e ecution of the ranseotlon to a ppttatei processor core 25, in suoh im ems tatiOR ,; the selection of a articular core 2S can be based m
- the DBMS 100 can d t mne- a root data page associated itf3 ⁇ 4 the I put key. o determine the nspt data age, the D : 8 S 1 -00 can refer to a meadat fle thai includes a pointers to the root ages of iwifi te storages. Tte met ata life c n ha sr3 ⁇ 4 ni8 €f If ka ⁇ loa ranges * sioraga Idaaifiers, or the Ilka..
- Tilt snapshot p W#r .2S3. «an include a hyscal address of a sna s ot page 4$ In MV A I 40 or a ⁇ OLL" value.
- Ilia DBM 100 can determine ⁇ alt of eol ti ⁇ volatile pointer 251 la NULL, if t e volatile pointer 251 Is NUU then tha
- the O US 100 can follow te snapshot painter 253 to the earrasp nding snapshot page 4 ⁇ in NV M 40 s at Pox 711.
- the DBMS 00 can copy the snapshot page 45 to install a orres onding documentita data page 35 In V I ⁇ 30, To tack the locate; of the newly Ins!aiiacJ volatte page 35, the DBMS I OCS an add the physical address In VRAM 30 to a pointer-set s ecific to tha tra asctes,: at hex 7 S, Toe pointer-eel can fee used for varifloaisa of tfte typia in th# volatile data page 36 clyring a pie-eonmf p asa of the transaction and adort l:h traasacllon If there has oaan change to the tuple.
- t e DBMS can generate: a read sat for tha tuple associated with tha Input Hey, at box 71 , At described herein, the read sat cap iPctede a version norr * sash as a TfD, that tna OSI ⁇ S 1.Q0 can use to verity the partlcalar versfea of the tuple.
- tha read sat can also loelada tha actual tuple associated with tha in ut key, M 3S1 Sasad on tha typle ⁇ aodor other data, aeaooated wil the in lay.
- the DBMS 100 can generate a rtle-sei at to 2 Fo example * t 3 ⁇ 4 tha tuple and a new TtO, Tha h£a ⁇ eei can ha tha result of a iransactlan that, Includes operations that change the tuple associated wih tha ay-value In same way; m isox 723, fe m s 100 am begin a preasmmft phase in which -fau can lock t e .volatile age 3 andcom rs t e readme! to trio TIO ar*d3 ⁇ 4>r tuple In the volatile data p ge 35.
- the DBMS 100 can ana3 ⁇ 43 ⁇ 4e tie oom hso oiW m i- i to the mni i ⁇ f ilm t le to ftiernitne if there tee any c anges to t e tu le. If (hem ham be r ohang&s to the tuple, then 08 US 100 c n abort t wttmi transaction and
- leg entry can include Intoftoaiion regarding i s original transaction requ st, the originat input k «y, and soy other information perinant to the exec tion of the transaction, in same
- generating the tog entry can include pushing the log entry into a oora s ed prl a log puffe 25.
- the !o ⁇ « try n remafe m the e re s aeie private log buffer- 22S until is ptocmmi by tho lag writer 265, $142J PIG..7B Is a flowchart ef a metf*od 701 for processing lag entries from multiple cores 2S in mytipfe nodes 20 to generate a partitioned stratiiecf sna shot 270 ttetf 701 ⁇ sm oaglo at box 702, In hich toe DBMS 00 cm f O: i.fan3 ⁇ 4>acdOsi log prun s- co r sponding to Mnsactioos ⁇ rs oats .
- the DB S 100 can ma the log entries from the log lias 287 into buckets or euftore 273 aocerding to key ranges -or storage Identifiers,.
- mapping toe log e tries from to log ilea • 20? into the haslets 273 can. &e performed in a distributed mapper process 1 1 &1 1 At hex ?Q6 S the DBMS 100 can perillon the log entries In the tjuake!s 27 3 ⁇ 4 according to arious oroanijetion i methods
- ila partitions cap fee deter ined bisect on time eriod or epoch.
- t rough 706 can a i peatad to ro ess addfertai leg entries corresponding to irapsa i rif subsequently executed y the DBMS 100. the log enlries.
- the DB S 100 pan copy the partitioned fog entries into the o «-es ondng batch Duffers 11 ⁇ , at ox 70S.
- the partitions of tog m can fee hatch sorted to g er t e single file of sorted log entries.
- the DBMS 100 can generate a new nonvolatile pages S &aseci on the lie ot sorted !o ⁇ entrits m t NVRAM 40»
- Etch of the ne nonvolatile data pages 45 can have a ⁇ Sifespcndirig physical address in trte.
- the DBMS 1.00 c . generate new ointers to the hy ical addresses of the nof olatile data pages .45,
- the new intes can replace the old pointers m the ousting $ nonvolatile data pages 4S, I m, pointers that use to point to old nsnvolaia data pages 45 h u date to paint to . the new on olatile date pages 45.
- Bo es 70S throug 714 can be re eaed as m m log entries art partltotd into the ucket 273,
- various implementations of the present disclosure can include a re d- nly s apshot cache 30, Oris example-snapshot oacoe 30 can include a scalable lirjf iwalght and hyffef pool tor rea3 ⁇ 4 *nly sna shot data pages 45 tor yse in transaction kay-vaStia store in myll-prosessor ooir umg systems with h rid VRAM 3KNVRA 40 storage.
- the snapshot cache 30 can induOs a bufer pool, l « $%m % buffer o ! n m M functionality to ti mm 100 in wttieh it us®d ⁇ or o ⁇ a pfc, a Ouffer pool can be usee to cache t e data secondar st rage data pag s to avoid inpyt/oytpyt access tolhe secondary memo ( ⁇ , ⁇ Si ⁇ n 40), and m increase erformance tad i M of fee system, gOM SH
- tt snapshot cache 130 c include a hash table 812, te i « sfi pshotcach ⁇ 130 rec !v&se £oad «ly aos&dto 810, it pan convert ins fey ioeiydoc m the transaction to a nasi* tag tn the hash table 8
- the snapshot page 815 con he amwMwi with a counter
- Th mtmX B20 can be fncmnmntad or decmmenlBd alter some period ' of time or mm&0 r of transacti ns.
- the sn shot page 815 can he e)eo3 ⁇ 4d froro the snapshot cache 130.
- snapshot pages: 815 that oavs not reconiy tse n uso can ' e ejected from the snapshot each® 130 to make room for other snapshot pages 81 S. :
- the snaps ot cache 130 can determine wttether a copy of the sna shot cache bm $ on iho ash ttis 812 Jf t e soa shot age SIS associated with a partoiar ke -exist in the snapshot cache 13 , than tuples torn the soi-pshof ago S S -can be CfOioJy read.
- sn ps ot pages BIS can te used as he cachejlnes, Wh n a cache fee is copied from fWRAU 40 Into tie snapshot et® 130, a cache entr can he created.
- T e cac e entry can include the snapshot d is page ⁇ 15 as «II as requested wmm$ location the H sh tag),
- a caetia miss has purred.
- tm ms n n mmedi tel mads the data, i the cache !ne.
- the snapsho cache can alioeafe new eofry and copies
- t e appropriate snapshot data ge 81 ⁇ from the US?W*M 40 Tim transaction 810 c then he com l ted using t e contents of the snapshot c c e I SO,
- ⁇ 001 S4 Exam l hash tables can include a hopscotch hashlhj sc e e.
- Hopscotch hashing If a scheme for resolving hash collisions of m of hash functions taote usi g open addressing and rs well suited for Irnple enlng a concurrent hash ladle, Th term opseotch hashing" s descriptive of the aaqu iic of hops that ehamcterlm the scheme s d to insert val es Into the hash tshlSi, in some ex les, the hashing uses a single at ra of » tiet ⁇ sts.
- the snapshot eachs 130 c n exploit the Iramotabllitypftba snapahot dala ages -45. Belays® the snapshot: data ages 45 and the corts ondli ⁇ data pa ⁇ as BIS m the snapshot cache 130 are wfHe-one and raad-oany, the snapshot eaeha 130 need not handle dirty data pages. Avoiding the neecl to handle dirty data pages allows for the operation of the snapshot cache ISO to he simple a d fast.
- the snapshot cache 130 is tolerant of various anomalies that could cause sehous
- the keys of the tosh table 812 can include e data paga m ⁇ ⁇ sn pshot ID p ⁇ m at age offset) and offsets In memory pool.
- t i2J T e hash table of FIG,. can be a hopscotch hash: fable, as gasoi&ed afeove,, fiat uses cae a fines.
- Searches of the mh M® aaardiag lo ma present ti ckmm il use a s1a3 ⁇ 4te oaefe li read even when the snapshot c oht tm$ m&A mh? mi The .
- h sfiifig can he avoided in venous Im leme t tions of ttie present sdos3 ⁇ 4a
- saplanientatiens do not fake any loo s, instead, onl a small noro er of ( ⁇ one) of atomic Dp ailDai can e used for i serts and pa e are ecess y for uahm in one implaaiaaiaifor, read-onl transactions can only sat memor fences.
- the snapshot cache 130 is wait-free and tosk rat, swh thai It can scale to a mui ⁇ roce s r s &rri 1 with l fe to m degradation of peribnisaoce. Tnis- can improe the simplicity and s eed of the other ulfer ooi sefiernes,
- FIG- m a fWsat of a method 800 for executing a trer&apf rt using; a snapshot cac e 130.
- ethod 800 can egin at & x ⁇ 01 , in hleft the mms i c Initiate s iwsastio Atifetermirtafers SOS, ib& DSNS 100 can teten irse wheh r transaction is a majoity tan actor!.
- m tie DSm 100 can Hrtcf m root page associated wit* fit key of ft tansacto nd Mm tfw «IM3 ⁇ 4I pointers.250 to 1M t t target tu le, at box 80S, At this o t m DBMS 100 can execofe the transactos osi g various o!i pi®mmi&®$m$ ot tfta esent disclosure.
- the DBm 100 determines the e does not exist in the snapshot cache 30 s t en It can install copy of the sna shot egs 45 associated with t e key io the snapstat s t 130 5 and ox 809, Installing the espy of t e snapshot p ge 45 into the sifta s ot cache 130 san include aecesslhQ the snapshot peps 270 to retrieve a c y of $ snapshot age 46 a a associate it win a hash value ⁇ ae d on th$ ke ,
- the DB S 10 can set or reset a counter in the snapshot data ge 45 o indicate a recent access of the snapshot data page, for exam le, the counter cart include setting art Integer l of a. maximum numb r of sna shot age cac 130 aiCc ss e of a expitaison im . Aecerdingr ⁇ the eoyntef can im m m or dacra ienfad according to the number of tiiT58s the sna s ot cache 1.30 is accessed or ased on sornii duraionof ifria.
- tt mm 100 can ir*cr#mtMthec0Ufiief for snapshot data pa ⁇ a S stoe In the snapshot -cache 130»
- the counter cm b® i cremente henever the snapshot cac e 30 Is ⁇ ⁇ accessed or pas o?: a running clock.
- DBMS SO can incmrnerit a counter lor other snapshot data pages 45 In t e snapshot cache 130, At b x 87, tre DBMS ® ⁇ snapshot pages 45 frorn the cash with counters that aw e ired or mas d a threshold value te,g , f re cted m a decrementing counter or a predetermined value In an IricrepienSng eounterf.
- box 801 can pa n regardless of where DBMS 100 is In the prass of implementing the aefe sl bmm $0331?..
- examples of the i3 ⁇ 4aant dsclosure can use various sdfsga t pes, afso.fofofftd ta tm daa str stum 0» particular data siarctura, referred to hsrtin m * m®®m ⁇ * t e data structure c n e useful i scen rios In ie com lex Iransacfen® ar desired.
- master ⁇ tre ⁇ Is a portmanteau of the -terms *m$ tree" and "fo iB- m * .
- the mastertat dais structure 123 that oa « InsMe .a .sm le and h* ⁇ » aiferm n €e OCC for in systems sitni!ar to s tern 1CL aser* 3 ⁇ 4r e- can. ai3 ⁇ 4*e f ⁇ wie 3 ⁇ 4 ⁇ ? ⁇ itwaiMo&a 3 ⁇ 4o &ins y ⁇ c ⁇ sou c a «oi « ⁇ rady «e atKsrfs/refeies , Tt3 ⁇ 4 mssteNree dat structure 123 can alto 1st tmfui fm mm .
- the ?na fif ⁇ e data tucture 23 is a tree type data stwc&re wifr? characte asi s dd featurts 3 ⁇ 43 ⁇ 4at ⁇ m effSefc nfly .support various older aspects of the present disclosure Including, hut not !lmled to, NVRAM 40 resident sna shot data ges 45 ar*d OCC,
- Ida master-tree 23 c n support ke range accesses, ase e 1.23 can alee include- strong Invariants to sim lify S» OCC protocols des lted :hai3 ⁇ 4lo an reduce adorts ami r taes, eete ⁇ tre deta atfucunsi 3 can ⁇ Mm Include mmnmmm& for- efficient snapshot etch® 30
- 1001741 a ⁇ feftfee typ data stec y ras can Include a m m where each layer Is a
- Incoim g pointers may -cause issues it ooncufiiecy een ot Master-tree data structures c n ffl siicr* issues using fester-cril!d ty e data page s te.
- i serting a ne roe-orci can Include exec «t3 ⁇ 4i a s s m transaction that physically inserts a logically deotsd record of the ke with swlicfen! ody length and user i mmtim that ioglcaiy flips ths deleted data . age and instals t e record It levari* noting that system f aesad&ns are useful when used with logical logging, not physiological logging. Because .a s stem transaction dots not ng logic lly, it does no!
- P0177J mplementaions of the present discosure ce « include light eig t I - age sisisfabie concurrency control
- databases that use dynamic tree data stfuetyres o.g., maste ⁇ trees, B4ra#s, te. in which the size of data pages Is ynltarm (e,g,, 8KB), and t e data pages can be evicted from VR 30,
- tha TiDs of all records in the child ' 060* " 2 can fee marked as * ttm®f and tm foster chl ren, or loate ⁇ twi ",. data pages can be.
- created FpsteM ins can inelude a minor (or left) foster, chid ⁇ 5®»3 ⁇ a d major frlphf fester chid 950*4, Tha mi or foster e ilcl ⁇ 5D» can Ipolyde the first half .of toys after tha spit (e 3 ⁇ 4 g, S: 1 to $), while the tm&r foster c id 960*4.
- tha old child data page 960-2 can t?e maked a * mcmt f which in icates that the old child dsti page 950-2 ia not available for suhsec ent modifications.
- marking the old child data page 60-2 as m $ cm Include salting m m- s M to W, During t e next traversal :of the data sirycfem, th « arent data a 9SQ-i of i old, or *mew f ⁇ pag 950 » 2 so fnd the new feti H irs ae page ⁇ 0-3 m 9S0»4 feased Oil: g* ne ponts 93S-1 and 935-2 in the old child data p ge SSIKL The parent data page 950 can then adopt the ajor foster chid 850-4..
- the paren data page 950-1 adopt: the rnalor foster chid 960-4, the 0 8S can to the pointer 2 ⁇ 1.
- This cam Include m ® P®M*m S45--1 and 945-2 In the i:r#nt iSO-1 ointng to the mrm physical location of mino foster child S®-3 and major foster chid » that pointers 935-1 nd 3 « did.
- the ointer 925-1 torn the are t $3 ⁇ 4M to the od child 950-2 can t®.
- phy sic iiy or logically deleted ' torn tie parent 93 ⁇ 4-1 ,
- the nias£ ⁇ r-treefype data s!rocture 123 can be limited to o e i comin ointer er daa age 950, thus m can oe «o reference to the retired data ges m child 950*2) exce t fom: concyrrert transactions,, During t &t p - mmli wffy phases ⁇ 35 of any concyrren traneactlcns, th WM$ 100 can note the "mo ed * Indication In the records and track the re-located records in the fost nniinor or fester* oiafor children 9S0-3 and 950*4..
- stmetyes can mm** fhait at every snapshot data age 4 ⁇ lias a stable k y- a ge for Its enire life, R gardl ss of splits, mom®, or retirement, a snapshot data page 4 ⁇ can oe a va!d ata pa p lng to precisely the mm set of records via fesfer- ns.
- T us even I soncorfent transacti ns moved o mm retired data pages, It is not necessary to retry- from te root of the oe as is te eas so ass tree d foster 8-tree type csts sructurs,
- the system can search the tree 3 ⁇ 43 ⁇ 4 simply reading a data ' page pointer, and !ofowins it without olacJng memory fesnees *
- the DBMS 100 can just cheek the key-range * w c mn toe Immetaole m ta ata corresponding to the data page, and locally retry In Ilia data oago if It does net match.
- FIG;. SB s a fl chart of a method SOP for Iniorting.
- Ip seme scen ios, % fixed s3 ⁇ 4e feel data page may be too full to as ommod t ⁇ %m insertion of a new e and ass ciat d tupla,
- the mm 100 can co y the tuples associated win the second kay sobrangs to another e fxed si3 ⁇ 4e leaf data page, or 3 ⁇ 4ajo foster Mn * .
- the second ne fix d iml dat3 ⁇ 4 ge can then be associated with the second of tbe key subranges,
- Blpping- the mo ad-bif can include wf ting an appropriate bit to the eid fixed sfe leaf data page, instating pointers to the now fixed size ieaf data pages can isickid writing the address of each of the new ted si ed the data pages or other indication of the ph sical -location m
- the onters cm also be assocated with th3 ⁇ 4 fce subranges of the two new fixed sfee leaf data pages.
- t e psimtm to Urn- mm m$ mm leaf pa s can 0e addod to fh pmm ' data p of tho old fixed tesf -data p ge and associated ilii tie corresponding! key subra ges.
- * th data structure can include a sahaJIzable hash Index that Is scalable for use in mutiprocessor ystems with £*g» RA 30 sod hype NVRAM 40 arrays com iling svstom 10),
- the hash ndex data atruotyro sen ho ysed to orfatto tho boifs volatile dita paga3 ⁇ 4 OQ sf3 ⁇ 43 smapso t crata papeis , * ⁇ ⁇ t>ome s ipi ⁇ n& * t)o $ ⁇ tne na&n Index can allows se ot different lm: 3 ⁇ 4meniiailans of OCC.
- the oxampio hash Jndax 1000 can be to te form of a .iree-lypa data structure sfiiual pointer 250s h VRAM 30,
- imh inctex 1000 oan indude a fixed size n mfeB of layers or levels. While mfOmnoo It ma e to volatile pages 3S to illustrate v rto aspocta of th* senailzabte tosh Index 1000, it should 3 ⁇ 4e mm fi3 ⁇ 4at the hash I dex can also oo viewed from the perspective of sna s ot data pages 45 In the VRW 40, The dpal pointers 2S described herein can p ⁇ W to data pages In either the VRAM 30 or NVRAM 40, as described heralm
- the hat values can be based on the Input tity Included In a transaction or transaction re uest P32I01 trvse s ex mples, ⁇ i root pigs 35-1 and/or the -node ages tmy only Include the dual onters 250 that uMmately.le3 ⁇ 4d to the leaf pages, in such m temsr3 ⁇ 4»tens :s the feat pages, such m f 38»7 S 3S-8, 3 ⁇ 4 and 35»
- I D can Include the ata ' ( ⁇ - * u s ve!ti#s s or data recefds) ass ciated wth t e fcsy ⁇ n t e has value., Accordingly, it may ' be unn c ssary for the leaf a ⁇ es to include dual ointers 2S0 bsoause they may
- a variable nambe r of u er-lewl daa p ges 130 can be pinned, or declared that they al ays exist as volatile data agea 35 in VRAM 30.
- Aocoidintfy all of the dual est rs 2S0 in the higher le el volatile daa ag s. m 03 ess t immm &u to the level n le l mm md loss.
- s sucft, me higher le el data pages 130 can be installed: In the VRAM 30 of each nods ' 20 In the system.
- Acc rdingly, data pases In the yp er level 1030 can th s be used a® sna s ot cache 130.
- WZmi ⁇ 10B Illustrates an ex m le data flow 1001 for u ing iie seha&abie h sh n ex W, Whan a sore mnitiates a tra sactio t.OOS. It ca include indications of an operation and a koy ojme en i g: to the data or* which e- o emioo should act..
- a bas 3 ⁇ 4 coda? can generta a hash value aedtor t3 ⁇ 4 v lue ased on the toy.
- Hie mm 25 can then execute the tohsastot 1015 that includes the tosy, the hash value, a d the fig valum.
- 00201 o execute the Reacti n 1015, ti sehafeahle hae index ⁇ sm be searched aecoftilni o the hash value.
- the search for the key esisted In tis ectlon 101S can txeouta hy foliowieo, tte hash path 1020 through dual pointers 250 lt volatile ages and 3 2 fiat point to volatile age 35 (or Its equivalent n iie snapshot data pages 45 ⁇ that contains the fcasis bucket In which as alue * is contained, imz Each leaf data age: to whch tt deal pointers 280 point c n
- the eaf page 3S ⁇ 4 can Wtw3® a tag bitmap 1Q2S that can . ost® a probability that the ke & located In the volatile daa age 35 :.
- tha dual pointer 2 ⁇ 0 in leaf votaila age 35*4- c n also include a s apshot pointer that points to the snapshot data age 454. Similar to the ccnlpfatlofi descrfhid the kay can f «nd (or not fm ti) mm® the lag bitmap 102S im$ keys In the sn3 ⁇ 4 fcot data 3 ⁇ 4 45-4..As above Hi® leaf sn shot data page 4S (e.g, s ⁇ - ⁇ ® ⁇ £ ⁇ data pa ⁇ o cn expanded Oy adding Ink ointers 1050 that olfit t Inked soaps i data page® 5*7.
- th s stem can arfcmi a singte eomp «* «!»$ 3 ⁇ 4 (CAS) operation
- CAS CAS
- the DBMS 100 sstem can ead the newly Inserted rtcoid win spinioeks .ort TID (am! it Is marked valid ⁇ . If the inserted key is oof same s the k . Ilia sysem can try again .
- iha sstem can stars the ke and tag a nd hen set TID to tie system transaction TID with valid and dieted fla .
- E ocuto of user transaction cart then try to flip the delated flap a d fill i the paylaad of e data record associated with the key usig a commit protocol,
- CO02S 3 o delete an existing ke
- the system can simply find the data record and logically delete I? yslog the commit protocol, in some
- Implementations * logically deleting a data record can include simply Inserting or f!ippihn a a3 ⁇ 4ialad il ⁇ :.
- IOC is a flowchart of a method i 002 tor using a s»at3 ⁇ 4*la hash irKfax for execoilng a transaction m muitoons compyting system 10 accoding to various example Implementations of the present disclosure
- Met od 1002 can begin at box 10® in which tie DBMS n generate a tag and the hash value oasad on an ipput key of an associated transaction.
- Generating tft® ta ⁇ and !te has vate can include @*® ⁇ 3 ⁇ 4 ⁇ & lag ernios routiaa -. &ar executing a hash km generating reti ,
- DBMS 100 can h ges in a storage lor data p%®& ssociated with the hasp value, in m example im lementatio , searching the data papas ia t e storage ca « include traversing, th
- mms csn include probability sc «s that il Hay en which th3 ⁇ 4 lag is baaed might fee tpand in he data page.
- the DBMS 100 can €9mp re t bitmap prob bilit to d t rmine hethe the key prosahtv exists In the data page If $® b ilt indicated m the ta3 ⁇ 4 bitmap 102 ndicates m probability, then the DB S 1 0 can determi thai- the key does riot exis In t e data g associat d wild the hash al e, t box 1070,
- impianmntaiona of the sent disclo-sura can ppjsftfveJv d ⁇ fermme that the ke does hoi exist in the storaae.
- the bteap prohaMity is geater than zero tha the key exists la the data ge, tsen th D8&IS 100 ears search the. data pa s associated ita the hash value fey the input key to tied the t rget tuple:.
- de m B 100 can determine whether th ke associated with the tap and/or tt hash to is found ia data cape, at determination 1080.
- D MS 100 can deterrnine that the input, key exists in me data papa associated with, than the DWS 100 can access the triple associated w th input key in the data age, at box 1085, p3222
- Hottever, c systems usually also aas tna general ccesses, seph as read via secondary index. As a resolt their scalability s Iniied In niutti-cora environrnents ike co iling system 1 ,
- snapshot data pages 4S) In addla most a If not all, eoptep ⁇ datafeaa m nageme system are pel o tlmfeed far epooh-feased OCC w
- c n include a hea data stmctyrp that can maintain a ifiiaad-ocal ( ⁇ 3 ⁇ 43 ⁇ 4 node local) singly linked list of volatile data ages 3i fer eac thread fe.g. t ea3 ⁇ 4ii core Beginning with a start or head data paae in the linked 1st, eesh data page i the linked list can Wads a pointer is th® tosatiop el the nsxt ' c&ts page in the finfotf M.
- m tni temantatlens can mM when logging targe -amounts of sa entiai dat , such as lodgi g electronic key sard se re acc ss door entries
- FIG. 11 A illustrates exam of he heap date structure DO that cm Include multiple Inked lists 1 01 of volatile data pages 31,.
- the heap date structure 1100 can include one linked fist 1101 lor eacht sofe.2S > Tha beginning of the each linked 1st 1101 is obsignated fey a start pointer 11DS Inserted Into a velatiis data papa 3S in the list.
- the start pointer i 105 sm m m4 to limit, the amount, of s ace us d m V;RA d m portions of the ftoked list 1101 are Pck d to RA 40 during ana sinom.
- Each core 25 can append pew key-value pairs ⁇ e.g., data records or tuples) to the and of the !ipked Hat 11 1 of pages 35 without ad!raMns the m&e linked 1st in $ - mm te ⁇ m, new data fseords cm added io the as data age 1103.
- pew key-value pairs ⁇ e.g., data records or tuples
- Adding last data page 1103 can include moving m end pointer 1 4 tor the previous last page 1102 to the mw fca* page 1 0$, Dye to the inherent serial order ⁇ ftl3 ⁇ 4e h a data stricture 1100, it la well ® ⁇ fe se ti g log entries and log lea corr s o ding to transactions eform d m votaila data pages
- FIG.11 S3 liyatratoa en exarao!e of toe local Iocs entries feam t&h loo tile o!ae3 ⁇ 4d seoy nflailv info Itokad lists 1107 sna shot data pagaa 45, After eao snapshot is taken, new mot ointers 1 21 can he added to a metadata file 120 that point: to a head snaps ot data ages 45 of a corresponding linked list 1 07. II the metadata file 1120 gets filled, additional overftew metadata files 1121 can ha added toy Installing a pointer $3 the m adata fie 120 or a preceding ovefle
- o root page pointers 112$ ceo include a linked list of .pointers tha i include the original .metadata lie 120 and additional oersow metadata ilea 1121
- the deleted pointers 1130 In FIG.11 B allows tor deleted ages 11 0 of linked ifcis 11 QJ w 1107-11 to te r claimed,
- Sna shots of the heap data structure 100 can be road vtiftoutaoy synchfonlaalon.
- the,s3 ⁇ 43 ⁇ 4e£uf& i provides ® mt f control for volatile data pages S3 ⁇ 4 ⁇
- FIG> 1 C depicts a scanning frap aclten 1111 tor mw *» date
- snapshot stoage thai ys s a eap data stniduna, according to various embodime ts of the esent dtsoiospre.
- the scanning m 1111 i « fertsfeabSe Isolation 3 ⁇ 4wl cap a t ble look at the beginning of the t $ sc n.
- the tao ctlon can wat until si other theads have actoowledged the table lock or enter andle state.
- T e table lock tics prevents other transactions wopld appeed mtm :rpcorrj3 ⁇ 4 to !lif heap strociyra.
- the scanning transactions 11 1 can the , read all records In the volatile data ⁇ os 35 t releases the table lock, and raoords the ddress of te iaat volatile data page 35 and TID for the next record ⁇ $ f the address el which th ⁇ TID tor next record will be placed), which can be verified at m-oommi phase.
- a scanning tranaaclon In can also he perfdrm ⁇ d n the s a shot data pages 45,
- a troncalon operation can represent a delete operation In the hea data sf mote re of the r set disciosyre.
- the tryncalon operation can tammr volatile data pages 35 torn a head volatile data page 35 up to ® epoch 111.0 Of a truncatlap point
- daleflon can Ineioda dropping the root painters 1 25 to linked lists with snapshot versions earlier than the yosation point
- a snapshot spans a tanc iop point (®,g, t "delete records appended by e och- ⁇ and there Is a snapshot that covers feeort from to ® ⁇ 4 t « sna shot root M cm e ke t tot those raoords cars he sMl ped w en sn hot data ages 45
- FIG, 1.10 Is a ffcwsfc ii of a method 11 SO for adding data reeords mn m ⁇ to tensacfioris executed by a core 2S to heap d ta stryctare 110..
- mm particular mm 2$ m a m « ⁇ €ore computing system 10 DB ⁇ S 100. can xecute a ransaction.
- the transact ca Include sR tps of ⁇ peralcsn nd eas t$t In dat feeing ge erated.
- im iemeii tattoos* tie transaction can Include the operafons that Include the deection of an v nt, eueh as a security door access, a file access, or other aonltorad event,
- the core 2S can find the location of the end page and Insert me data record and3 ⁇ 4r ar> associatad TID specific to the transaction,
- the DBMS ioS can check to ⁇ If the epoch has s itched time period as elapsed or e predetermi ed ftum&er of trarisaeJlons have bean cuted), if t apec has s ic ed, than the mm sap add a new test data page to the United M associate with the core 25.
- the DB S 100 can add a last data paga to all linked list In the sto ge, Aitat -natively * the ⁇ 100 m only add a new last papa to !riksd lists In ths storage that w mn added a new data r sor tho last epoch.
- the set of lnk d lists can be part of storage fo a data rslatlng to a $ pacific function or Operaiof*, Each inked list I set can be assoetaiad wit a core 2.S in copyi g system 10 and m& ' m VRAM 3D or HVUm 40 on fie same ods 20 as t e core 25.
- th DBMS 100 art obtain aeimo iedgeneni: of the ta le lock fom eaeb. core 25 associated with ifia set of liplcpd lists.
- t e DBMS 100 c wait uiti a I m? h ve ontirecf an Idle state, m r mi ⁇ DBMS 100 can wait for el mm .
- the DB MS 100 is e dng the ot er Inked fists or ata pages.
- the DBMS I DS can scan t roug each linked list in t set at i ax 18S.
- the c of ths I ked H of ata p ges can e read from s start page to.
- twork o erators to m femenl or program a f>$ vpr% ⁇ ng mul pe oontfoJor modules fe t may haw dis rate poistes and objectives mg rtsng t e eon3 ⁇ 4 «raioo of topology ®f the fiff or Conflicts tei oep %w policies ' and oo ois es, a® s r@siP3 ⁇ 4ed by the dif e r#no s in tit resoyrct allocation- proposals, cm t msol d yslpg conferenceeus olocUop ased decision
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Example implementations disclosed herein can be used to build, maintain, and access databases built database in multi-core computing systems with large VRAM and huge NVRAM. The database with optimistic concurrency control can be built on a transactional key-value data store that includes logically equivalent data pages stored in both VRAM and VRAM. Data records in volatile data pages in the VRAM represent the most recent version of the data. Data records in the NVRAM immutable and are organized in a stratified composite snapshot. A distributed log gleaner process is used to process log entries corresponding to transactions on the volatile data pages and construct the snapshot. The log gleaner sorts the log entries by epoch, key range, and most recent use to partition the snapshot across multiple nodes.
Description
TRAN&ACttDHAt KEY*VALU& STORE
i i Gompu!ng system® it many processor mm m bsi g develo ed to offer massive amounts of oorn utina. power to local ard cloud based sers, The potential compiling power In such myji-eore systems cam e limited by -hardware and software bottlenecks,, y^ftato s. related, to data transfer bet ee mairs memory an i coiidar storage mem and
communicati n among r cessors have been mm. of t® lowe hardware ottl necks. For sampl . In aome myli^oe s tems, the rocesso cores ma t to wait to t$m data recjiie itd from sorage memory or alter rocessos,.
08 As yer»msmoiy dat tefssfer ard tntsr^ioseaa r communicaion s eeds increas , software based limitations related to 4®Mmm w mte£$ and map g mpi st ted to Imposo additional testations that: wa e re¾o«siy negligible felaive to fiard am oo!tfenec s, Some improvements ttavfc h n mad© to increaee the o rates! speeds I various database management techni ues, However, s«eh database ma agement systems {DBMS) are too comptiiatienaliy costly to Implement in database In myitl- k i feysterrs wsin ¾Μ*©¾>¾> TO rtasbtvts a ount -* oat** te¾*toem tn
Isolation, and durability {ACID) properties for transactions are required,
BRIfiF DESCRIPTION O T Hi PfHWI SS 000$| FIS.1 is a se ematfo diagram of a multMjere computing sysem In which examples oftho resent isdowe can be implemented,
10041 FIG..2A iustetas an xam le -database managem nt system, i 00SJ FG..28 iustates another example database - anag me t system with s edfe -example data tectums.
|D08i| FIG, 3 depicts an -example database management system In a mylfreore multi-node competing system usi g a generali ed tree data structure,
000?3 FIG, -4 itlastratas an exa ple dual in- age pointe slryoture.
pSJIf FIG- S depicts example atabase, mangemen-f system that indfudes distifeatsd togging to bulk, -and maintan data in n ps ot data, ges in pon-vaM!e r ndom access m« mor (HVRAM) corresponding to data In volatile data i agee ' volatile random access memory (VRAM).
£0009] FIG SA de lete an example datab e management system win a distributed log gleaner pocess a«d partitioned snapshot data ages in
NVRAM.
£00101 FIG, §8 depicts ie mapper arid reducer pocesses of an exam e dlstnoyf d tog gleaner rocess forganerattoa artitioned sna s ha date pos 45.
{0Ο 1! Fid, iC illustrates exampl ortioned s a ho data ages, si 21 F0, 1A is a fo chat of an mimn≠* tm $ for accessing data stored In volatile data ages,
£001 $J FIG. TB ss a flowchart of an example met od for generating:
snaps ot data pages,
tmwi FIG, mma m m®m≠®ightweig t n arly m m snapshot cac e,
H§3 FIG. SB is fiowefiaft of an exar pla method for a lightweight, ea al-fee snapshot cache,
£001 1 FIG. illustrates ao ample of a master-tee dafa structure with move -fcits and fbstent lns accordng to t e present disdosum..
£δδ1 ?1 FI , Β i tovvcter. of a meted or Inserting! a dat age into a data structure using mo ed bits and foster-twins, according to ina present disclosue.
H«1 F!G 10A Illustrates an example hash Mm date structure acpordiiiQ t : the resent discl sure.
|001S1. FIG, 10B depicts an exa ple of search and inset fa a has Index data structure according to the p t disclosure,
£00201 FIG, 10C is flowchart of a method for inserting a data p ge into a hash index data st ctue, acc di g to fee resent disclosure,
100211 FIG, 11 A depcs an exam le scan/append only Reap data structue ccoding to the present disclosure.
FIG, 118 depicts an e s m l of a scan/read fh a ap data stuct e In voiat!e memory.
! 323! FIG- 11C depicts -m example sispapstetdata page eonstfudloR In seariap end only hs data steciijre.
M2 J IG.11 P is iD chari of a method for writing- records to a scan/append mty data stotyr , coordtni to t e reset 4 &b m,
|002§| FIG 11 E Is tovchsrt of a method c ning data: records to a scanappend ony data structure, according to the present disclosure,
P miLlO O SCii T!Ol 0 S3 vervi
f«2?J Tl resent tlsdoswe escri s, a framework for em ing, asipg, nd rMisi!ainlog tmnsactional Key-vaius data stoes in myii- focissor -eo puirs§ s stems fe^, ser er computers}.. Such transadional k« -^alu® d ta st res c¾n ave all Of s rte of the data ss ufap a sly resdent fa a . rimar vaiafi!a random x®m wm rnory (VRA ) and a s ooociary non-volatile ra dom acces ?rs§o?©ry VRAM), Vailoiis aspects of the present disclosure part %® us d individyal or in com&snat&¾n with one anoihtrio rovide ACID compliant key-value d a starts that seals up far use in databases resident in som ul g systems th man processing coes ( g...s op the -order f thousands)* lage V AMs, and hu - NVHM*f$,
100281 Database systems imptetftented according to trie methods, s stem, mt f mm illustrated tha t tm iis dasedbtd hef« cm t®$u or eliminate m«eh of Irs co p tai naf ovehea : associated with some k y^alue stores n : datafeast management systems. Illustrative examples ^moftstrate how to ut the capacity for many concurrent Imnsaciops h ontJy possible n Mft jore comput g systems. lp some exam les $ m l® c res, VRA , a d NVRAM of iha computing system can ba dislrl yfail across multi le Itaf pppaetad u das, plt te mm .can integrated: Into a stem-o^oip ($oG}< Accodingly, implementations of tlie present disclosure c : provide fee functionality far multi le cores i multiple SoCs to exee te many concurrent tiaasaotiofis on data "m t e data pages stored In the istributed VWM and VR M arrays lthaut a central concofrenoy eontfsSar. However, aithougtv exam les ofesanted herei m
descri ed 'm trie context of ra ing ystems that use 8o€s in fwiilp!e nodes, various as ecs of the sent disclosure cad also: be Irnplernented m °ther computer system aienilaefyes,
f W2¾ Some im ptemenia oy s include lataaasas ir* h fen d ta, My dl ng me!adsta or Index data, can fee stored In fixed az data pages, A data page can include a ke or a mt of teys. T data p ges can Pa assodatad with one ¾nofer ihroyp m or 'more dual pointers. For xumpi®, each key or ange of keys can be associated with a du pointer that lnol«d@a Wiofepi or addresses of physical taions of the corresponding data pages ontsWng the data record in th data gea in VRAM and the AM* he data pages In the VRAM and f e NVRAIV? ear* i>e organized accodi g is arious dat structure as iastratad by the ec mpfe data slryeturaa desed'bed herein, in some scenarios, It Is ossible for a particylar data record to fee contained In a volatile data page the A and in a logically equivalent snapshot dat age, in the NV A ,
i i The dy ilty of the data in VRAM any UVRAM can provide far venous nieehanlsnia to kee lra|y#ntl used, or otherwise desirable data. In V A and readily available to tie prooasaln# cores. By keeping comraodlv tissd dats In RA , potentially slo transactions that include u dates, ch nges,, or delai ns of data records in the secondary storage m HV AM can da redyoad or eliminated. Changes to the data records ip In the volatile data ages he logged and later he commitee! o the snapshot pages In a distributed log gleaner process se rated from tie esceoylan of the transaction to halp avoid software and hardware bottlenecks.
|60$1| I ralitad implementations, a computationally l§htw¾i§ cache of s aps ol ages can ha pialytaiaad in the VRAM is rovide fast, nearly wm tee access for read~-on!v transactions In such i otemantaitens read-oniv transactions that are dlraoted toward records not already contained In die volatile data pagea, nay eapaa he system copy tte eo:ff aspooding snapshot data page to fhe snapshot cache. To avoid potential cache misses and other errors, the snapshot cache can occasionally Include multiple copies of the snapshot data pages without violating correctness in the database. The cached snapshot: data ages can pa kept in i VRAM for a predetermined
.amount of fims after is most mi read. A∞>fdtt¾gi^ comm n^ read
sna sh t data pages cas kept ¾ iis.sn¾pstiet cache fa awid ote t ly slower r aete of the data ag s from < V Af
£«21 n the f lowing dttalted cteacf lcm of t e p mm m am, eference Is made to the accompanying drawings that farm a part here f, a l In whion s shown: fey ay of Hlustrstkm how axaroplaa of the isolomifo can he pradtcad. Those exam es am desohdadm ' suffcien detail ID anahl© thos of ordinary skill In the art to practice the xam es of t is disclosure, and it is to t understood thet other exam les can be uf$20d and tha rocess, elecric , physiaai t ork, virtual ne ok, an i®f organlzsltonii ctiapgts sen b& made without departing: from tha se po of the prasani disetetife
$3¾ t$«if ϊ-Oora Computisig Systems
Examples of the presaot discfcsura, d vari us Improvements iwiMS ¾neeo ,: r $@M D&e tn tr¾e C-OOSOM o* niusts ie rot b&oi otherwise referred to mln as ¾ut§~cor s < computing s stems that iaciudt i $e arra s o v and mm random mmm mm y {VWM m WRA ), Described herein am techniques for systems, methods, and data afmctoras ttml cap oe ysed to mpemen key-vaNa stores and corresponding da bases that c¾m improve the pedomeoce of such niiyt|*aara aO:iT5putsn:p s3§l
equipped itt fiyndrt ds to t ousands of sor s resident in rnyilp SoCs in multiple od . As lystratad In FIG. i systems !ite computing system TO n include vast arrays of VRA 36 dlstnoiitod aeroee the nod s m The
computational cost of maintaining coherent nomor -cac es In VRAM 30 can tail the pynider of processor cores 25 that can operate effectively on
uniform merw*ra» feojon* Aecorfsifj , mm muM-mm systems may fiavo o-nl two to eight Ipiofce-nneeted s ckets for iooesso-r cores,
00S$1 lite ^memoy dafio¾ses, exam les of the esent disclosure c n store data the VRA 30 , such as stale random access memory (S A^S, or dynamle random m ms. mornory %Μ> wmi i diSk -Das d dat fcssas, mm mom dsta c p be stoad In N AM 40 piamosi rs, h ® ani#
mamory. spin transfer -torque, etc,). However; iinlte iffsk-tesei dat ses, 0 can be slgnltetiii faster than hard disks, and with some iV A devices, can c the edom iee of the V , Ai % m® of t e so g ty e soigass, d ta: stoed VRA 3Q and NVRAM 40 am aeoesssd in amy random der, !hys offering sigr¾iea«! Impleme t to ifie eed of witss and reads compared to dsk- ased pom ying systems that m imited by se ue tial seefe isc nipiea a d s ed at which the physical disk spins,. In additi * feeeause mmfom mmm memory is byte addressable, I can off rious eron-na ce adv nt ges mm hard disk and ijasb memor thai yse Mock ddtssipg.
Pi$7J Severe! a^en la implementations deserlhed h r «, ean b
Implemented in nd tmtm Hie capabilities of § computing system simil r to myffi-oore compuing system 10 iystraisd in FIO.1. As shown, compyting: s stem 1 can Inoiyde muiple interconnected nodes 20, As used herei , the tmm "m&st m ysed to refer to any daviee, ®ueh as an integrated circuit PC), node board* m ther board, or other d vice, that integrates all or sorno ©fine components of a oompyte or othe e!eetmnte system into a single device, substrate, or circuit board.. Accordingly, In arious examples, a node 20 ca Include rmiiiple Indivi ual processor oores or multi-core s stam^^ l s (SoCis) isp se aid interccnneeted wii¾ one a«o ?er hrough a droul % t$ («,p,s ode board m ® rmtfser board), Irs such Implementations, m SoC c n Include igit l, analog, add mk©d¾s¾naf logic fonclionai all on a single oblp substrata, SoCe&r ojmmon in high oum com uting systems because of their low power co sum tion lowcosi «n*i small si¾e. VH M 3D and/or N A 40 cait fee Inclu ed in a no e 20 as eorrespondlnp d vices connected to a circuit board.
½3·§! The iritermode coiTsm icaion co n ctions 57 between nodes 20 can Inoiyde v ri us electr fie and h tonls commu ication protocols, end meda for relayi g data, commands, and re u sts from nod© 20 to another noda 20, For exa ple, a arlfcylar c m 25*1 In node 20*1 can e uest data stomd in volatile data ages 3S In VRAM.30. of nonvolatile data pages 45 in NVRAM 4Q of another node 20*2,
|083#1 s dsscfi id h m, mp$& mmputmg system 10 can irsciydd any number L (where L is natural mgfl&er of nodes 20, For e^rn ie, to Incifoase te numker of corns 25 nd size of tha av iateie vo!atio and tm m mammy predicted b VRAM 30 nd NVRAM 4§s m ®p\® m &2 cm bo w Mfiod into computing system 10. Each n de 20 ears inclyde any ttumtrnt , { f M is natural number) of corns 25, array ofVRA&l 30, and an array of N¥i¾A¾l 40, ¾g c rns 25 can assess the vo tile data pages: 3S and the nonvolatle p nts 4a ttsougjh corresponding VRAM interface 27 and NVRAM intefa»4?.
VRAM totMteee 27 a d NVRAM snfarfaea 4? can include fyoofena!liy for aadmeatng id© ptysieal locator of a' partfe !ar volatile data pago 35 or nonv l lte 4S 'W fh nofrospondipg VRAM: tO or NVRAM 40. in one ex m le fni feniepiaion, the VR M frifsriaos 27 t NV A Interface 4? c p: include or a oss metadata that i cludes the physica sd pjss of tm root ages of a paraoulaf stora e 'targeted S¾? a transaction. Once the root age of a paricular siomge is daiermindet, a particular dat page containing a data record" associated with a key car* be tend asing a data structure by which the sioraga is .organized. Examples of data strucures, that c n take aoVarstage of the v ious op® rational capabilities of eorrtputrrsg system 10 r d scri ed herein.
|00 il Vahoys tem les of ide present disclosyre can tee us op atop® and in. oanifetefson to rovide ¾ d t base nagat«t systems {DSMS} mat enable en anced tensacdona! functionality on databases stored in systems spo!i as com uting s ite i 10. Sy h databases can Pa built on dd include fcey-vatu® stores that include echsnisitis for utilWng the adv nced performafie© characteristics of mutip cess r computing system 10 wth ybrid memories that include both VR 430 and NVRAM 0.
2J m&m ad NVKAM
|004S| VRA 30 random access m&moff, such as dynamic random access memor {ORAM} nd static random access memor (SRAM), maintains data mty when periodically or actively powered. Id contrast
NVRA 40 m random mm momocy that can refasft its information: ein hen rM owered,
10041 Jtm capacity of V A SO (e.g.s O AMi) feuka*** ine∞ad ex one tiall ©ver the ea , if is, or w soon be, possible so mm iif n ftave eK erssJy large arays of VRAM SO. for wan fiwn&ry. In same scen ri s, t Is posslbi© to i elyds teaclre a of terabytes or mom, Hwwr, VRA 30 j$ .becoming loowssngiy olfM snd «^@m ? scale to -smaller feature mm. To ddrtss the ImllafctM of V A 30 arrays,
sm femematlons of the- t mimmmm use ¾ ¾ n om©W i NVRAM 0. f«4§l New forms of NVRAM 40 am feeng develo ed t at can peform il en ug to Ss«t ysod as universal n^mory. Some NVRAM 40, sye as phase-change memory (PCS% s in transfer torque* magnetic r nd m aocoss me oy ($ (S AMX and monristors* offer erformance- close f© or equal to that of ORAM or SRAM tote, buiwii fie rraiwoM of Hash memor , p$4§l Ex m le of tie present ©Isctesurs include performaree
im iwtnwSs fe using the ©merging NVRAM 40 !s<m oiogls as i t n nv latle data store, Many of he emerging NVRAM 40; tech logies may perform orders of magnitude ta ster than eyrrept non-volatile d vices, such s SSO, H wever ano kSth and late cy erfontsano^ of M RA aan ary from avfce to device 8m to rocess a il material variations. Aoeoftlfisiy, emerging V A 40 tec nologies are sil ex ected to ave higher lafero m V 3 : *h a DRAM, For «χαη' ΐ»* a PCM product may have 6 to 30 § read latency and 100 μ$ writs latency.
100471 Enw rig NVRAVI 40 It «ria ogfes m mm s¾xp@el©d: to have mm endyranee. Depending n the ty o of NVRAM 40 cell (e.¾ single level ©r rnu!tM®v®l %} m material used, NVRAM 40 « dwanc$ can km. orders of issa Mf to r t an VRAM 30.
:[0O 8 eueh characteristics and immsm of -em rging NVRAM 40 techriologtes are addressed In vwteus I plementations ©fthe present disclosue. For e&ie, o erations In rnyiil-eore s stem 10 may eed to aaoount for ig ly fioa-yolform m^mofy- oee. ( U A) costs-, The multiple node te leiiaofatos desc bed herein ert address o che^ooo sraii
.architectures. In s me example, whel f ¾ database- Is Incoherent or so It can p ce dat so Iftat: most accesses to VRA i aod NVRAM 40 are oode 20 tai Trio m *NU A mm®* k used to mfer to- capably to address c :oh fts©¾omot arotiiteotyfes lit H MA oysferrm.
:p34S| Datab ses implemented usi g xample tran«aollooal key-val e stores descibed herein -ear* avoid contentious comftyolcii oos among tf c rns 25, nodes 20, the VRAM 30, nd NVRAM 40, Tre massi e ounoer of mrm 2S can be sSf from the redoslioo or elimination of at contentious ornmyosoa&ns,
( $ l afabst es built according to lbs present disclosure can mate se of NVRAM 40 for data sets too large to fit in VRAM 30, However, beceuso VBAM 30 cars often have faster access ( .$...s mad or write) times, varous i le ntaion can VRAM 39 to- store so-o led " t dat that Is fre uenty accessed In contrast, so^afei 'told data* ttsaf is accessed loss frequenly can be m i m rid mt of NV A& 40 m- eeded fthoy of¾Jye decrease in poffeo oo . In addition, fieo data Is written to NVRA 40, exam s of the present disofesyrt reduce too number of writes to a fewer num er of se uaf ial writes so that th performance nd the endurance of NV A^ 40 can he incrsassi
DSIJ Database anageme t Sy stem Overview
O0S2J FIG, 2A iysifstos a icfwmatie view a! a mm 100 lit ®mM voiaieooovoiatie RAM -s st m io aeoordariee m various essm te sm lenientattofis of too pj¾s®r¾ lsifes e. s shown t * DB fS 100 can include vartoos com onent processes or tedlq«alty5 such as fog gleaner 1 0, data structures.120, andor a snapshot caste 130, .As escri ed hereJfr, yqh component prm»f so s or funefioriaKty c n km impfemwtt d as a
.eomWnsta: of sot! aie ff »% and/or ardwae in a computer system, mt$\ as com uter eys tern 10, For exam le a DBMS 100 con fee lamented m p t executab code stored m a voialfe or nonvolatile memory. The DB S 100, and n of is compo ent functionally, ears fee embodied as cpopoter exeeutebe code that Include Instr cti ns., that when executed by a
roce sor In a com utng s ism, mm a pmmmi to configured to perferni fujctoisNy described iiereift
th as syst m; 10, computational and memory t tmw cm fca scared nmm® t e #o ΖύΜου inter~R»de c nnecSons 57,
Accordingly, com nents of the DBMS 1 0, as el as asaf tef m$
transactional o erations, om oe prnfommd by muftpl r cesslsg cores 25 on m mm 30,. mfer NVRAM 40 m niyltipte nodes 2il
|δδδ4| The rlidctte lty of log gleaner 110, data sifyclyes 120, end a snapshot cache 30 can b #tid yted m$ m iti ie nodes .20* As such, the funqtio atlt of each one of the components el the DBMS 100, while described herein as .discrete rdodefes, an he the result of the var us processing cores 25, VRAM 30, and VRAM 0, of tie multiple nodes M m the sustain 10 performing dependent or independent operations that n the composite achieve, the fun&ieoalrty of the DBMS 100.
{W$$l mm≠ im≠ mm m of the DB S 100 describe herei n be m®4 to by Id databases that can re fy!y exploit the ca abilities of mull- processor .c m utng systems with ianje VRAM 30 and NV AM 40 a s, sooh as syste 10.. Such da ases can be fuiy AGI oornpttant and scalable to thousands, of processing cores 25, Databases I plem nted i accoding with the examples of the present disclosure improve the utteii o o the V A 30 and n AM 40 and. lfe lor a mix of wri¾e niensiv6 online ansactors rocessng (OLTP) transactions and fe¾~data online analytical processing OLAP) qyenas. To achlovo such todio eity, v rous databases according to the present o¾olesufe- use a t¾hiwe¾pi o tirnistiooon irfenoy- control COCO).,
[§0S6| arious tedlefiedtatio s of QQC desc ed: htmi , a database can maintain data ages In both the NVRAM 40 $ the VRAM 30 without gtebat metadata to ttack where records are eached., instead of global metadata, data ases ears, be bull using variations of DBMS 100 that ears maintain physically independent., bet logically equivalen, copies of each data age in V ^ 30 and MViRAM 0, The copies of 'the data pages resident In
both VRAM 3d nd 40 rovide a --duality In the dai tmM for
iPpraving the funsfehality of a daf o se ini iornented lint a niu!i~oora eompyting $ymm i OP ®m s¾e of t e data page dy ¾ * e mutable velaHie d ta pages 35 in VRA 30, Of* otter sids-, am immutable nen~ vo!aiie data pages 4§¾ also referred to herein m snapshot data pages, 45 in nmmrn,
IW l The u m 1 GO can cwsi ¾ mi of snapshot data ges 4 § f 'mm logical tensaafes togs of th« transasfioiis e ¾.eout®d on te volatile dai ages 35, r t er than §¾ ¥0fatite data pages 35 thepisatesL tn.some
m^m M , it Is the collective fynctsOiailiy descfiPed at the log g er 1 w t m the snapshot data ges 45 ind pond¾o of pd/or In parallel to the transact ns executed the volatile data pages 3S, t w® Impementations, the io§ gleaner 110 c d seqw nH f! wrte snapshot data ages 46 to NV AM 40 to Im rov the i p«t»oyt . oarfer anoe and
e uit e of AM 40, Su fpnctionalft cm mai t in data n two or mom se r te atea!yras., aach of which is optimized for respeorive underlying atora§e madtim
p3f§| The data em be s nshmnfead between the two str yet mm fetches. For m≠ f simple ersion of an IS t ean include a two*
where ope is fniatteran emtely residents In AM, horaas !Pa other s i sid esident
reoorda can Pa ncited nto the i mQfy- mskts¾nis tree. If the insertion causes the memory resident tree to exceed predefemitned §¾e t rasholcl, the oonflgpous segment of mttim is r amove torn Sis memoy resi ent tree and merged into t disk- re^dent tree.. The erformance eharssiehstles of the LS tre@a stem from the fact that each of the te components is turned to the characteristics of lis und l ng st ge me&iuw. and that data a officiate nioaed a ross me i$ In raiilno bate a¾ sing m method similar to a merge sort
f«SSl in contrast, log gleaner 110 can use straSied snapshots tftat mirror each volatile data page in siegle- snapshot dat page In a hlerarohfcal fashion. The term stratified snapshot" refers to a data structure In NVRAM 40 In which oniy data pag s that am affected b a particular tranaapl n are
siiangad, As s eti, when a volatile data age 35 Is droppecl to s ve W U 30 consunipion, sedsfeahila transactions can. react a: sngle snapsiibt data pape o P errnsne If tie feciyestedi record m and¾r retrieve the requested record,
C006GJ Tf¾e log 9tesn©f 110 cars isidude function ally for ©Meeing log entries corresponding to the senaizapie imnsaciions execute daa records eonfsifmi in vc!aite data ages 35 in V M 30 p¾? the many mm 2S, The tog gteaner 110 can %wn w m m m e co!tected tog ©nines aocordirig to vanoys chafactenstics aissoc&ted it : the tog mt , h as time of e ecution, key range, and the lke. The sorted and or§a:m¾ed log entrie n th n Pa eomntlSed to I © snapshot ages 4S In NV M 40. As described heren-, tie log gleaner ocess 11 can tneiyde cwi oiwf processes distributed across niotipls nodes 20. E m le inipieoieniatiDns of the og gleaner 110 ar de CTbed additional detail heren In reference te FG.6.
IWWl i data s&uctures 120 mm fcy m DBMS 1 S can pe epeclfiealy tyned tor yarioys yrposas and operation wttd UVPtM 40. Aosord ! , mms imam w ®& m ≠» m ty es* m
Si| The snapshot cache 130 can indud I¾Htwelgni and wait: free buffer poo! of Irnmuiable snapshot pages lor readonly ra saefcns, s described herein s the snaps ot cac e 130; ca disthpyed anong the m®AM 40 of multiple- nodes 20 or t® local to sinc¼ r«sd m n one ex m le impiemontattoa s nods 20 can incfyde a snapshot cache 130 tiat Incydes a snapshot pages niost recofsl^ read by iransacttons executed is the cores 2S In that od 20. Addit nal details of the tocttonalty and capabilities of the snapshot cache 130 m® descri ed herein,
: e3J FIG, 28 de ots an sample DBMS 101 ae«¾iin§ to mfiwm implementations of the present dtefoeeft, DBMS 101 , like example DB S 1D0f can incl de a tog gieaner 110 nd a snapshot csetie 130.. in addlfens DBMS 101 can include data strucfcims 120 iftat include specie data structure types acc rding to venous implementattons of $¾e present disclosure.
Spedlcal!y, DBMS 101 cap include a master-irea dat structure 123 with
?W8d* and fosert m ssrfafebfc hash ind x data structure 126, ..and the end¾csn only heap data.einjctiire 12?, As desehdad, each of the master-tree data type 123, seh l¾ bi hash mm data structure 125*. and fte a p nd&cad niy ea data strict**® 12? nave at»ute that m ke -them euitabie tor various types of use esMfc. Details of the specific -.e&ie data stnjcfcrgs 120 an described 'm additional detail herein in reference to
urn eases,
{O064J Dual Data Pages and Dual Pointers
|β0δδ! BO, 3 s- a sehefoale of DBMS ϊ compyfing system I D thai illustrates tre d«s% of the of fw volatile data ag s 3$ and the snaptiiot pages 45 in VRA 30 and NV A&f 40 dlsfr¾yted aeross multiple nodes 20, according to veiioue implementations of the resent disclosure, VV fa an of the c re 25 In ny of tns nodes 20 can seqsss the VRAM 3D and fW MA 40 on any of the nodes 20, for the sake of clarity , the charactefisios and
functionality of trie -volatile data oages and the na sho! pa s 4S are descibed in the context of a tree-type data strye ire 1 1 in a sngle nods 20* 1, Tills e am le Is iti«sifaiive only and is not intended to 8mi data structures 121 torn feei g disirib-yisd across multiple.. nodes,
0ίΗΙ$ Any of the cores 2S ca execute transaction on a data record In a particular volatile data page 35 or snapshot ge 4S, Execution of the trans ction can include ihoiie operations:, such as rea s,, ntes, updates, deletions, and t lite* on data record associated wit a particul r key in a particular storage. s used erein, ilia term ¼oa§es can refer to any collection of data ages org nized accor i g to. a particular dale structure. For example, the storage can include collection of data ages ogansed in a tree- type ierarc y In iiictreach data page a node associated with other node data pages y corresp ndi g -edges. In t e implementations described herein, the edges that conned data pages can include pointers torn a rent data page to a child data age, in some examples, each daa ag , except for the reel page, can have at most one incoming pointer fr m a parent data page and one or more outgoing pointers Indicating child data pages. Each pointer can be ass cate with a key or rang© of keys.-
ii?i Using fts ke , the transaction: cm find the. twt <* stoga m ^ in© V interface 27 arte NVRAfcf interlace 47, C m the root page, soph as volatile da page 354 or sna shot page 45-1 in the example≠ m, is found, tie keyi g core 25 n sear& tie data atiwtee type 121 for the data age t a $«ci¾d&s f e key, Thsstarch for the. key carl ¾dude travers g ie hierarchy of dat ages to fed thg data page associated with a ke , 0 §3 In e¾aoiptes desontigd twain, each dat p ge , Inoiydlrg t! root data page ss can Include kftf polnfera that include iodications or adde ses of $ h sical loc^on of child pages. In one implementation, eac dual pointe cap oelf to a c rres o dng chid volatile data page 35 in VRAM 30 or a corresponding chid snaps ot age 4S in NVRAM 40. As suc , the oi ters in the pair of du pointers can also include hysic l .a¾ms$es of the
eerresponcing data pages in particular node 20, ccodingly it vo fti pointer m t e doai pointers can poiat to tie volatile data page 3S r sident In one node 20x such as nocte 0¾ white the s shot ointe can' oftt t© corrs dng snapshot page 45 In another node 2ύΛ s«ch as node 20-3, fa&f$ Fie, 4 de ose an xam dual pointers 250 that can a# s ociated with a partl oJar H y and/or Included In a. data page i example soeriarios. Each du l pointer can Indii a value for a volatile pointer 251 andlor a value to the snapsfrot poiote 253, in one exaoipie.;. i¾otr» the volatile pointe 251 and the snapshot pointer 253 can ooth © mil Under such cireurnslan es, the DBMS 100 c n determine that the ne er a v&!aite dele page 3§ nor a snapshot page 4§ exi ts at Is associated with a particular key, Accordingly, the DBMS 100 can perform medity/add operate 410 to m or I stal a yolal data age '3δ that is asssclaisd with the k«#. Fart of oeafihg or Instating §ie volatile dat page 3S can .include updating the voiat!a pointer 251 In the parent volatile data page 35 indicating the physical location, *X, of the oowly Installed volatile data age 31 in the RAM 30,
|Οδ? 1 Wha tie snapshot page 45 ear responding to volatile data page 36 is created i trie NVRAM 40* fe DBMS 6 can update its© snapshot pointer 263 to include the physical location, Ts of the corresponding sn shot page 45 i HV&AM 40> with an install snapshot page operation 415, If the volatile dssta seoa 3§ Is not ccessed for safoe oeh d of firna and ¾o s &osh t oacse
4S is s uNsisni to voai data pags 35 mA of Ila ages contain the same version of the dats)s then the -volatile data pages 35 earn be dropped from w memory 30 to conserve volatile mfmoty s ce. The volatile pointer 2S pointing t© the Reefed volatile data pag 3S can foe updated as in operation 421,
00711 in cases In cii a transaction on a particular ke luetics a m€f¾e!d typa o eraton f!oeis a dual pointer 2S0 In which the volatile pointer 251 is *N.Utl* and snapshot po ier 253 m a valid physical iooaiori in the VR 40, then the DBMS 0Q can install a. oopy of the snapshot page 45 Into V A 30 as a vol fe dat page 35, At m$ point, the DBMS 00 oan update the voaile oi ter to indicate the physical location, ~X<\ Qf ® ty Installed volatile data page 3SS ¾ operation 420, if the transaction c a ges or modifies oatile data page 35, then the DBMS 100 can log the transactio to Install the eo responding snapshot paps, in operation 430.
100721 I various e m le^ the DBMS 100 can store and maintain all data in a dat base in a transactional key-^atos data store with fixed size data ages with mkm tmMwii in VRAM 30 aod/or NVRA 40, in such
Implementations, a transactional kay~vai¾sa data stoe according to ie resent disdosure can also include roost if not all metadata regarding ttie stucture and rg ni t of the data ase In the data p¾ee, FIG, a illustrates one example imp!ama?¾at» in which a version of the volatile data pages 35 can fee mi oed in fe stratified snapshot: 2?0, As d s ribed herein, the stratified snapshot can indode multiple l yers of onvolatile, or snapshot, data pages 45, f¾073J !«· sue** Implementations, the dual nature of the volatile data pages 35 in the VRAM ¾ and S corresponding snapshot data pages 45 In NVRAM 40 bic nips salient and useful. As descri ed, a data a mn iadudea dual oiner 250 that can point to the physical iocaioo of other data pages, in one example,, a dual pointer 2SD oan point to a pair of iogicaly equivalent data ages. In which one of the pair Is In Vf¾AM 30 and the other Is In NVRAM 40, 00741 As desoriheo: In reference to RQ,.4S a d a! pointer 250 can inciyde two associated pointers. One of the two pointers can iaoluda an address or
oth imfatson of the ph ics!' location of a volatile data page 35 In t e VRAM 30, and the other of the two pointers can include a addrsss or otter
Indication of he physical l caio of a so as D dl g or associ ted snapshot Pata age 4S In the NVRAM 40, Each of the 4mi pointers 250 c n also include a status Indicator or otter metadata. Trie status imileatof and other metadaa it described In refers nee to fie specific ty es of data: str^ctes
transacilop tha modifies tie latile data age 35 of fit pair dots not interfere will a process that ispdates the snapshot late page 45 of the pair. Similarly,; the process that .u dates the snapshot data page 45 does not attest tie cqiif sponPing agis ng volatile data page 35·. Jim du lity and rnytel Independence of t e data pages all w- for higher degree of scalability tha oold cause so:fea¾ and: hardware o Senoote in im- dala es. s?Sl Various impla antalims of ®m tfmm&i n k«y-vaius data store maintain no out»oi*pape inforrnaiioo. Accordingly, a key-value store of the present disclosure ears maintain the status and other metadata associated with the data ges ihoti a sepaate memory region for record Podies, mapping a fes, a centra! lock m nage, and the like. With alt the Information P8&p«t©d will,, Included in, and desshhino. the data m i itm actual data g s can provide tor highly eceiaPle data management in whic contentious communications are restricted to data page level and the footprint of the contention is are proportional t the stee of the data In VRAM -30 and not In the sze of the dale In ie VRArVi 40. For ©sam le, in mm potential scenario In wil A terabytes of date is stored in the NVRAM 40, the transactional key- \m.- stom of tre present $s o$ura can m »yte dual pointer In t e
VRAM m Ce.g,s t> ) to the root data page of the dat In the NV Afvl 40, This cao: Pa contrasted with l^m¾m@f and !n-disk datapaaa management system that would need largo amoun of metadata stored In VRAM 30 to find and access the data in secondary persistent storage medium e.ct,, hanJ disks, fash memory, etc).
|0 ?1 By storing ail data in ihe data pages, pplamanta^s of m esent disclosure, ca* radijcss or ailniiaate tha need for afbag© collection processes to mMm storage ace from deleed data s, adarpaiprs of the storage apace o nalso poc r ithout eompastion of miriest By avoiding garbage collection, compacton, and migration, example & ~vaiua storas can s ve a si iilie¾rit nwni
O | Su h key-vsly© s lores accordi g to Ila p m & disclosure ca im ediately reclaim the storage s am- of d is page lwp tfie are no- longer needed and use it in ofer contexts, bec use all the dale pages dan ave a fixed and uniform SPOP. ©srfigaralipns of t data pases can also help avoid potential cache mrsaas and emote node 2δ access because the record data is aways tn the data pages,. o?i| @y« ai # stores assorti g to various inplarrsentatas of tre present disclosure nan be used to build m® mai tain m - n. databases with Ig!ht aig t OCC to osordipale concurrent traps pttos, Such a d tabas s fee built and maintain^ by a corres ondingl tm iemeMtd atabase :mana.gement system or "DBMS" mat: tm respond to re uests to execute transactions on two sets of data pages that are lazily synced using jepicsl transaclsp logs. As da § crtbacf rein, transaeiiof key-vafye store @f example DBMS 10S can store all data m fixed siz volatile dale pages.35 and sr&psftot data p -gas 45,. For example* ail of tie volatile data, pa s 3S & the snapsh t ais ag&s 4S Sao tm-4 KB data pages. QSif As descri ed !hanslR the volatile data pages 35m ' VR 30 cm represent the most recent versions of l s data in a database and tie nop- volatile, or snspstiei data pages 46 In VR ff 40 can include eloneal snapshots of the data in the database. In some se eahoa, the records In th snapshot data pages 45 ma be the most current version given there has been no recant modi cation to the volatile data pages 35, As will be described In pdditiopa! detail 6 ¾ν m referend to FIGS, S m 6, so-called
''sna s ot data ages*, pan be com iled haa d on lap entries corresponding to transactions a¾paytal on the data in the volatile data page s 35,
i mi In reference to FIG.5, OB^S 100 can execute a ansiofion using a articular core 25 to. earfcrrn ©peratioo or*, a data record, or tuple, associated with a particular ke . To find tlie.ctata record as oaated with the key, the DBMS 100 n first Witt root a e of a particular target storage SOi associate with the key. Finding the root page of a targe! storage §00 oars mum trntmc a m . s stored li V 30 or HWAM 40 with a listing - of storages with c©frespor*diria: ^Intes .to the ph sc l lot on of ti foot' pages of the ster sg s, in eone axaetpies, tie root pages listed in t!ie metadata lite sm be ¾^od§« wit a r nge at ke & Ac rdingl , particular storage can be found by d termining if the f¾ey is within a range of particular root e. For example* for a target key "13s.: if a first root page s associated with keys 1 t rough iOQO, slid a second root a 1$ attodated with fet s 1001 through 2tm( the target Key will most i ha mm m the b rage as∞ated fti tss first root ge,
i<mil in the exampe ¾hown in FK3, volatile data page 3$i is ft* root page of t e stor ge S0Q in VRAM S¾, As descibed herein, the mot page 3S-1 can bo associated with a range of keys that includes th# target key .of a particular transaplen.. The roof volatile data pages can nclude dual ointer® 20, in various Impienieetetlorts, eac volatile daa page 35 can Include two outgoing: dual pointers 230. Eac one of the two aotgolng dual oints-is 250 can be associated with half of the range f keys associated with volatile dat page 35 that contains them, la the example shewn, the first half of the ke range of volatil data pegs 35M Is assooiatecl with a dual pointer i thai Includes a volatile pointer to ef lef volatile data page 35-2, The second half of the key ranga of volatile data ge 3§~1 is associ ted with a. dual pointer 250 that includes a volatile pointer t¾ child volatile data page 35* 2. Each one of the c ild volatile data pages 3S-2 and .3§ c n also inc e dual pointers £S0 to ©hid pages,
; OS31 As illustrated, volatile dat age 3S-2 ear* Indude dual ointsf 250 that ints to a volatile data pa S mmm other nocte other than m®» 20-1. Volatile $ age 35*3 am Include a. dual pointer 250 thai Includes a volatile pointer 251 and a snapshot pointe 253., in the partic lar example shown, o e half of the key range associated with, the volatile data
papa 3ί 3 is associated in a .dual paster 250 fiat; points to volaffe 4 ages thai contains the typ!e ass ci ted with the target key of fie transact™. The first dual pointer 2S0 of . voiail data page 3 -3 can: also Include a pornier to !Pe a« ps f page 45 that cor aim the tuple associated sth the target key,
m VoMIe data ge 3S-3 cart also include a second d«a! pointer 2S0 thai points to data pages associated with i¾ mmnti half of lis ke rsi¾& As S!h wh, iHes eo d dust pointer 25δ n inclucte a *NUU* solati pointer 251 Indicat!rtg thai tf¾# key does no mM In VRAM 3©.. Rattier, he sn shot pointer 253 ssidlcates thai key ¼ found I snapshot cache' 30 or In the atratfiad snapshot 27o\ fn some exam les, tf e snapshot pointer 253 ear* Include a partition idantlfer and a pago identifier f at contains the key In IPs slratif!od snapshots 270 {e,g,f partition identifier *PO and snapshot page δ8§1 For t i aclona tint ImM® read-only parationt, the aiMpsho p≠ntm 253 can poin to a copy of fha sn&pstiot. page ir the sna shot cache 1 0, For iraneacttons f hat might update, ins t, or delate a tuple associated with the key , a co y of Ilia snapshot page associated ith the snapshot pointer 253 can hs installed s the vofai!® data pages 3§ and the volatile pointer 2at f the dual pointer 250 of the parent volatile data page '35 ca fee with I physical address in W S 3 . As osed h ! e terms
*ϊ9β*ύ -Μύ ¾ !ίΤ are used Intare anie Pl to refer to the value or values associated ilii particular key ¾ a k y-vatye pair,
fOCi8$! its various Inip!efoentailpds described herein., each transaction la a¾ eyi hy a particular core 25, To avoid oonics between concurrent aos elods., imptem naftons according th present dlsdtoaure use a tern of eonourrtoey control thai (km not require a centralized smcameiic contfolfe . insead, DBMS 100 < m® a form of optimistic concurrency control that can in-pag looks during pnM^mrnlt or e mml phases of the trinsaegon, implementators that use opirnistie■ concu re cy control can greatly reduce the com utaio al ovepaid nd increase the scalability of va ious
irnpiame ntationa descrihed herein ..
pOS?3 Opinsl&ic€¾nc f?e«ey Conta
pi88| Exam les of tha resent disclosure c n use optirnlsic concurrency control (OCQ to avoid OD Pfious d ta ccess resting torn coneyimnt transactions feeing executes on the same d aec ds «t the same time, in various a amples* exec«tierY of an "0CCT transaction can tract the records it r eds so wries n iacsl storages ysing corresonding read^eis 210, nle- ssis 211 nd pointer-sets 21.2,
The mad-set 21 can Include the mni i wm m f
(Tips) of tte hjples that a particular transaction wll access. Ascofdiingly:, anee a transaction finds a p¾rf colar tu e associated .vsfth kevt the P BS 10 ca record the currant TIP associated t tfte tuple in a transctio specific tmd- mi 210, Tbe transactor* can then generate a new or updated teple tiiat wl fee associa d wif* a .key. The DBMS 100 can tha associte %m new or updated tuple with a fi TID to indicate Mi a Aai¾e las bmn made to M tuple ^uatee i ; ¾Ο K iiac^ n *n a cone^KJ t wtw-w*t .<£ s 1..
Implementations, TIO¾ c imiuti®. a monotomcal increasing o& nier that In cates tiie vemjo of the tuple a d/or the transactors that tmi w
modified it, Ttmwna-sef -211
corresponding TIDs.
tmmi m validation phase, DBMS 100 can verify i! a tuple associated with the k has not: hears altered b -i coney irenUraraa&fos since tre u le s rea4. The verification can include comparing the TID la e read-set 210 with the current TID ssociated m the tuple.. If the TID remains nchanged, the DB S 100 can assume that the tuple has not been chang d anoth r transaction since t e tuple was Initially read from the corresponding; dat pa§e. ifibe TID has c anjged, tie OEMS- 100 can infer that the tuple has een alter d.
£00t1l At commit time,, after validating: fiat n concurrent transaction writes overlap with its reat-set, execution of the transaction can install all tuples i th wnte- set 211 in a hatch. If validation fails.,..exeoittGn of the transaction can abort iaxeoitfan at the tmnseetbh is the DSMS
100 can mttemia the transact at a later Ime.
i il! Tri ap roach has i hentfts for s€sl¾ l%, OCC
■ransa tor may only write-to' scared mersrsor . during tie comm hase ©f t e tmn&acioi, which can occur aft r com leti n of the cam * prias© a! t!m trans ctors e ecui n, Baoause it s ars ba few to ft* mmk pl m af the transaction, iia write ρφ ού r ¾e la the res! af t e transaction ca a© sliort, Ihus reducing t e chance of coatajilops writes.
SSS Based tie use of tiia vaildatfen - hase, fyptea, and the data pages m which they ras!ds, nead not be locked except durlpg writes. This can reduce the number of read locks o tuples thai could otherwise Induce undue contention jus! to road iafa. Exo&ss e e d locks can introduca software, bttl ecks that can Irol soala ity. As s eh<, various eihafadaosflca of OCC can help topfwu the sc^iaality of £ta»vaHje atoms -implemented to myfr orocessor systems 10 i large VRAM a d NVRAM 40 tsa! bgiveths otential of funntno/ many concurr t transactions on tf¾© same typl©, 3i¾ Onca t tansaction has bmn c mmits 1¾ entry that:ndu s information -about the tmossctloa can aa placed nto private log Puffer 22§ specie to the core 25 exporti g n#ransactim A to§ whlor rooo&s 2SS can t n ge erate to¾ lias 28?, Each tog ¾ 267 can lasiyda some number of tog etries corresponding to eofBnilited transactions p rf raiad durng particula nie padodi, or *ep cha*>
|00SiJ Om exampte af OCC according to the p ni dlsclosara can laciude a pra-oorarn?f pmcadura that incudes a 'transaction with a verification of sanatlia llih/ wthoui a vanllcafen of d«rabi%. OCC can verify durability for bafbhes of fensadloos y- a ng ft® log writer 6S occasoally pushing transaction log entries from t a pivae log buffers 22S to .epoch lag flies .26? for aaelii saad. Each epoch' log: lie 28? cm orgaise the tnctuiSecJ transactors tag nions by a eounse*gfainec! $me$tam ,
£0β8$| Exam e 1 su«tmafi» an example pro-commit protoool use la volatile pages 3S aad snapshot pages 270, accordog to various
implementations of OCC-- o | examp!a 1;
iSSl A$««?dfr¾ to t e ^-ooffint protocol illustrated in Exam le 1 , the DS S 100 ti lock ai records te &d In the rite-aet 211 , "W. Th« esneurmney control i lei¾e an indiide m irnpage took mec nsm for each looked reconl For ex m le, the in-p ge Jock rnsc anlsm c n: Indodeao S» oyie HO for ea h record , c n Pe tooted and unlocked using atomic operations! wllhout a centa lock manager. Placing a lock mscHa lim 'in-pags avosus n© f¾¾n c m8utatH>n,s*s ov&me o wy& g>ny$Hai * >ra&n«©n t cenral lock m nages used In ain-mem&ry datatsase sysems. By avoiding the Ugh om\ and physical contention,∞nc¼r f ens control ill in« ¾ lock m#d%riism ®$®%m$ h&wln scale, better to u « mmm systems wil many ntof rocessor axm fe > orders of ni gnlode I rgor a the
wmmy control used fey mati-mfmoiy d afcasos, i JSSl In such e am le implementations^ m the DB S' 100 locks ail records Irs tie volaite page 3i oefucted in the wflte~set 211 , t cars verify th§ silus; of. H© meemfe m the reset-set by s eckioi the jnwt. TIPs of th locked records after t¾ epoch at the :frafsaotfo:fis Is inalteed. In soma
Implemenati ns, verif n iherea&set2ie can i clude Mati g a .memor ftn f e enfore m ordering mn on memor operi!ons ft*** before and after tfw memory fence Instructions, In rm . implementations, tills mea that .operation issued prior to tne memory fence are guaranteed to be performed befor operaions Issued after l barrier,
IO01S0J if toe DS S 100 can verif ifta them has be n no c ang© to TID of toe oonaaponoilng reeonl in fia voiatiia data page 3S snco tha read-set was taken C ,t eil that no other transactions have ch ged the TI0s since t § toBsponding res rd was rt d), ft®n It can cl^i r iine tnat i transseto Is sedslizafele. The DBS 100 oar? then apply tie dianojes Indicated in the
private tog buffer to tie lacked records and oveiwrifp the arisi g TIDs ith a newly generated TIDs corres onding to s tr n¾asfc« ttat caused the Pharsgsi., The corrin tted l¾macta logs ears tfteri be published to p$m¾ log uffer 225 ard then a log ier 2SS< A fog writer 285 can dte &0mm¾t $ transactors logs to a corres o ing log file 267 for dua ility. Sych
decentra&Eed logging can be based on ooars«^mined epochs to eliminate contenti us t&mmuf eattsrss.
|081 J nother as ect: of OCC schemes of t present disdosym ate to t^us ^yociwrsous c3PM UOMsa¾oos: tor «st.<3 ¾¾ t® i o ©8« n&. topper! tmm often than writes even in QI *atabsses, mf lmMoft of such synctironous c mmunicati n cap help <M n m data access and unnecessar Jocks on data ecords and data pages. In various examples, the DSyS 100 can ameliorate the Issue of afcprts resulting fmm changes to TiDa .that -cannot e wrM t?y use of i adl!e data sirycfyris ¾slap Tr that Ineiydo echanism (e.g.,, moved or ch nged bts) d scibed is additional detail In eferent to figures a d operations esr»$ ndln§ to iw particular dsta ¾lry yr s.
[CM31 §2| Som ii leioeoi lons of OCC can include niecftaplsnts for tracking saiitf- ¾p PericfesB Cs<¾ m® ~®ttm conflicts},. or ©x ropte, m one scenario, a tra s cti n: t1 can read a upl .torn the database, and a eo cyr pt ftfisasstton eau mm owr rtt fha vaiyt of the tu le mA ti. The DSMS car? order 11 before 12 even after a potential crash m4 m ^ from persistefS logs. To achove 'this ordering, most systems require, that tt comrnynlcaio with 12, .usually oy posting a corresponding read*sei to s aed memory or usi g a cenraiynsssiped, mo«otonk¾liy^ncreasing transaction ID. B m non-seriafenlo systems cm avoid mis co munk&tkm, but they suffer Iropi: »mate. Ife snspsfiof isoiatton¾ "write mt\ m≠& imptementations of the present .ctisdos re can provide s stehltlty wale avoiding all s nared mem ry wit s for m d ir nsao!!ops. Tne commit -protocol In the OCC can ss memory fences to produce scalable results e-oosistent with a serial order; Correct recovery can be achieved using a form of apootv
Pasad qtmp commit Is the strafifisd snapshot 270 implemented by t e log gleaner process 110,
imi i in such Imptm t m, time am tm dMd m a m ©i s ot poetin Ev n tQfr tmft n m&ilts,. cm al ays agree tln a serial order, s starn &m no m t $ know the mm orde excep across epoch ij unsierim For sam le, f' 11 occus \® an epoch before the epoch In feti 12 Is «Btecutedf mm tt s¾eed §f2 in m& serial ©refer. For exam !®. the log write 265 can log tmns sloi In units of feote ochs and mlmm results at epoch boundaries as i dividual epoch lag lies 287.
f«1 §41 As s result, various mpfemerif fcos can provide the sa e guarantees m any sehafteabfe data&ssa without yn ecess fy sealog ootttensccs or action l latency The e ochs sed ID fmip en ure
senafe&bilty ca be used m ot er aspects of the present disclosure to ac sv^ ot er tepwerMts, For sxampte, epochs can be used to pnovkfe dat base sna sh s that iong-!ivod rea onl w fMo can use to reduce a rts.: This and oher epoch fcased mec anisms am described in additional dotal! haresn,
p#1 QS Pfstrifeuted L©§ Oteaner Process
pKH §SJ tii d berefn, log orsiht s corresponding to tfantactl n executed on data \n the volati d t : pages 35 can be stored In private log buffes 225 and/or figs s aoie to asoh nocte 20» SoC, «« 26, In suc Implementations , to take advantage of the high speed execyttpft of transactions on 'data in VRAM 30, various ir« l ^o«iat ns s arao ®w construction of t s srafiftei snaps ot 270 from tte execution of tro transactions,
;[Ρδ107| jn o e example I ien oiatieo, the construction of tie stratified sna shot 2715 can be distributed among the oorea 2S and/or the nodes 20. S eh- m $ a m include oistff&utsd logging, ma ing, an reduce to ® s¾ iitica% glean and: organize the many con rrent transactions axeeyted y the man ocessing sores 2S on the volatile data pages 3S to e sure sariaiteaoiltly of the. data in t e aomapo dini snapshot data ages 45 "m
i til iG, m m m overview of the mnstecferi of fte strayed sna shot 270, he cosstriictton :of the stetied sna sho.27D in the NVRA #0 cm be. b sed SoC or node s ec e poeh tog ites 26? correspondiog to the transactions peformed by ie caes 25 In the corresponding odes m on dat records In the wi¾tfe data ages 35 of the Inter-node accessible page pool Sio. lh some ipip!enientations, the e och log files 2& art
generated fey log -writer processes 2® in tfee eormspondrig nodes 20. Each epoch og file 207 csn -corespo d to 3 particular epoch |e,gu e particoiar ¾m period},. The epochs can be uniformly c an across nodes 20 such that each feg writer 26§ can generate an e och log file 2δ? for each epoch such, thai the start times .and/or t e sto times era consst nt a mes all epoch l g ties 26?.. i l Q giesne f process 1 to c$n t #n ®$m ® operations fcaseo* on lot epoc s to ensure seoafeablty of the ; transactions corresponds: to the log e !rfes when generating the srained snapshot 270.
£001893 Pointer .$«*» 0811 $3 At described herein, imm e control tochnt es osed In various Im !oroent tb s can bo optimistic and can handle scenarios in whch vofsffs data p ges .3$ are occasfcmilfy evicted fom 30. Thatm ' . when a volatile data page has not bmn accessed for scrae ps sd, as measur d b tlnio or um &r of trana Gioris, then It c¾n be deleted from rfteni t to free up $ § m the VRAM 30 for «w aet!vef used ttm pages, in sddito toe D MS WQ cm also drop a voiaiie d le: age 3§ tern RA 10 when it determines thai the voiaie data page W and the corresponding soapshot data pages 4δ are physically Identical to one another .
£ «1113 Once a volai!e data page 35 is dropped from ths VRAM 30» sohso ye i transactions may ari -ββ» too road only snapshot data page 45, Unless transaction modifies a data record n tlie snapshot data page 45, t orn Is 00 ed to create a volatile data page version of the snapshot data age 46. If the aosaota Involves a modifitetieft !o a dele record in the snapshot dat page 45, then the DBMS 10© ceo oreafe o Install voiaie date page 36 in VRA 30 based on the latest snapshot date page 4S \n
NVRAM 40, Hwmm, $m mn violate sarialzaolt her¾ other coRcufrent ra sacton ave already read the mrm sn shot data page 45>.
101121 To Mm ft* installati n: of na vafattife data p® 35, each transacted ca maintain a pofr¾#f~set 212 In dditio to the ntasd-stt 210 d wrie-set 211, What v r a m 23 extotftin&a safiafizab!e transaction fellows a duai pointer 250 to a snapshot data page 45 because there was no volatile data page .36 {e.g., the volatile pointer was NULL}, it can add the p ysieai address* of the volafte data age 35 to t e poinfer<«et 212 so thai it can peiferai veoffcatieo of the tuple: In th volatile data age 3¾ during a recorftmit process and abort the iraasaeiorf if Here h s b n a change to the iopte, Tha venfication can usa mechanisms of the ma$ier»tree data sifiioi e described In more dstai heroin,
13 For Ituatratioo u oses, the pointer->¾ot 212 can e desalted as totorj analogous 1» a node-sot dat page version ml m mm® In- memory DIMS)., However, the pomtaNMt 212 saws a different pyipoie. In ~m~t m®y D MS* t pw m of the node-set to validity data ge contents* whereas te temestalorts of the present disclosure can use he potnter-set to verify existence of the volatile data page 3S In MVRAM 40.. ln« mem r DBMS do et verify the exiite ee of new volatile data ages 35 because all the dat la assume to always & m the man naffiery,. Examples of tie present Mtsm protect tit contents of vdalte data pagss 3S with nieehan!sma adyd ^m ' specific dat stucfew described herein, oi 1 Va ous impteaenialons according t il® preaa n disc!osy r a ca red ce atte: de: cenniunseatens, I o that eftd,, a DBMS 1 DO can snelu-de two VR 30-rasiieft data page pools, O^e of the data page pools cm Include the volatile data ages 35. and the othe for caching snapshot data pages 45, 8oth data page Isalfer pools are allocated locally in indi idual nodea 20, in som examples, nodes 20 can access the volatile data an huffe ols in ether aodes 20, However, sn pshot data age eso! or cac e 130 can be restricted to allow only the local SoQ aocesa to mnimize rem te-nod c asses.
PH1S] Because snapshot data pages 46 m l M t the snapshot data page cache 130 n include several properties that di lrsgyish it fi¾ci after buffer pools. For t»m% an mm re-qyests a data ge t at has already been It la acoapalSe oasaatoo ly the data pa¾e is .redact and a duplicate m ge of the data p g added, to the volatile data page buffer pool.. In: most scenarios, this du ication of in occasional data page does wt violate cssre Uiess, nor de s t Impact performance. I sdfltlen, the byffefed image of a snapshot data age In the snap data page cache does not need to be uni ue. It is mi m mm if t e volatile data page buffer l occasionaly c ntains m i le images of a gi en data page, The occasiona extra copies warn o l a negligible arnouni Of VflAivl 30.;. and the. performance gains achieved fey x loiUng mtrn mmmmmu on the DB S can f½ tigni if t. These and other aspects of tie sn pshot each© 130 rc described 'm mere detas! hetafe
£001 33 STI¾ATlFiEO S APSHOTS 3117J Ai & £ mmf lis term "strained sna rssf rate to th data structure that can store an ar lr py numoerof Images or copies of fha data added to m changed "m volatile data ages 35 In M 3D In res o se to transasferis committed during c ws w ing time peri ds, or e ochs, Strstlied snapshots 270 can ce used In various example IfnplOinientaiPns to
and itpr ge efflciendes In the organisation of data stared i N¥i¾W & in partlcyfaf, strstifif snapshots 270 can be used to stem to and mtslwe data records f orft snapshot data pages 4§ stored In NVR 4 with reduced computational oveme d by avodpi co plex searches, reads, sod rites In data ages In RA 40,
;[0©1 IS] In same im lemenations,; the snapabot data pages 45 In Ili alratifled snapshots 270 are creeled or te log gleaner described herein. To vod the computational esource ex e se associated wfc generating a ne Image of the entire database h n fte snapshot data ges 45 are updated, the log gleaner can replace onl the modified parts of the database For ex m le, to chang- a a rec d im a parloiar snapshe data 4S, the og gleaner process m y inser a new data page that include the new version of
the record. To incor sraie trie now data page info lie snapshot data pages 4S, the pointers of the rel ed data ages can e op-dated.. For exam e* tie pointers of ancestor data pages parent data pages of the replaced data page) a u dated to oi to in© mw data page and new pointers am nffsn to the new data page to point to the chid data ages of the data page the new diata age re laced. In suoh im le e t tions* tre ion geaner can otitput a snapshot, trial is a single image of -all of all the data stoed in a particular
|δδί1¾ trt such Ipiplamontatloos, DB S 100 can cooibio multiple snaps ots o form a stm!iiad sna shot As described heren, newer
apshot ov© write some or all of older sn shot . E c snapshot cap include a com lete path t roug tie hierarc y of data p ges for every record In every epoch up to the time of the sna shot For example* the root data age of a modiarj storage is always Included in the sna s ot, and In some cases he o l c ge from the privsous sna s ot is a change to one pointer tha points to a lower level data pa^e In t e hierarchy of snapshot data pages 4§ T e oi t s In l wer l vels of the snapshot i t to the previous
snapshot's data ag s. O e benefit of such Im lem ntatons Is■.that a transactors can read a snge version of the stratfied snapshot to read a m ord r a range of records. This ohaisoaristios Is helpful In scenarios In which the s istepoe of a key must ha determined quickly,, soph as In 0LTP d tabases (e . Ins rting- recods Into a table that has rimary tey:. or reeding a ran e of k ys as a mora prablernatls case). Databases that «se phmitive:
trees CtSfvl- rees}, approaches mm he required to traverse several tress or maintain various Bloom: Filters for to ensure senafeaolllfy. The computational- and storage overhead in suc databases Is proportional la th amount of cold dala in secondary- storage e. >* hard-disk, flash or * rnernrlsiofs, ete.).< and not the ¾moiint of hot data in the primary storage |e; ., main merhory, D AM, BRA ^ etc,}, el 2©i As desc ed herein, the tog gleane process ©an include coordinated op rations perforniei by many c re in m y nodes 20,
Ho ever, for the sake of simplicity lis log §teanor Is described as a slpgi
com onent of lynctio iiy im lemented as a co bination ofhani m
softwar , tiihr m m In a mytt-ooe s stem 10 wits la?¾e arr y of VRA 30 and huge arrays of V' A 40, 012$ 1 FtGvSB e icts m example data flow of the inter-nod* log gleaner
•process H Q- s s o n, eac node 20' can geneate the epoch tog its 267 White only three nodes 20 are shown, operations of these thrsf© nodes 20 are illustrative of lit ir$ar~fi©de iog.gtea processes 110 th t Inolydo many more feocfes ,20., i S12¾i Once the epoch log Hies 267 are generated and stored in the
MVRA 40» th next st ge o og glean r process 11 can include funning m p er 111 and reducer 1 S rocess s. As shown In FIG., 68,. the waft* pnscess 111.can be efomed in each one of the nodes 20. Insuc
!ffipf mantatons, the m er rocess 111 can roa i s from log fifes 267 as ociated wife a particular # ©ϋίι. For examle the eper process 1 1 can read all of the tog entries for a s ecie period of time f ,g>f th« last 0 seconds). T e tmpp&t process 11 mn m se arate th log entries into buckets 273. Each bucket 273 c n contain a log entiles for s ! particular st rage a particular ο ΐοοέί of sta p ges org nized according 't particular data structure t es* Separating he tog en ies nto coffisponolng Pockets 273 can i duce ffertng log abi es Into -buffers corrospondtfig to stoages, in the NVRAM 40,· For exarn fe, the uckets 273 can be associated w* a table of eastene infsrmafion and the ck ts 273-2 ca e associated » database for enterprise wise financial ra s ctor .
|08123| Once a bucket 273 for particular st r ge is full the reducer process 113 can sort and partition the log entries in the. bucket based on the bound y keys for the storage determined fey the map e i l l Tre reducer process 113 can sand the artitioned log entries to line partitions 271 of the partitioned stratified sna shot 270 per bucket fbul24| In som examples, 'the partitions 27 can be .determined based on which nodes test accessed specific snapshot date a s 45271 , To tack which node 28 performed te last access, the -DBM 100 can Insert a ode o
SoC HmW the sfi phs! d is ages 4S, y oaptehni to locality of the partitions, the ma per rocess s 111 ca« send meat Jog enides to a: reducer 13 an t e s me nocte 20. \n s ch Implementations, the -mapper 111 ca send the l©§ enties to the reducer' uffer IS.
[Wi li Stn&HI the log mMm io the buffer 115 todudm a three-step co curent, copying .mechanien. The ma per 113 can in! res rve space ' th reducer's buffer IIS y stomfce!ly modifying the slate
buffer 11 S\ The mapper rocess 111 can then copy the enire bueke! 273 Into the t®m sp&e&ln.a single wile operation. Using a singl write operation ID oopy all the fb§ entries n fie buffer its can be more efficient than
perlDrrrisng muillpia write operatlsm to write each tog entry in the log
individually, Irs mm® implementations, multiple mappers 111 can copy buckets 273 of multiple log ttim to corresponding uffers S In parallel (e,g,:s v ≠® tmp 11 can eopy log entries to % same feyff@f 273 co ftyrrentiv Su h οοονΐπα oroeesses ca Inw v® wfofm ce of writes In a local node 20 and in remote node 20 baeaisse etieh copying em foe one of the most resource intend operations i OBMB operations. Fi aly, the mapper 11.1 can ata oali rnp¾lify' the. state of feoto s buffer US to
announce the completion of t e copying. For example, the ma er 11 can change a flag i¾t to indicate thai a cop to tie resered buffer space has been populated, tWiZQ} -Once the log entries art placed n the appo riate log reducer buffer 115", the' e reducer 113 can construe! snapshot data pages 45 in batches* A reducer can maintain two ufes. One buffer 11S for 'the current hatch and another buffer for the r vious batch 117. A mapper 1 3 can write to the current teb buffer IS «ntil it is full, as descri e** above. When the ■mrtmi tetefi Is lull, the rtdue 113 cm ato icalfy swa t e current and previous Patches 115 ami 1 if. In seme iPiptamentafens, the reducer 113 can then wait until a! mappers ill complete thair c - rocesses*
|<HH 2?J White map ers 111 copy to the new current bato buffer the restee can dum the log entries in the prevtous batof buffer to a file. Btfora dumping the leg ntrfee into tee iio.f the reducer can sort the lop entries by
storages, ays, .and sefi featiqo ordw epocii order and frppoch odinals, The sortedi log enries are also referred to as ¾ortedi~ijos,
C0S128J Qnm all ma pers 111 finishe , «a&h reducer 113 din perten a nwge-eoft operation OP the irftni batch buffer In VRAi! 30; s the dumped sortedkuns 117, and revious snapshot data pages 4B I the key ranges overlap. This ca« result n streams of leg enries sorted by storages, keys, and then seriafeipp order, wtiloh c n he efficiently applied to the snaps t 2T0> For exam le, the siraa s of fog entries cm e a ed to Ili stratified
snapshot ages -270 m featPlw y processes 1 .
|«1 SSI The term *map* Is esetl hsreln to refer to higher-order functions that .apply a given function ® m element of .a list, and returns a lst of respite. It Is often ©ailed apply-isnrtl whan considered In functional form... Accordingly, the term na e m to a pmm or module in a computer $$mm that ean apply a function to som number of elements te,g,, log en ies In a log ffe 287),
1081 i " educe* is term used: herein to refer to a family of h¾har»or¾er fu ctions that analyze a recursive data structure and moomhl e tftroug use of a gvan popi lppfl ini n the results of ecursively praoeesipg Its constituent parts, 0u¾an§ up a return value, A reducer prooes s, or a rtdtwr, called fey cwelolog a ionetion, a lop node of a data atr uctens, an poesf hiy some default values to he used under certain condtions, The reducer can then combine elem nts of the data structure's hierarchy, using foe fono!lon in a systematic way, #13iJ PIO, 8C deplete visual represeni to¾ of how Hi nods specific partitions 271 of the stratified snapshot pages are combined to create a
- pan e res rt n e ; s o correspon ng oo ea , e various -partitions 271 can b® k $ te on® soother through appropriate single and dual pointers 2S0, Suen. ointers can include the physical address In the VRAM 30 or HViRA 40 i local and mtrn nodes 20,
|0#1I2| Partfiioning ihe sfraiffsd snapshot 270 across nodes 20 can $ mk storage sizes and he aoid the expense of managing fine-gr ined Jocks. Pa rii oping es! be effecltve when the query bad matches trie partitioning cores 25 access partitions of the stiaifiei snapslat '27Q resident m the same node 20),
|0δ13¾ Use of snapshot dials ges 45 can <M " § ¾ complete new v rsion of the Key-value store or database. Instead, Hit DBMS n nmkrn cfeogss nl to snapifot data pages 4S t records or oint rs that ore char ed by corresponding transections the volatile doe pages 36. As stidi, the sna shot 270. in the N A 40 can m represented ay a composite, or stratified compilation, of snapshot pages 4S in oien the. changes to the nonvolatile data can fee represented b changes to the 4ml ointers 2S0 and their corres onding feeys,
£00133 FIG.. ?A s a flowchart of a method ?00 for executing transaction aeeordmo, to various iifn leniei!attes of the rese t giseteeure. Method 7S0 fee§ln at b 703 In which the DBMS 108 m m * ra saction reqyest The transaction equest e b® receive from a oser:t syc¾ as a client coffi yfingf device, a client a pii atfeii, an SM msi tiansaotioo.: or other operation performed y the OBfv!S 100. Such transaction requests ca Include Information r §ardin§ the data on which the t tM should o eate, for example, th trihiactte request can i duce m mp key corresponding to a artfcyisr fypie, in related Im le it t iofis, tie transaction re uester induce an identifier associated with a particular storage,
|001 S i In s m inipfestsentaions, the DBMS 100 ears assign the e ecution of the ranseotlon to a ppttatei processor core 25, in suoh im ems tatiOR ,; the selection of a articular core 2S can be based m
dynamically ckstomtei ioad^afanclng te nlqyss,. i i 3€ t h 7Q¾ the DBMS 100 can d t mne- a root data page associated itf¾ the I put key. o determine the nspt data age, the D:8 S 1 -00 can refer to a meadat fle thai includes a pointers to the root ages of
iwifi te storages. Tte met ata life c n ha sr¾ ni8€f If ka ^ loa ranges* sioraga Idaaifiers, or the Ilka..
C0S137J One® the root data pagals cated, te DBMS 100 n follow t dual pointer* 250 In ta t t page based ortlfie Input ka¾: at m 797, Each of tha dual pointers 2S0 can Include volatile pointer 2S1 andicr a snapsh t i ter 2S3, The voalte pointer 251 c n !ncyde a physical addrasa of vo p&m m VRAM m w a *NUll* value. Tilt snapshot p W#r .2S3.«an include a hyscal address of a sna s ot page 4$ In MV A I 40 or a ^ OLL" value. At de'i rmtnafiOfi 70S,. Ilia DBM 100 can determine ^alt of eol ti© volatile pointer 251 la NULL, if t e volatile pointer 251 Is NUU then tha
O US 100 can follow te snapshot painter 253 to the earrasp nding snapshot page 4§ in NV M 40s at Pox 711.. At box, 713, the DBMS 00 can copy the snapshot page 45 to install a orres onding voletita data page 35 In V I^ 30, To tack the locate; of the newly Ins!aiiacJ volatte page 35, the DBMS I OCS an add the physical address In VRAM 30 to a pointer-set s ecific to tha tra asctes,: at hex 7 S, Toe pointer-eel can fee used for varifloaisa of tfte typia in th# volatile data page 36 clyring a pie-eonmf p asa of the transaction and adort l:h traasacllon If there has oaan change to the tuple. f¾KH m If, at dsteroimatl o 709, the D8 S 00 deter mines that the volall® psnt f is mt null then at box 71 the system can fellow the volatile pointer to the volatile pa 4S Its V 30, From to 71 S or 7 ?, t e DBMS can generate: a read sat for tha tuple associated with tha Input Hey, at box 71 , At described herein, the read sat cap iPctede a version norr * sash as a TfD, that tna OSI^S 1.Q0 can use to verity the partlcalar versfea of the tuple. n soma implementations, tha read sat can also loelada tha actual tuple associated with tha in ut key, M 3S1 Sasad on tha typle< aodor other data, aeaooated wil the in lay. the DBMS 100 can generate a rtle-sei at to 2 Fo example* t ¾
tha tuple and a new TtO, Tha h£a~eei can ha tha result of a iransactlan that, Includes operations that change the tuple associated wih tha ay-value In same way;
m isox 723, fe m s 100 am begin a preasmmft phase in which -fau can lock t e .volatile age 3 andcom rs t e readme! to trio TIO ar*d¾>r tuple In the volatile data p ge 35. At detem nsta 725, the DBMS 100 can ana¾¾e tie oom hso oiW m i- i to the mni i ©f ilm t le to ftiernitne if there tee any c anges to t e tu le. If (hem ham be r ohang&s to the tuple, then 08 US 100 c n abort t wttmi transaction and
feaftempted fcy returning to hox 70? . At ox 72? If them Nava seen m
c anges 1» the hi te, ?h« th DBMS 100 n look tha volatile data pago $S and write too wrio-sot to toa vofati data page 3S. iWimi M ?2S, the P8 8 OO can generate a lag m y ftmQt to the transactors As dsseoha-d herein., leg entry can include Intoftoaiion regarding i s original transaction requ st, the originat input k«y, and soy other information perinant to the exec tion of the transaction, in same
!r teffion!stlons, generating the tog entry can include pushing the log entry into a oora s ed prl a log puffe 25. The !o§ « try n remafe m the e re s aeie private log buffer- 22S until is ptocmmi by tho lag writer 265, $142J PIG..7B Is a flowchart ef a metf*od 701 for processing lag entries from multiple cores 2S in mytipfe nodes 20 to generate a partitioned stratiiecf sna shot 270 ttetf 701 <sm oaglo at box 702, In hich toe DBMS 00 cm f O: i.fan¾>acdOsi log prun s- co r sponding to Mnsactioos ©rs oats . ¾ne volatile paps 3 Ih s ma im tern Mons, the irinsaotion log n$fe$ road fr m log i¾s 26? that inoluds tranaao!l n log tfiri#$ 1mm all the corns 5 in a particular nocte 0. Aaaofdln ^ the transaction log flat 20? c bo oafe specific, il 4¾i At o 70 , the DB S 100 can ma the log entries from the log lias 287 into buckets or euftore 273 aocerding to key ranges -or storage Identifiers,. In same implementations, mapping toe log e tries from to log ilea •20? into the haslets 273 can. &e performed in a distributed mapper process 1 1 &1 1 At hex ?Q6S the DBMS 100 can perillon the log entries In the tjuake!s 27 ¾ according to arious oroanijetion i methods In ne
implementation, ila partitions cap fee deter ined bisect on time eriod or epoch. Boxes 702. t rough 706 can a i peatad to ro ess addfertai leg entries corresponding to irapsa i rif subsequently executed y the DBMS 100. the log enlries. are. mi according partition.,, the DB S 100 pan copy the partitioned fog entries into the o«-es ondng batch Duffers 11 §, at ox 70S. At box ?10, the partitions of tog m can fee hatch sorted to g er t e single file of sorted log entries. At to 712, the DBMS 100. can generate a new nonvolatile pages S &aseci on the lie ot sorted !o§ entrits m t NVRAM 40» Etch of the ne nonvolatile data pages 45 can have a ©Sifespcndirig physical address in trte. VR M 40,
|001 iJ .At box T14, the DBMS 1.00 c . generate new ointers to the hy ical addresses of the nof olatile data pages .45, The new intes can replace the old pointers m the ousting $ nonvolatile data pages 4S, I m, pointers that use to point to old nsnvolaia data pages 45 h u date to paint to .the new on olatile date pages 45. M desch ad fcsmir*, bs old nonvolatile data pages 45 ae immuable and remain in NVRAM 40 nntiHhey are ph sically f l gically dels-fed to recaim the da storage space. Bo es 70S throug 714 can be re eaed as m m log entries art partltotd into the ucket 273,
{00147 Sna shot Cache
I&8148J Read- fy Ifansao cns ό not result in c ang s or updates to the data in the DBMS 100, ccordingly, to avoid the mrnpulaional overhead and potential el ys associated with retheving data from soapshot data pages 45... various implementations of the present disclosure can include a re d- nly s apshot cache 30, Oris example-snapshot oacoe 30 can include a scalable lirjf iwalght and hyffef pool tor rea¾ *nly sna shot data pages 45 tor yse in transaction kay-vaStia store in myll-prosessor ooir umg systems with h rid VRAM 3KNVRA 40 storage. Ttte data flow in and example snapshot cache 130 la depleted in FIG, 8A, White the technique for asing the snapshot cache 130 is described in r ferensa to -the use of the. hash table 812,
sna shot cache 130 m y also be applfed to oilier mtMm mec nisms for
SirPSSP f¾¾d*0:fiy daa Stf CtU .
gQ$149jJ The snapshot cache 30 can induOs a bufer pool, l« $%m % buffer o ! n m M functionality to ti mm 100 in wttieh it us®d< or o^a pfc, a Ouffer pool can be usee to cache t e data secondar st rage data pag s to avoid inpyt/oytpyt access tolhe secondary memo (ο,ρ^ Si© n 40), and m increase erformance tad i M of fee system, gOM SH| At iustratet, tt snapshot cache 130 c include a hash table 812, te i« sfi pshotcach© 130 rec !v&se £oad«ly aos&dto 810, it pan convert ins fey ioeiydoc m the transaction to a nasi* tag tn the hash table 812, The corres Of¾ii«g sn shot page ei§oan b$ retriev s from m® stratified! snapshot 270 nd assort d with the hash tag. In some
Ifpptementatfon , the snapshot page 815 con he amwMwi with a counter
Th mtmX B20 can be fncmnmntad or decmmenlBd alter some period' of time or mm&0 r of transacti ns. en the mofe $20: of artioyl snapshot page s 15 "in snapshot cache 130 reac es a threshold count (0,0, mm for ©D ne that art 0eoromont¾ds or a piodeterrmnod ooyoter valoa for compters that are incremen d), the sn shot page 815 can he e)eo¾d froro the snapshot cache 130. In ths way, snapshot pages: 815 that oavs not reconiy tse n uso can ' e ejected from the snapshot each® 130 to make room for other snapshot pages 81 S.:
QISI j In most instances, whan aaot w foao-onf transaction Bio
requests a Hoy, the snaps ot cache 130 can determine wttether a copy of the sna shot cache bm $ on iho ash ttis 812 Jf t e soa shot age SIS associated with a partoiar ke -exist in the snapshot cache 13 , than tuples torn the soi-pshof ago S S -can be CfOioJy read. If however, t snapshot pag SIS associated wit toe koy Is not 'already resident m the snapshot eacho 130, the eooospendsog soapsho deta agos 45 con be fshavod from the stratified na sho 270 and associated ¾wth the key in an appropriate hash location.
f i S2| In $ orns irriptenisntairo s,. data can transferred; f m V H 40 to the sna sho cache 130 in hlostcs of fixed si e, catted cache lines.,
Accordingly, sn ps ot pages BIS can te used as he cachejlnes, Wh n a cache fee is copied from fWRAU 40 Into tie snapshot et® 130, a cache entr can he created. T e cac e entry can include the snapshot d is page §15 as «II as requested wmm$ location the H sh tag),
δ ¾ mm a read-only trsnsasten .810 teds to mad a snapshot data age S associated with a psftteylar key from t e HVRAM 4% It a? first check for a corresponding entry In the snapshot cacha SCX The transaction 810 gaf ates the hash tag cor s onding to the Hey and ct o s !of the s psh a e 81 S associat d with the hash tag. If & ^ m §10 finds the matching snapshot p$ge §1§ In the s ia s otc o iao, a cache hit has occurred.. However, If the traosaelofi 810 does not find a matching snapshot page 81 S i ¾e snapshot cache 130, a caetia miss has purred. In the cas of cache ht, tm ms n n mmedi tel mads the data, i the cache !ne. In the case of a cache iss, the snapsho cache can alioeafe new eofry and copies In t e appropriate snapshot data ge 81 § from the US?W*M 40, Tim transaction 810 c then he com l ted using t e contents of the snapshot c c e I SO,
{001 S4 Exam l hash tables can include a hopscotch hashlhj sc e e. Hopscotch hashing If a scheme for resolving hash collisions of m of hash functions taote usi g open addressing and rs well suited for Irnple enlng a concurrent hash ladle, Th term opseotch hashing" s descriptive of the aaqu iic of hops that ehamcterlm the scheme s d to insert val es Into the hash tshlSi, in some ex les, the hashing uses a single at ra of » tiet^sts. Each docket has neigh&orhood of consecutive b ckes, £mh neighborhood includes a small collection of nearby consecutive byekets (e,@,, buckets with I dex s closa o the oflglhai hash bucket).:. A d slad pwp iy of th
fieig horhood Is thai the cost of finding an item In the buckets of the neighborhood Is elost to of finding it in the bucket Itself ( exarn te, by having Dock ts in the nai§hdonhood fall it in the sama cache line), The sl¾e of the na!ghtarhoQd can be sufficient to accommodate a logarithmic numb of Items In the worst case (e.g.., it must m mmo4 ^i^gn} H tm
and popsiant pmpw on verage, If mm® bucket nelgfibofhood is- fitted, the table can msrad.
|001 SIl in hopscotch hashing a given vaiua c n ba lpserisd rpo ami found- I the ϊ^ θί ού of its hashed tjueket In m word , it will lwa s fee ound sither In is oignal te ed array entry, or In one of the mx H-1 neighboring entries, H eoyld,, for exam le, &® 32, t e standard . machne word ska, Tha ne ¾ί¾οΛ οΐΙ Is m a ^tuaf puokel fiat has fixed s&@ and overlaps wip trio next H«1 ursts. To speed the search, e ch b«c at -aray entry) Incites ¾Hft«nate¾ wor& ap Mimap that Indicates w iah of the mat H~1 e oidea contain items- lliai hashed to t e mnt eftlry's virtual bucket In this way, an Item can ha found cjuieiMy fey ookng at e w d to sea which antries belong to the bucket, and than saaoPing through fie constant number of entries (most modern processors support special m manipulate operations tipl mate tha lookup in the ^ op^ fborsatioo pltroap very fast).
|001 SiJ In various Irapteaionaiops, ^o s foi hashing "mo es t e empty slat towards the desired &*ck«r. This distinguishes it fr m: linear r ing which leaves the empt slot w ere It. as found, passioiy far away from the original Pocket, or from coskoo hashing: thai In order to create a free bucket moves- an 1!®m out of one of the dassred buckets in trigs tanpt arrays, and only than fries -to find the dis lac 1 Item s new place.
|0O1 $7J To remove an tern from the basi table, it eon simply removed from tie ta la ntr * If the neighbo o d buckets are cache iened, than they can fee rear ganked so that items are moved into itta now vacant location In order to Im o elgnnient
|001 SSJ In one mpiemeniaSnn, the snapshot eachs 130 c n exploit the Iramotabllitypftba snapahot dala ages -45. Belays® the snapshot: data ages 45 and the corts ondli^ data pa§as BIS m the snapshot cache 130 are wfHe-one and raad-oany, the snapshot eaeha 130 need not handle dirty data pages. Avoiding the neecl to handle dirty data pages allows for the operation of the snapshot cache ISO to he simple a d fast. In addition, the snapshot cache 130 is tolerant of various anomalies that could cause sehous
|§#1 Sii Tte snapshot mm 13D of the patent dmm can teief te an occasional eaeha lias of previously buffered data page 8:15 whan a
transaction re uests tbt data page. The corres onding snapshot data page 815 ca siraply & read ag in. Saoh oecasloftai arises do not iolate correctness nor affect performance,
[O01f0l The bafferad version of snapshot dat ap© its do s not have f ha ynl ys In the snapshot oaahe 13Q. I the : snapshot cache 130 of the present dlsdosyre t is sta to occasionally have f © ©r m re mages of the same data page. Tt¾ consumption of RA 30 is pegllajble.,
fWISil in ant lmpfemsptatloa;!. the consumption it stmotired as a hash te 812, The keys of the tosh table 812 can inclu e data paga m ίβΜ^ sn pshot ID p\m at age offset) and offsets In memory pool.
t i2J T e hash table of FIG,. can be a hopscotch hash: fable, as gasoi&ed afeove,, fiat uses cae a fines. Searches of the mh M® aaardiag lo ma present ti ckmm il use a s1a¾te oaefe li read even when the snapshot c oht tm$ m&A mh? mi The ..original hopt colon sohew described above has non-trivial complexify and oompyfataal overhead to make it useful in a tylt oaesaor s stem, Ho ever, t e foil complexif of the hopsoofct! h sfiifig can he avoided in venous Im leme t tions of ttie present sdos¾a For exam le, saplanientatiens do not fake any loo s, instead, onl a small noro er of ( ^ one) of atomic Dp ailDai can e used for i serts and pa e are ecess y for uahm in one implaaiaaiaifor, read-onl transactions can only sat memor fences.
|O01 S¾l The: "hop* aoherne far Insertion into the snapshot cache 130 of t e present dlsdosyre cap be set to ©nly reatterapi the Insertion a fixed numb of fees (e.g., only mm), For exam le, whenever a CAS fails, trie system can try the nmt bucket, thus limir^ the maxlmom number of ste s to a constant The Insertion schem can als limit the number of hops. If the number of rec lred hops s mare than a redetermined numb r, ine the new entry can b® inserted into a random nelohbohaa backet. While this can cause a eactie- miss later,, there ll be no violation of correctness. As such, the snapshot cache 130 is wait-free and tosk rat, swh thai It can scale to a mui~
roce s r s &rri 1 with l fe to m degradation of peribnisaoce. Tnis- can improe the simplicity and s eed of the other ulfer ooi sefiernes,
|W!S j FIG- m a fWsat of a method 800 for executing a trer&apf rt using; a snapshot cac e 130. ethod 800 can egin at & x §01 , in hleft the mms i c Initiate s iwsastio Atifetermirtafers SOS, ib& DSNS 100 can teten irse wheh r transaction is a majoity tan actor!. II t
transaction is not a m^n! tam w, m tie DSm 100 can Hrtcf m root page associated wit* fit key of ft tansacto nd Mm tfw «IM¾I pointers.250 to 1M t t target tu le, at box 80S, At this o t m DBMS 100 can execofe the transactos osi g various o!i pi®mmi&®$m$ ot tfta esent disclosure. IIS^ f ever, at deteminatio 8133, the mm 100 detemin s thai t e transection i$ re di-Qnly tfeosaclton, than at hax 807 the DBfvfS 100 can elite*: to toe t iit fety exists In the sna shot cache 130:. Cfweksng to se If the k«$r exists ' the snapshot caefce 130 can indade gabl ng a ash value feted m the Inpyf y of the transactiom m4 &Μΐ® io see if data p®≠ associate wftfc a hash m exists. If at deieniiinstion 807« the DBm 100 determines the e does not exist in the snapshot cache 30s t en It can install copy of the sna shot egs 45 associated with t e key io the snapstat s t 1305 and ox 809, Installing the espy of t e snapshot p ge 45 into the sifta s ot cache 130 san include aecesslhQ the snapshot peps 270 to retrieve a c y of $ snapshot age 46 a a associate it win a hash value ^ae d on th$ ke ,
c py of the snapshot data page 45 associated with the key copy at bm 30% then the DBMS 00 ear? read tuple associated with the key torn the copy of th snapshot data pap 45 in ths sna sot age cach 30, at b 811.
|001δ?| At ibe .813, the DB S 10 can set or reset a counter in the snapshot data ge 45 o indicate a recent access of the snapshot data page, for exam le, the counter cart include setting art Integer l of a. maximum numb r of sna shot age cac 130 aiCc ss e of a expitaison im .
Aecerdingr^ the eoyntef can im m m or dacra ienfad according to the number of tiiT58s the sna s ot cache 1.30 is accessed or ased on sornii duraionof ifria.
|0§lfil At box 815, tt mm 100 can ir*cr#mtMthec0Ufiief for snapshot data pa§a S stoe In the snapshot -cache 130» As debited herein, the counter cm b® i cremente henever the snapshot cac e 30 Is■■ ccessed or pas o?: a running clock. In related m l#ine:rjstto ¾, it DBMS SO can incmrnerit a counter lor other snapshot data pages 45 In t e snapshot cache 130, At b x 87, tre DBMS ® ζϊ snapshot pages 45 frorn the cash with counters that aw e ired or mas d a threshold value te,g ,f re cted m a decrementing counter or a predetermined value In an IricrepienSng eounterf. The method can begi again at counter 801 and actions described In boxes 80S through 87 can repeated la soma im lementations, box 801 can pa n regardless of where DBMS 100 is In the prass of implementing the aefe sl bmm $0331?.. For example, DBMS 00. cars Initiate a m»
Instance of method S08 white executing the previous insta ce o a met od 800. l Si »ata Stractafes f«1?«| Various data atrpcipr s ave beep referenced to describe exam le implementations of the restritdisc!osHa, Far axampa, m
im lem ntatons of Ilia rasent d;iect©s«re can be fully realized using data structures- in the dual memory configurations that inclede V¾A 30 and mw 40. Specfca!!y, significant rrnpmvamanfs ca be realized b DBMS 1 CM) using data stroeiores suc as B-lree Tree, ss Tr e, Foster B»Tmes and the like. Howe er, additional improvements can be c ieved by using one or mm of the novel data structures desc bed herein. Descriptions of eueh data structures a« desci ed; In rnofe detai .below In reference to specific exam le. Some example date ©fractures can Include master-free,
append/sean or hea and aeriaiiafefe has -Wan d ta structures Eaeh of these exam e data stmcteres are deecfiped In dotal! in ccrraspopdlng dedcated sections of ®w disclosure.
|§#171] Mas$er»Tts*
[0?1?¾1 As dascnbad herein, examples of the i¾aant dsclosure can use various sdfsga t pes, afso.fofofftd ta tm daa str stum 0» particular data siarctura, referred to hsrtin m *m®®m~ * t e data structure c n e useful i scen rios In ie com lex Iransacfen® ar desired. The term master~tre© Is a portmanteau of the -terms *m$ tree" and "fo iB- m*. The mastertat dais structure 123 that oa« InsMe .a .sm le and h*§ » aiferm n€e OCC for in systems sitni!ar to s tern 1CL aser* ¾r e- can. ai¾*e f©wie ¾Ϊ?ΛΙ§ itwaiMo&a ¾o &ins y ^c¥sou c a «oi «ιη rady«e atKsrfs/refeies , Tt¾ mssteNree dat structure 123 can alto 1st tmfui fm mm . s&rmd to m nd process data recefds associated ranges (e.g.-! custoraa pufeihasa istoy for varous range of products! can fee nefit from the use of dual data stored usng the niaster rea ty e data stucture
pH? SJ As descri ed herein, the ?na fif~ e data tucture 23 is a tree type data stwc&re wifr? characte asi s dd featurts ¾¾at <m effSefc nfly .support various older aspects of the present disclosure Including, hut not !lmled to, NVRAM 40 resident sna shot data ges 45 ar*d OCC, For example, Ida master-tree 23 c n support ke range accesses, ase e 1.23 can alee include- strong Invariants to sim lify S» OCC protocols des lted :hai¾lo an reduce adorts ami r taes, eete^tre deta atfucunsi 3 can ■Mm Include mmnmmm& for- efficient snapshot etch® 30
can fe done as efficient 64-bit integer comparisons with on a few cache line f tches .per data pa§® that mad a as further dew whan toys are longer than 84-¾t W en a M data age is tpft, a fa d*0op^a da!a ( CU) Is rf nmed ID create the. two ew data ges wth c« pondf¾ keys. The ainters from: the are t « page can -then fete updated to point ¾ tfi new data ages. To allow data page-in&ut for volatile data pages 38 In tie A^ 30, ex m le implementations can use foster B -tr type mac ni rfi . To data pag«out Into the main meinory, various ti dy e dat structure mn
inclu e handing m\M≠® toeing pointers par data a such ¾$
nextips jparafrt ointers in add on to te pointers from ent data pages,
{0017SJ in a: ata ase with dat page-#out of main memory (e.g.. A 30), multiple Incoim g pointers may -cause issues it ooncufiiecy een ot Master-tree data structures c n ffl siicr* issues using fester-cril!d ty e data page s te. In foster-child type data page spits, a tentative parent-child relationship it tm&t i and Is su se uently de~t$nfce d when ths re p erf data page adopts tie fosler«ct¾ M $&f*tree 123 can gua ntee a singla Incoming pointer per data page with this approach and can t eft retre the old data page, f«1?§l ast ~!fep 123 also m$ system i m ^m im mt m hysic operations. For example, i serting a ne roe-orci can Include exec«t¾i a s s m transaction that physically inserts a logically deotsd record of the ke with swlicfen! ody length and user i mmtim that ioglcaiy flips ths deleted data . age and instals t e record It levari* noting that system f aesad&ns are useful when used with logical logging, not physiological logging. Because .a s stem transaction dots not ng logic lly, it does no! Iiave to: write out any log enties or invok log manager, A system a sactor* in Impl mentaions of tie resent setosyre ©a fo reed- aei nt *set and folto th same commit protocol as used in other
tansaclops,
P0177J mplementaions of the present discosure ce« include light eig t I - age sisisfabie concurrency control In databases that use dynamic tree data stfuetyres (o.g., maste^trees, B4ra#s, te. in which the size of data pages Is ynltarm (e,g,, 8KB), and t e data pages can be evicted from VR 30, In such Implementations,. er-recordpor uple garPaga collection Is u n c ss y,
78] Some D8¾/IS use out-of-pa took m nag rs, others use some form of In-page concurenc cootroi, Ou-of- age central lock -managers' look logloal data entries fa the data pages. Such systems work even If the data page Is evicted !ioeayse there is no locking mec anisto in the data page Itself,
Bowew. ont-of- age lock m na§ers do no scale well bec ysa of the associated high computational and
of complex CPU cw ,
|001 ? I mp tmni& m of the present disclosure iristaad urn trvpaga leaking mechanisms and eorscyfaacy contra! trial mn t* sc led and used in myitHaooossof systems 10 with uge V A 30 and even iw§W V A 40< irs-psge lockng c¾n scale or^is of magnitude- d tier in Sori nos in which feeling ould t the rrsain bottleneck, as encountered In \trnnpo jf mM^p compuing t tan i[«1S¾| In- ge locking mecharsiarns used in various implementation® of the presentdisalaaure use a tester-twin mec ism rimer than a fost«hild m chanism used In mm conemnoraty a^sfenm, FIG, SA illustrates an e am le of an insertion m4 adoption using nwecf-olts and fpate wiiia, according to impferaoiiiattoas of t resent discl sure, fOt SiJ As s ewn, a storage cm include one :parant fixed sk data age 9i0~l and ® child fixed size dat page §¾~2. The relationship can M det iniined by a oste in the parent 050-1 iiat oints to the child »~ , Sas yaa tha data pages 9¾ n fxed m, whan tha chid S50~2 s Me an attempt to erform an insertion c n i the Qh8d o split
When the c ld 0S 2 splits, tha TiDs of all records in the child' 060* "2 can fee marked as *ttm®f and tm foster chl ren, or loate^twi ",. data pages can be. created FpsteM ins can inelude a minor (or left) foster, chid §5®»3· a d major frlphf fester chid 950*4, Tha mi or foster e ilcl §5D» can Ipolyde the first half .of toys after tha spit (e¾g,S: 1 to $), while the tm&r foster c id 960*4. can ineluda the second half (e,§.:i 5 to 10), The major foster child §¾ la anaieg ys to fke foster chid in a loafer & s ty data structure, while the minor fester child 950-3 can &e a fresh-new copy of old child data ge 9§0-2> before or af far compaction.
|001 m At th ba iinln§ of the s li, tha old child data page 960-2 can t?e maked a *mcmt f which in icates that the old child dsti page 950-2 ia not available for suhsec ent modifications. In one example, marking the old child
data page 60-2 as m $ cm Include salting m m- s M to W, During t e next traversal :of the data sirycfem, th« arent data a 9SQ-i of i old, or *mew f\ pag 950»2 so fnd the new feti H irs ae page §§0-3 m 9S0»4 feased Oil: g* ne ponts 93S-1 and 935-2 in the old child data p ge SSIKL The parent data page 950 can then adopt the ajor foster chid 850-4.. To adopt ha the paren data page 950-1 adopt: the rnalor foster chid 960-4, the 0 8S can to the pointer 2^1. to t e old chid data page §50-2: to point to toe m¾w f se child 950-4 and mark the old child data pap §S0~2 'etied .. This cam Include m ® P®M*m S45--1 and 945-2 In the i:r#nt iSO-1 ointng to the mrm physical location of mino foster child S®-3 and major foster chid » that pointers 935-1 nd 3« did. The ointer 925-1 torn the are t $¾M to the od child 950-2 can t®. phy sic iiy or logically deleted' torn tie parent 9¾-1 ,
£0018 j In mfiwB \m≠wmnMDm, the nias£©r-treefype data s!rocture 123 can be limited to o e i comin ointer er daa age 950, thus m can oe «o reference to the retired data ges m child 950*2) exce t fom: concyrrert transactions,, During t &t p - mmli wffy phases §35 of any concyrren traneactlcns, th WM$ 100 can note the "mo ed* Indication In the records and track the re-located records in the fost nniinor or fester* oiafor children 9S0-3 and 950*4..
¾*¾il«¾ UfiS ll «11 s «;<c .:U¾d ■¾¾>
X .:;>:¾:.¾:::;-: ? v¾ da it. ^ ld* :is~i&>f®&il w^id
:·.-;-■?:..:.·>. --c-.- .-i;:-; ;v .·:·.: *. n ;-.-¾-:¾-*■ ¾ . y ί* ·.·..·; ,:.\·ί Ί
S rt C k.-y y l.¾se e
iSK- sc s € V-i -.;-.:- x-y ¾f, i-sSi x :*: .:..!. ¾i-i:C¾ Sims
¾¾s& ¾v>:-i¾.f i§--ss-ss-?sd I ί s:-::-: ί §11 lews, sss
■ccr,..-;
r; ;i * i-t- ;·—·>·-:¾ -¾;·ν; :·: < sss¾:;:t.;
[Ml 8T| T e above ixample 2 Illustrates a commit rtoc l according o vadous exampl implenienteions. in contrast to Ex m e 1 , the n w location of a TIP is detemiioed usfag the fose-t in ch^s wen the "moved &ΙΓs observ d, Tfte tractog n b perfomed without kjcfcing to avoid deadlocks, The resots can then be sorted by address and cor msprdlng !oo¼ can to set In the case in Wofi split ecomes state, eo«yi¾«t transactions sm split the ohld age d ta page 950*2 agai , .thus movng: the TIDs again. n such cases, locks art reta.ased and tie locking protocol, can be
stmetyes can mm** fhait at every snapshot data age 4§ lias a stable k y- a ge for Its enire life, R gardl ss of splits, mom®, or retirement, a snapshot data page 4§ can oe a va!d ata pa p lng to precisely the mm set of records via fesfer- ns. T us, even I soncorfent transacti ns moved o mm retired data pages, It is not necessary to retry- from te root of the oe as is te eas so ass tree d foster 8-tree type csts sructurs,
| iSl T s property mn sim lfy the GCO described hernia In particular* em is no rse«d for snd-o^e-hand verification prooooSe or .spin-counter protocols for Interior daa page as there is lit mass m®. Using nastef ree, the system can search the tree ¾¾ simply reading a data 'page pointer, and !ofowins it without olacJng memory fesnees* The DBMS 100 can just cheek the key-range* w c mn toe Immetaole m ta ata corresponding to the data page, and locally retry In Ilia data oago if It does net match.
H§l¾ Such simplification not only Improves scaia ilfy .eliminaing retries and fe ces Pot also makes .use of master-tree type data strucSores 13 more a maintainabl no ^Iocking data structue Nonlocing schemes are more scaabl i many processor Iniplemematleos, however overly complex
fioi b!oeking methods thai use mm atomic o erates m$ y fmc n e ifor-p'rane and difficult to im lement, dabygs test, or evaluae- aorrectr&ess, fvtost no -soaking schemes often contain bogs t at are only m&feid. after a l §am of d tabase us . Thus, making the commit:
protocols process simple and robust be eficial for building raal database systems* nai , oint out that fhe idea or foster-twins c p he used in •other dynamic tree daia stryetufes,
p&lf 1] FIG;. SB s a fl chart of a method SOP for Iniorting. a new key or data r cord no a nsst r-tm type data stfuctnas y splitting a data papa using mo ti- M and foster twins, ^ i od 900 ear? begl at box S02, In l¾¾3t¾ t e ΒΈΜΒ 100 c iniiat® m insertion of a twos® i to a ixeP size leaf d a pag associatad witb \t kay range. Ip seme scen ios, % fixed s¾e feel data page may be too full to as ommod t© %m insertion of a new e and ass ciat d tupla,
PHS2J Accordingl * at ox 904, Ib DBMS 100 ca? spit the to ange into two kay aybranps, The two key subranges oan be o al or ype uat foxi r twin kay sub ranges, f«1S S| At ox 0», the m 100 esn copy file tupif e ft m the original ted $m leaf date ge associated with keys n he first of the toy subr nges to e new tad a§¾e leaf date a ?, or "mner foster t > The mm ted m taaf data page .cm e associated with the first ofi a key eebranf as. At Mx mM.> the mm 100 can co y the tuples associated win the second kay sobrangs to another e fxed si¾e leaf data page, or ¾ajo foster Mn*. The second ne fix d iml dat¾ ge can then be associated with the second of tbe key subranges,
{001943 -A to 910, the mm n lip a oiove«t and Ipsal pointers to tha new ixed siio laaf data pages in the old fixed $i ieef data page. Blpping- the mo ad-bif can include wf ting an appropriate bit to the eid fixed sfe leaf data page, instating pointers to the now fixed size ieaf data pages can isickid writing the address of each of the new ted si ed the data pages or other indication of the ph sical -location m Use memor to the old feed sis d ta
papa, The onters cm also be assocated with th¾ fce subranges of the two new fixed sfee leaf data pages.
{0019SJ At te 912, t e psimtm to Urn- mm m$ mm leaf pa s can 0e addod to fh pmm 'data p of tho old fixed tesf -data p ge and associated ilii tie corresponding! key subra ges. Acc r i gly, ts pawst data page of tho old fw$& site© lea data ge oan adept the minor foster t i sod the major faster twlp y eleting thi pointers to the old feed » leaf data age associated with the rigi al key range, at. to §14.
£0019 ¾ Sarlatebte Hash index
![ 01S?i in various impleme tations* th data structure can include a sahaJIzable hash Index that Is scalable for use in mutiprocessor ystems with £*g» RA 30 sod hype NVRAM 40 arrays com iling svstom 10), The hash ndex data atruotyro sen ho ysed to orfatto tho boifs volatile dita paga¾ OQ sf¾3 smapso t crata papeis , *η· t>ome s ipi^n& * t)o $< tne na&n Index can allows se ot different lm: ¾meniiailans of OCC.
iltSJ FK¾, SA. deplete an .example s^riafeable !msh ioddx 1080, As shown the oxampio hash Jndax 1000 can be to te form of a .iree-lypa data structure sfiiual pointer 250s h VRAM 30,
imh inctex 1000 oan indude a fixed size n mfeB of layers or levels. While mfOmnoo It ma e to volatile pages 3S to illustrate v rto aspocta of th* senailzabte tosh Index 1000, it should ¾e mm fi¾at the hash I dex can also oo viewed from the perspective of sna s ot data pages 45 In the VRW 40, The dpal pointers 2S described herein can p©W to data pages In either the VRAM 30 or NVRAM 40, as described heralm
i i As lystratetf n Ihe example «af½Izao½ Imft ndex 1000, nod volaf © data pages 38s sueft as voume data page 3S¾ 35*3, 354, 3S*S, m$ %5~B, eari include dual po ors SO thai point to volatile data pages 3$ and/or snapshot data pages 45 data thai are associated in specific ©oSleeflons of hash values fe.g..:: hash buckets of hash values}- In such implementations, the hat values can be based on the Input tity Included In a transaction or transaction re uest
P32I01 trvse s ex mples, \i root pigs 35-1 and/or the -node ages tmy only Include the dual onters 250 that uMmately.le¾d to the leaf pages, in such m temsr¾»tens:s the feat pages, such m f 38»7S 3S-8, ¾ and 35» I D can Include the ata '(^ -* u s ve!ti#ss or data recefds) ass ciated wth t e fcsy ^n t e has value., Accordingly, it may' be unn c ssary for the leaf a§es to include dual ointers 2S0 bsoause they may oo m the k y t>r which a transaction 'is .Searching.
O I] A variable nambe r of u er-lewl daa p ges 130 can be pinned, or declared that they al ays exist as volatile data agea 35 in VRAM 30. Aocoidintfy, all of the dual est rs 2S0 in the higher le el volatile daa ag s. m 03 ess t immm &u to the level n le l mm md loss. s sucft, me higher le el data pages 130 can be installed: In the VRAM 30 of each nods' 20 In the system. Acc rdingly, data pases In the yp er level 1030 can th s be used a® sna s ot cache 130.
O2021 In me exam le shown FIG, 10A. with≠i m last: tevti 1035 i mm a thenod toeai VF¾W 30:i DBMS too may need only ert rm mast ers© rem te ode 20 data access for each data access In a transaction, Because this can sortsti e a fm% amount of VRAM 30 .g., m m ry fe iisd to niaitski the snapshot cac e), the num er of levels ptfinsd In
RAM '30 ears he vanahte based on input or the specification of the eom utng system).
WZmi ^ 10B Illustrates an ex m le data flow 1001 for u ing iie seha&abie h sh n ex W, Whan a sore mnitiates a tra sactio t.OOS. It ca include indications of an operation and a koy ojme en i g: to the data or* which e- o emioo should act.. A bas ¾ coda? can generta a hash value aedtor t¾ v lue ased on the toy. Hie mm 25 can then execute the tohsastot 1015 that includes the tosy, the hash value, a d the fig valum. 00201 o execute the Reacti n 1015, ti sehafeahle hae index <sm be searched aecoftilni o the hash value. For example, if the hash value Is «r, then the search for the key esisted In tis ectlon 101S can txeouta hy foliowieo, tte hash path 1020 through dual pointers 250 lt volatile ages
and 3 2 fiat point to volatile age 35 (or Its equivalent n iie snapshot data pages 45} that contains the fcasis bucket In which as alue * is contained, imz Each leaf data age: to whch tt deal pointers 280 point c n
Induc contiguous compact lags of all ysical records in ® le f data pago so a transaction can efficientl locate y &f t itw a specific tuple r bably e sts il ne ©sciolism, in the parttcyfar ©s m sho , the eaf page 3S~ 4 can Wtw3® a tag bitmap 1Q2S that can . ost® a probability that the ke & located In the volatile daa age 35 :. For ex m le, lithe tag value generated base ©n t input of the transaction is not n the tag bitma 02 , then t e inpyt key is dsMtel* not o lwd jo volatile; data ge 35-4, However, i the fag value s included Irs the tag 025 then there a a chance feg.,, pmbadlly » % that the input k^' i m in tie leaf voiaii page %5~4. fS2f §1 The traf!is c n can than search the volatile data page 3S - for the corr s o ding iipl tm®4 on the key. n ease there mm mm data records In the s din than partioyiai let! data age can tod, he teal data page can be associated a (intend data ge thai Is actual to or larger than the c city of the teal data p ge, la suc Implementations,, the lea! data age can store a "next-data page painter* that link It to another data page. a su h, additional data t cQids in the ash bi can then stored in t e inked data pape and share the hash index and tag tabl of the original data page,
|0028?3 For example, If the data contai ed associated with the hash bin In the volatile data page 3S- to ha larger than the s ace available in the volatile data page 35 , than the DBMS 100 can lostaf! a ointer IPSO that can point to the location of a Knlted v laile tafa page 3S«?.. The Inked volatile d te pages W can Include another pointer that points to another Inked volatile data, As such, the linked volatile dat pages 3§ can he chained together to further ncrease. tfce capacity of leaf data, page 3§>4, As the laat linked volatile data page is filled, another page can be added nd corresponding pointer can fee installe In the preceding Inted pag ,
tW$m$ in related imp!areenta&ns, tha dual pointer 2§0 in leaf votaila age 35*4- c n also include a s apshot pointer that points to the snapshot data age 454. Similar to the ccnlpfatlofi descrfhid the kay can f«nd
(or not fm ti) mm® the lag bitmap 102S im$ keys In the sn¾ fcot data ¾ 45-4..As above Hi® leaf sn shot data page 4S (e.g,s η© -ν®Ι£ί§δ data pa§o cn expanded Oy adding Ink ointers 1050 that olfit t Inked soaps i data page® 5*7.
: ¾20ii Various example- Implementations tftat yse a sehal able hash
conir f for us® a mM- pra m ϊ Μ menwy mpi&n system ID, in one e¾anipte
Inipteraenlatiors, to m i a new r otd with a n# associated k®yf the concurrency control car inofucSe system tmnaaction that ftroyg sh path 1020 of node dat pst®m to a leaf page its linked chain of Inked data pages to sonfirm tat ther® ¾ o p ysc l record (deleed or rio) n the thai is assci ted: ith the mm Hey.
2i01 If no identical k y Is found in th chain, then th s stem can arfcmi a singte eomp«*«!»$ ¾ (CAS) operation In the last linked dat age of the chain to t rn spaoe for ih« e fwnl that is to fa* assci ted with the m key< If e CAS falls, the DBMS 100 sstem can ead the newly Inserted rtcoid win spinioeks .ort TID (am! it Is marked valid}. If the inserted key is oof same s the k . Ilia sysem can try again . f the GAS stieeeeds, iha sstem can stars the ke and tag a nd hen set TID to tie system transaction TID with valid and dieted fla . E ocuto of user transaction cart then try to flip the delated flap a d fill i the paylaad of e data record associated with the key usig a commit protocol,
CO02S 3 o delete an existing ke , the system can simply find the data record and logically delete I? yslog the commit protocol, in some
Implementations* logically deleting a data record can include simply Inserting or f!ippihn a a¾ialad il §:.
33:1 To ypdats tt ay bad ofihe data record associatad it the key with larger data than original, such that tit rec rd m tt he expanded, the existing key does not oeed to oo deleted, instead, a marker ean fee Inserted Into the existing; payfoad triat poi ts the search to another key, referred to herein m a *d«mm key", inseted to the chain.
!p213i Us© of Ids has 'index described Hem can mm tri al a hy ic l moord's key is Immuabe once I Is created. As suc , the count of pi stcai rp orOs can be sal to only increases and tho muni of physical records In all feutthe last data agas of the chain s Immutable.
00211 As ft tie otter data structures of the present dlsctosura, records stored In the hastt into tahli described herein can is® ^fragm nied rd c mp cted skipping logically delaiad records) during sn shot conafrycilon. The unit at logical equiyaia«oe m the snaps ot/vefeiti® data page dua ty Is' the pointer 10 the ft* data age,
f«21Sj T he pamtionlfig p liy associated with each data page can he dft minetf based te number of records §n the ch in that have T!Os
Issued fey specific cores 5 or SoCs In corresponding nodes 20, Thus, if the majority of the ecords stored in a chain of data pages are as ocia d wit TIDs issued hy a par eyiar $o€y t an that chain n he stored In the partition of tie sna shot dais pages 4$ resident m trie V m 40 of t e artsosiaf nod 20, M such, the ha in e , data page structure and date pag¾
hierarch aifows siatie hash feuekots to he stored in snapshots, thus mora fuify ® o city of iu m 40 array 40.
I001SJ F¾d #rmore, the csc s §ne-fri#ndiy data ge layout of the hash tibl inde ta e can Incease imp rfcrfnanoe b1$ D MS system 00 in findi g a partlcylaf data record e,g.s a tuple). The node 20÷aware partition helps loeata the data cords In each hash acker, in the node 20 fat mm mem the most,. thus reducing the numbe of remote VRAM 40 accesses necessary to mtrfeve specific data. The concurrency control protocol
inimizes rsad-set/ h'te-set and ro kes almost all o eati ns' iee!c-ffae exoepl the last pre^ommi, which is inherently blowing,
1002 1 IOC is a flowchart of a method i 002 tor using a s»at¾*la hash irKfax for execoilng a transaction m muitoons compyting system 10 accoding to various example Implementations of the present disclosure* Met od 1002 can begin at box 10® in which tie DBMS n generate a tag and the hash value oasad on an ipput key of an associated transaction.
Generating tft® ta§ and !te has vate can include @*® Α¾·& lag ernios routiaa -. &ar executing a hash km generating reti ,
|0021¾ At aox 105$, DBMS 100 can h ges in a storage lor data p%®& ssociated with the hasp value, in m example im lementatio , searching the data papas ia t e storage ca« include traversing, th
hierafeffcal structure !«.g. a trae-t pe structure) ©f data ges associated wit various ranges of hssh values. One® a data papa assoaiatad with ih as hm foends tiw DBMS 100 can com are the lag wit? a tag bitmap 1025 in
iwmi in various lm fei!ief¾tsi fi :!. tle tag mms csn include probability sc«s that il Hay en which th¾ lag is baaed might fee tpand in he data page. Accordingly, at datefoiinsiion of 108§, the DBMS 100 can €9mp re t bitmap prob bilit to d t rmine hethe the key prosahtv exists In the data page If $® b ilt indicated m the ta¾ bitmap 102 ndicates m probability, then the DB S 1 0 can determi thai- the key does riot exis In t e data g associat d wild the hash al e, t box 1070,
f«22¾J Based on zero probability ft the tag issmap, impianmntaiona of the sent disclo-sura can ppjsftfveJv d^fermme that the ke does hoi exist in the storaae. However, if the bteap prohaMity is geater than zero tha the key exists la the data ge, tsen th D8&IS 100 ears search the. data pa s associated ita the hash value fey the input key to tied the t rget tuple:.
However, because the ag bima 1026 can return false osit es, out not Mm egati es, de m B 100 can determine whether th ke associated with the tap and/or tt hash to is found ia data cape, at determination 1080.
C0221 if Ids key asso iate with the teg nchor Hash vatat Is not ipytid in the dais age at dilarniipatiw i øøø, than, the DBMS 100 can determine thst the key goes not e¾lsl m the storage, atijox 1570.. However, it D MS 100 can deterrnine that the input, key exists in me data papa associated with, than the DWS 100 can access the triple associated w th input key in the data age, at box 1085,
p3222| W !s the a ove desetlp!ioo of meted 100 as described io refereees to generic data ages, te method can fee Im lemented in storages In V AM 30 and NVRAM 40 using ^responding vol llss data paps 35 and the snapstiot date pages 45, f«2 Sl A pend a«d SPI« Only Heap Data Structure
£002241 Same emwmpw®iy datab se manag r e t .systems Incfede data structures f ^, Microsoft7*8 SQL-Server). Hottever, c systems usually also aas tna general ccesses, seph as read via secondary index. As a resolt their scalability s Iniied In niutti-cora environrnents ike co iling system 1 ,
f«22§f f sk-#t# grammi g thtm am seveal look^ree Inted ist data str ctures that can scale better, however, s ch structures do not rovide sahaiteafe ty or capability to f NRA
snapshot data pages 4S), In addla most a If not all, eoptep ^ datafeaa m nageme system are pel o tlmfeed far epooh-feased OCC w
:[«22S| Implementations of t e present disclosure c n include a hea data stmctyrp that can maintain a ifiiaad-ocal (<¾¾ node local) singly linked list of volatile data ages 3i fer eac thread fe.g.t ea¾ii core Beginning with a start or head data paae in the linked 1st, eesh data page i the linked list can Wads a pointer is th® tosatiop el the nsxt'c&ts page in the finfotf M. m tni temantatlens can mM when logging targe -amounts of sa entiai dat , such as lodgi g electronic key sard se re acc ss door entries
Incoming telephone cala, highway FIG, 11 A illustrates exam of he heap date structure DO that cm Include multiple Inked lists 1 01 of volatile data pages 31,. The heap date structure 1100 can include one linked fist 1101 lor eacht sofe.2S> Tha beginning of the each linked 1st 1101 is obsignated fey a start pointer 11DS Inserted Into a velatiis data papa 3S in the list. The start pointer i 105 sm m m4 to limit, the amount, of s ace us d m V;RA d m portions of the ftoked list 1101 are Pck d to RA 40 during ana sinom. i[«22?i Each core 25 can append pew key-value pairs {e.g., data records or tuples) to the and of the !ipked Hat 11 1 of pages 35 without ad!raMns
the m&e linked 1st in $ - mm te≠ m, new data fseords cm added io the as data age 1103. According iw heap data strooiures of the piese dlsolosy s c n; guarantee th serialisation ordief s!lte fe oirds in- eac Inked 1st 110 . Eaoh core 2. mn that one vol tile data page 35 does no contain records oni onit a epochs. Whan ne epoo 1110 e ds and another &e#ns (e.g,* the epoch s ic s)* each core 25 ca add a: next d a age 35 even if toe current data page Si is empt or almost empty, Adding last data page 1103 can include moving m end pointer 1 4 tor the previous last page 1102 to the mw fca* page 1 0$, Dye to the inherent serial order ©ftl¾e h a data stricture 1100, it la well ®Μ fe se ti g log entries and log lea corr s o ding to transactions eform d m votaila data pages
Snapshot versions of the heap data i!meiore can pa eonstmptod !ooally in a local N AM 40 on a corresponding node 20. FIG.11 S3 liyatratoa en exarao!e of toe local Iocs entries feam t&h loo tile o!ae¾d seoy nflailv info Itokad lists 1107 sna shot data pagaa 45, After eao snapshot is taken, new mot ointers 1 21 can he added to a metadata file 120 that point: to a head snaps ot data ages 45 of a corresponding linked list 1 07. II the metadata file 1120 gets filled, additional overftew metadata files 1121 can ha added toy Installing a pointer $3 the m adata fie 120 or a preceding ovefle
o root page pointers 112$ ceo include a linked list of .pointers tha i include the original .metadata lie 120 and additional oersow metadata ilea 1121
Hefefrtrsg. back to FIG, 11 A. when top DBMS 100 drops volatile data pages 35 after a snapshot Is taken, it can uti&e the !PP! I t each volatile Wito mt 1101 is sorted in the serialisation order and each volatile data page 3S contains only one e c 1 , The DBMS 100 ca read each volatile data page 36 torn ® head data age 110$, If the e och 11 0 of the head data page 1105 la earlier than or s me as the epoch of the epoch of the head sna shot data a of tha eoiias ohdtog est of 1107 in NVR M 4i the start: pointer 1105 can be moved to the ext vPialle data page 35., The memo space of the previous head volatile data page 35 ca then he msieimed,. To reclaim memory space in the Si M 40, the pointer 1 2S of
the head snapshot data page 45 of the M®$ M 110? n fee deleted. For example, the deleted pointers 1130 In FIG.11 B allows tor deleted ages 11 0 of linked ifcis 11 QJ w 1107-11 to te r claimed,
502301 Sna shots of the heap data structure 100 can be road vtiftoutaoy synchfonlaalon. However, the,s¾¾e£uf& i provides ® mt f control for volatile data pages S¾\
IWm} FIG> 1 C depicts a scanning frap aclten 1111 tor mw *» date In the snapshot: stoage thai ys s a eap data stniduna, according to various embodime ts of the esent dtsoiospre. In the .& m$& m t the scanning m 1111 i« fertsfeabSe Isolation ¾wl cap a t ble look at the beginning of the t $ sc n. To en ble cone wto control, the tao ctlon can wat until si other theads have actoowledged the table lock or enter andle state.- T e table lock tics prevents other transactions wopld appeed mtm :rpcorrj¾ to !lif heap strociyra. Before adding a record, a trans ction POP deck the table look at the beginning of p ^xmt^. phism If table lock extsta o : the targe heap dala structure, iie transaction can abort, For transactions that are are dy I m ^ppl -ph&m aiar e mm¾ ih« sca ing trans ctiori 1111 can wait yottl those transactions are c¾mp!ateo\ A transaction c p report lis progress as thread-local variable wih appropriate fences. The scanning transactions 11 1 can the , read all records In the volatile data ^os 35t releases the table lock, and raoords the ddress of te iaat volatile data page 35 and TID for the next record {$ f the address el which th© TID tor next record will be placed), which can be verified at m-oommi phase. A scanning tranaaclon In can also he perfdrm©d n the s a shot data pages 45,
0#23f 1 Some Im ementations o rs include a truncation operation, A troncalon operation can represent a delete operation In the hea data sf mote re of the r set disciosyre. The tryncalon operation can tammr volatile data pages 35 torn a head volatile data page 35 up to ® epoch 111.0 Of a truncatlap point For snapshot data ag s 5, daleflon can Ineioda dropping the root painters 1 25 to linked lists with snapshot versions earlier than the yosation point When a snapshot spans a tanc iop point (®,g,t "delete records appended by e och- ^ and there Is a snapshot that covers
feeort from to ® ο 4 t « sna shot root M cm e ke t tot those raoords cars he sMl ped w en sn hot data ages 45 am fead, tmWI V heap m $ require* ty m &ml. ccesses !tja avnc rof z &o, As such, iPa heap data stafchra $ avoid, almost all mmoie-node m f either in VRA 30 or NVRAM 40;
PJ234] FIG, 1.10 Is a ffcwsfc ii of a method 11 SO for adding data reeords mn m^ to tensacfioris executed by a core 2S to heap d ta stryctare 110.. At te 1151, mm particular mm 2$ m a m«§<€ore computing system 10 DB^S 100. can xecute a ransaction. The transact ca Include sR tps of ©peralcsn nd eas t$t In dat feeing ge erated. In exampe im iemeii tattoos* tie transaction can Include the operafons that Include the deection of an v nt, eueh as a security door access, a file access, or other aonltorad event,
DtSll At. feox 1 S3 the c r 2S n ite data fieord to the test data page In ® linked list of data pages aises wth the core .2S> Before writing to tie last data pag , the PP S pay PhecH to m f any other mm2§ or other transacioys have placed a Mm ck. IF the table took s In place, then the ransactors can fee a orted and r attempfed. If no tahta took la a efec, then the DB S can proceed with rtng the elate rec©rd§,
irnzm Ίο ind tte linked list of data pages associated with the. com 25, iPa DBMS i n t mmm a metadata t that includes polnt rs to .the head page and end. ge of the linked list associated ith the 25, Based m tie ponfet t tha and page of the associ ted linked : list, the core 2S can find the location of the end page and Insert me data record and¾r ar> associatad TID specific to the transaction,
%m t atamato S5, the DBMS ioS can check to∞ If the epoch has s itched time period as elapsed or e predetermi ed ftum&er of trarisaeJlons have bean cuted), if t apec has s ic ed, than the mm sap add a new test data page to the United M associate with the core 25. Irs some examples, the DB S 100 can add a last data paga to all linked list In the sto ge, Aitat -natively* the ϋΒΜΒ 100 m only add a new last
papa to !riksd lists In ths storage that w mn added a new data r sor tho last epoch.
£03338} At rna m 1155, if tie P8 S 1 0 «®imi es mt m epoch fm not awitehed, then a mm tmmmMm fce mo M M the m tm data mwt can be to the cyrmt last page In boxes 1S1 to 11 S3. lW2m 1 e a !to hafi of « meth d for reding data from the heap data s¾¾ictur 1100s aceorc!lpg to art xam te iniplementatlon of the present dis osur At box 1181, the m $ 100 cm m \i a table ck m a set of Inked lists of data ages. The set of lnk d lists can be part of storage fo a data rslatlng to a $ pacific function or Operaiof*, Each inked list I set can be assoetaiad wit a core 2.S in copyi g system 10 and m& 'm VRAM 3D or HVUm 40 on fie same ods 20 as t e core 25.
I00240J At box 1#3, th DBMS 100 art obtain aeimo iedgeneni: of the ta le lock fom eaeb. core 25 associated with ifia set of liplcpd lists.
Alternatively, t e DBMS 100 c wait uiti a I m? h ve ontirecf an Idle state, m r mi ^ DBMS 100 can wait for el mm.
associated with lha sat to sto or ckno ledge the table to avoid the possibility that a d ta irecord i fee added to one or more of t e last data pages white the DB MS 100 is e dng the ot er Inked fists or ata pages.
1002411 Ooce ail core ctivity in «¾e set has sto ped or aused, the DBMS I DS can scan t roug each linked list in t set at i ax 18S. In one exam e, the c of ths I ked H of ata p ges can e read from s start page to. an end page, m designated by corresponding start pointers and ≠ oi ters inserted into the linked list, The rder ih which the link d lists art spanned can bo based on an order secluded In a metadat file tsat lists the physical tocptiors of the toot page for of iw firmed lets, in some examples, the order that fhf llekid list ars scarineil can ba based on the toefef: position socket umber of the corresponding associated c rns 25 In tho computer system 10, When one complete inked 1st Is scanned, than DBMS 00 can begi scanning, th next linked list m the last data page in the last linked list is scannao.
mz ibox 1187, tte DBMS 100 can te$& fte table lock. Qtm the table took Is refe-as d, transactions can resuP¾ aid cores 25 can add date roocsrds to me last age of e eofT¾spondirt§ Inked
fW2 ¾ Assoi ing to he tore§o!i¾¾ e am les dtetoatd teroinm ®
twork o erators to m femenl or program a f>$ vpr%^ ng mul pe oontfoJor modules fe t may haw dis rate poistes and objectives mg rtsng t e eon¾«raioo of topology ®f the fiff or Conflicts tei oep %w policies' and oo ois es, a® s r@siP¾ed by the dif e r#no s in tit resoyrct allocation- proposals, cm t msol d yslpg varfeus olocUop ased decision
:ma¾ fiitmss tbm all ing i o mi tk o rator to mak¾ fit benefits of -tie olers and objeo^os of rsfH$ipi ind¾p pde esoimfef m ue
(0024J Thoss and. other variations... rpodlfscations.:. additions, aod
m®fmm §$ may fell within the scope of t e a pended olslpsis}, As us l in tha dascrlpion hanftt and throughout tha claims that follow, V, "an*, and "tf ipolydas teil fafetWHiss yntess t e ccspte t o arty dictates ot erwise:. Also> as used i« th« description in an throughout the el tns that follow, tho moaomg of in* I cludes irf m W uness the context i dict te other ise
Claims
What is claimed it:
1 A sysism ap ising
a plurality of processors:
a volatile rand m sect s§ memo oeypi d to a! least OP® of the plurality of processors;
rior^ datsje random aooess memory cou led to one or mom of the plurality oi processors, wherein t o non-volatile random aooeas memory eomipmasimtfyeionsu thai w en a^acyad by on® or mo®: pt»©@ssors in the plurality of processors, mum the processors to:
ccess a fcey-v¾l«§ store' com ri ing
a plurality of k ys:;; and
a plurality of ual pointers assocate with eo aspondms keys in the plurality of keys, eac dua pointer Irs the plurality of 'du.si. pointers, comprising a mMte pointer associated with a volatile data pegsm ' a plurality of volatile data g s In t volatile random assess memory or a non-volatile ints associated with a non o tile data age in a plurality ø non-volatile data ages in t e wn-volatiie rando a oess memory; and
exoo ta a tePiaoion comprising OP input key base m the key- value sfcm
Z, 'The system ©f slairn 1» wherein the volalie data pages and he non-volatile data ages are fixe©: sito data page .
3, Tfs ly !i!T! of diln 11 entlp the initiiiotipos ftirttai caiiss ths
pmaassors to:
follow a volatile pointe of a d l ointer corresponding to fee Input key to access a vo!atlfo data page; and
If if volatile pointer Is po , t e« follo a iip«~voIaf ila polner of fm dual pointe to copy a corresponding nom olsfte data ge to
eoiraspopdlpg volatile data page associated il m address in vofa a random access srornofy.
4, The system of cieJm 3, wherein t e ihstrttssieiw iirt t cause tha
processors to:
gsnemtt a ra -st comprising: Irs vafua assoc&ted with the in ut key n the corresponding volatile dais page;
geneate & seco d v l e;
c mp e the first value In ® read-sat with a tNfd value stored at ISia address btfoio the second v aa i writte to tlta ddess; and
based on t e comparison aborting the tra saelon or te second v lue to co -es o-ndlng volatile data. page.
5. The system of Plate 1 , wherein the ptasOt of rocaaaofi, the .volatile ran om access meraofy, mM the oea^iafie Mam access memor a distriOutad among a plurality ot im¾;reonnecte node hoards. ft. T'ha system of d te ¾ whsrtin tht transaotto Is associated wl a nocte boad in f¾<% okiralit of Intero o ecfed node osfds and ihi¾ nslrurii¾n§ further oaoae tha rocessos to:.
g nerate a dte-set compising; changes in one w more volatile data pages In me plurality of yolaila data pages corresponding to Ida
transaction;
save . rfe-sii and otter nts-i ts associated with flt rtode board in the lurality of Intercon eced node boards to a time-based !o§ fc; and
combin the In»~based iog file with othe time-tosoO log flies assoosated with other noOe boards in trie plurality of loleroonneoiel node boards to s¾rteraie an updated snapshot of the luality of rson-voiaiJe d t : pages.
?, Tit system ©f dalrn 6» wherein tha u dated snapshot comprises rmi!tipte persons stored I me nonv latile random access memory of mulipe node boards
8, A no ^ransitey eomputef readable stoage m dium so prispg
Instructions, that wh§p executed y on« or mom m in phimlyof processors distributed among, a ptora!iy of nteam eofed nodes, caus the processors to:
instaaflite a key«¥atue store c rising;
a plur lty of ke s; ≠
a piuraldy of ctal ointes associated- with oormsponding ays in tnt plurality erf fcsys, each dual pointe inlfm plurality o dual pointers -2S0 ooraprisng;
a voipll inte associated with ¾ latie data s§a ftt plurality of vo!atite daa pa@ s stored m a volatile random- oses memory: and
page in plurality of non-votaiie data pages stored in a n * volatile and m cc ss e ry and
execute rniiltipte an&aciORS on data stored IP the plurality of volatile data pages 35 bas d on cores onding inpot kep and the ke * im store;
gene-rate log entries corresponding- fd i m«ltipla tm¾sacion¾; generate e multi-version snapsbo-tof tbe data sl ped In e plurality of volatile data pages 35 In the plurality of nonvoatil data papas ased on the lo§ entnes, Trie o fMaositery eonpyter readmafe storage medium of of aim 8, bereln to.genemte ¾e nui -versloo snapshot the instfuolon forther eause tfte processors t gene rate partitions of !he log entries based on time periods.
I D, The noa-translory computer readable storage medium of caim t wherein the mufi»verebn snapsbol. comprises myltipi snapsh ts of the d t stored
in il lum y of vsails d is pages eo ai ponding to the partitions and poMers thai defne co nexions amo g §*a miiitip!e .snapshots.,
11 > Tn nd ^fanslioy com uter readable storage medium of dalm t wherein t ® mM~vmm snapshot Is distributed c ss t e lurality of nodes.
12. A meth d c nippsi g
generating a plyatify f log Stes co ipns^ p log mM
mm® po ding to Mictons performed dais In vofettifc dat p ges SS org ised In to tabtes and stored in a volatile ramfem access m&mory olsif jjauiad cross a plurality of i terco ected m m;
mapping the fo§ entrlss Into bycteia cores nding lo tho tables; partitioning t e log entres I tne pyck ts based on anges of keys ssociate with t volatile data p jis;
copying the pariilonod log entries to o ties oad¾§ b tch buffers; sorting the partitioned log nties In fse batch buffers according to key ranges to generate co espond^ files of sort d log- entres
geneate o «on-¾oiatie data page according l tho flies of sorted log entries; and
updating existing non-yolatla data §is stored in a n∞~¥ f ie random coaas rn nory diainbyled across the pfo a!% of nodes with t e n non~voiatI data a ®,
13. The method of (Mm 2 wherein the ranges of kes ana associated with open or ora of the plurality of inteteonnecfed nodes deterfnin d to fr qyeney access voiatfe data a a or nop-¥Ptatila data pagts associated with the mn ss of keys,
14. Jt maihod of claim 12 w ara!n updating the aviati g non-voatito daa pages ompises updating pointers in the easing non-volaii!s data pages will addresses of fh ew non-vsisi data p s.
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013602 WO2016122546A1 (en) | 2015-01-29 | 2015-01-29 | Transactional key-value store |
| US15/545,389 US10846279B2 (en) | 2015-01-29 | 2015-01-29 | Transactional key-value store |
| US17/079,802 US11288252B2 (en) | 2015-01-29 | 2020-10-26 | Transactional key-value store |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013602 WO2016122546A1 (en) | 2015-01-29 | 2015-01-29 | Transactional key-value store |
Related Child Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/545,389 A-371-Of-International US10846279B2 (en) | 2015-01-29 | 2015-01-29 | Transactional key-value store |
| US17/079,802 Division US11288252B2 (en) | 2015-01-29 | 2020-10-26 | Transactional key-value store |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016122546A1 true WO2016122546A1 (en) | 2016-08-04 |
Family
ID=56543969
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2015/013602 Ceased WO2016122546A1 (en) | 2015-01-29 | 2015-01-29 | Transactional key-value store |
Country Status (2)
| Country | Link |
|---|---|
| US (2) | US10846279B2 (en) |
| WO (1) | WO2016122546A1 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109521948A (en) * | 2017-09-20 | 2019-03-26 | 三星电子株式会社 | Support the key assignments storage equipment and its operating method of snapshot functions |
| WO2020019995A1 (en) * | 2018-07-27 | 2020-01-30 | Huawei Technologies Co., Ltd. | Asynchronous cache coherency for mvcc based database systems |
| EP3608788A4 (en) * | 2017-04-27 | 2020-04-22 | Huawei Technologies Co., Ltd. | INTERNAL MEMORY ACCESS METHOD AND COMPUTER SYSTEM |
| CN115794592A (en) * | 2023-02-10 | 2023-03-14 | 南京邮电大学 | A Data Race Detection Method Based on Higher Order Functions |
| CN116756135A (en) * | 2023-07-11 | 2023-09-15 | 星环信息科技(上海)股份有限公司 | Data cleaning method, device, equipment and medium |
Families Citing this family (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9910697B2 (en) * | 2015-10-13 | 2018-03-06 | Palantir Technologies Inc. | Fault-tolerant and highly-available configuration of distributed services |
| US11301422B2 (en) * | 2016-02-23 | 2022-04-12 | Samsung Electronics Co., Ltd. | System and methods for providing fast cacheable access to a key-value device through a filesystem interface |
| US10606803B2 (en) | 2016-06-28 | 2020-03-31 | Netapp, Inc. | Data cloning in memory-based file systems |
| US10452613B2 (en) * | 2017-07-19 | 2019-10-22 | Sap Se | Persistent directory for variable-size entry container free-space handling |
| US11055266B2 (en) * | 2017-08-21 | 2021-07-06 | Western Digital Technologies, Inc. | Efficient key data store entry traversal and result generation |
| US11210212B2 (en) | 2017-08-21 | 2021-12-28 | Western Digital Technologies, Inc. | Conflict resolution and garbage collection in distributed databases |
| US11210211B2 (en) | 2017-08-21 | 2021-12-28 | Western Digital Technologies, Inc. | Key data store garbage collection and multipart object management |
| WO2020047258A1 (en) * | 2018-08-29 | 2020-03-05 | Georgia Tech Research Corporation | Systems and methods for preventing side-channel attacks |
| US10839016B2 (en) * | 2018-10-31 | 2020-11-17 | EMC IP Holding Company LLC | Storing metadata in a cuckoo tree |
| US11080118B2 (en) * | 2019-02-21 | 2021-08-03 | Microsoft Technology Licensing, Llc | Reliable virtualized network function system for a cloud computing system |
| US11200219B2 (en) * | 2019-10-24 | 2021-12-14 | EMC IP Holding Company, LLC | System and method for idempotent metadata destage in a storage cluster with delta log based architecture |
| US12124421B2 (en) * | 2020-09-18 | 2024-10-22 | Kioxia Corporation | System and method for efficient expansion of key value hash table |
| US11481132B2 (en) | 2020-09-18 | 2022-10-25 | Hewlett Packard Enterprise Development Lp | Removing stale hints from a deduplication data store of a storage system |
| US11734277B2 (en) * | 2021-02-05 | 2023-08-22 | International Business Machines Corporation | Database buffer pool optimization |
| US11741073B2 (en) | 2021-06-01 | 2023-08-29 | Alibaba Singapore Holding Private Limited | Granularly timestamped concurrency control for key-value store |
| US11755427B2 (en) | 2021-06-01 | 2023-09-12 | Alibaba Singapore Holding Private Limited | Fast recovery and replication of key-value stores |
| US12373440B2 (en) | 2021-06-01 | 2025-07-29 | Alibaba Innovation Private Limited | High-performance key-value store |
| US11829291B2 (en) | 2021-06-01 | 2023-11-28 | Alibaba Singapore Holding Private Limited | Garbage collection of tree structure with page mappings |
| WO2023043736A1 (en) * | 2021-09-14 | 2023-03-23 | Temple University- Of The Commonwealth System Of Higher Education | System and apparatus of secure transaction processing and data stores |
| US12222964B2 (en) * | 2022-04-28 | 2025-02-11 | Snowflake Inc. | Database processing using hybrid key-value tables |
| US12124731B2 (en) | 2022-07-25 | 2024-10-22 | Dell Products L.P. | Maintaining smooth metadata log destaging and burst tolerance |
| US12277139B2 (en) | 2023-04-27 | 2025-04-15 | Hewlett Packard Enterprise Development Lp | Storage space determinations for snapshots |
| CN117216003B (en) * | 2023-09-27 | 2025-12-19 | 苏州元脑智能科技有限公司 | Method, system, terminal and storage medium for generating snapshot for process data |
| CN117235078B (en) * | 2023-11-15 | 2024-01-30 | 湖南速子文化科技有限公司 | Method, system, device and storage medium for processing mass data at high speed |
| US12566716B2 (en) | 2024-03-28 | 2026-03-03 | Samsung Electronics Co., Ltd. | Systems and methods for timestep shared memory multiprocessing based on tracking table mechanisms |
| CN119718191B (en) * | 2024-11-30 | 2025-11-07 | 腾讯科技(深圳)有限公司 | Data processing method and device based on nonvolatile memory space and related equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006041514A1 (en) * | 2004-10-04 | 2006-04-20 | American Express Travel Related Services Company, Inc. | Systems and methods for providing a rf transaction device for use in a private label transaction |
| US20080155258A1 (en) * | 2006-12-21 | 2008-06-26 | Spansion Llc | Non-volatile memory sub-system integrated with security for storing near field transactions |
| US20080195773A1 (en) * | 2005-04-29 | 2008-08-14 | Mariano Concilio | Transaction Stack For Electronic Devices Including Non Volatile Memory With Limited Amount of Writing Cycle |
| US20140208047A1 (en) * | 2011-12-28 | 2014-07-24 | Balaji Vembu | Method and device to distribute code and data stores between volatile memory and non-volatile memory |
| US20140379631A1 (en) * | 2013-06-25 | 2014-12-25 | Linkedln Corporation | Transactional key-value database with searchable indexes |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7469241B2 (en) * | 2004-11-30 | 2008-12-23 | Oracle International Corporation | Efficient data aggregation operations using hash tables |
| US8412689B2 (en) | 2010-07-07 | 2013-04-02 | Microsoft Corporation | Shared log-structured multi-version transactional datastore with metadata to enable melding trees |
| US9268646B1 (en) * | 2010-12-21 | 2016-02-23 | Western Digital Technologies, Inc. | System and method for optimized management of operation data in a solid-state memory |
| US8806160B2 (en) | 2011-08-16 | 2014-08-12 | Pure Storage, Inc. | Mapping in a storage system |
| US9678863B2 (en) * | 2012-06-12 | 2017-06-13 | Sandisk Technologies, Llc | Hybrid checkpointed memory |
| US9037556B2 (en) | 2012-12-03 | 2015-05-19 | Vmware, Inc. | Distributed, transactional key-value store |
| US9268834B2 (en) | 2012-12-13 | 2016-02-23 | Microsoft Technology Licensing, Llc | Distributed SQL query processing using key-value storage system |
-
2015
- 2015-01-29 US US15/545,389 patent/US10846279B2/en active Active
- 2015-01-29 WO PCT/US2015/013602 patent/WO2016122546A1/en not_active Ceased
-
2020
- 2020-10-26 US US17/079,802 patent/US11288252B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006041514A1 (en) * | 2004-10-04 | 2006-04-20 | American Express Travel Related Services Company, Inc. | Systems and methods for providing a rf transaction device for use in a private label transaction |
| US20080195773A1 (en) * | 2005-04-29 | 2008-08-14 | Mariano Concilio | Transaction Stack For Electronic Devices Including Non Volatile Memory With Limited Amount of Writing Cycle |
| US20080155258A1 (en) * | 2006-12-21 | 2008-06-26 | Spansion Llc | Non-volatile memory sub-system integrated with security for storing near field transactions |
| US20140208047A1 (en) * | 2011-12-28 | 2014-07-24 | Balaji Vembu | Method and device to distribute code and data stores between volatile memory and non-volatile memory |
| US20140379631A1 (en) * | 2013-06-25 | 2014-12-25 | Linkedln Corporation | Transactional key-value database with searchable indexes |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3608788A4 (en) * | 2017-04-27 | 2020-04-22 | Huawei Technologies Co., Ltd. | INTERNAL MEMORY ACCESS METHOD AND COMPUTER SYSTEM |
| CN109521948A (en) * | 2017-09-20 | 2019-03-26 | 三星电子株式会社 | Support the key assignments storage equipment and its operating method of snapshot functions |
| CN109521948B (en) * | 2017-09-20 | 2023-08-15 | 三星电子株式会社 | Key value storage device supporting snapshot function and operation method thereof |
| WO2020019995A1 (en) * | 2018-07-27 | 2020-01-30 | Huawei Technologies Co., Ltd. | Asynchronous cache coherency for mvcc based database systems |
| CN115794592A (en) * | 2023-02-10 | 2023-03-14 | 南京邮电大学 | A Data Race Detection Method Based on Higher Order Functions |
| CN116756135A (en) * | 2023-07-11 | 2023-09-15 | 星环信息科技(上海)股份有限公司 | Data cleaning method, device, equipment and medium |
| CN116756135B (en) * | 2023-07-11 | 2024-04-23 | 星环信息科技(上海)股份有限公司 | Data cleaning method, device, equipment and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| US11288252B2 (en) | 2022-03-29 |
| US20210042286A1 (en) | 2021-02-11 |
| US20170371912A1 (en) | 2017-12-28 |
| US10846279B2 (en) | 2020-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016122546A1 (en) | Transactional key-value store | |
| WO2016122550A1 (en) | Heap data structure | |
| WO2016122548A1 (en) | Hash index | |
| WO2016122549A1 (en) | Read only bufferpool | |
| KR101805948B1 (en) | Checkpoints for a file system | |
| ES2969620T3 (en) | Methods, devices and systems to maintain metadata and data consistency across data centers | |
| US11360863B2 (en) | Key-value store on persistent memory | |
| US7523343B2 (en) | Real-time file system repairs | |
| JP5012628B2 (en) | Memory database, memory database system, and memory database update method | |
| US20140289185A1 (en) | Apparatus and Method for Policy Based Rebalancing in a Distributed Document-Oriented Database | |
| US7533138B1 (en) | Practical lock-free doubly-linked list | |
| JP2007012056A (en) | File system with deferred authentication of data integrity | |
| JP2007012054A (en) | Optimized startup certification for file system maintenance | |
| Setty et al. | Realizing the {Fault-Tolerance} promise of cloud storage using locks with intent | |
| US20120226957A1 (en) | Controller, data storage device and program product | |
| CN109359085A (en) | File migration method, device, computer equipment and storage medium | |
| US20080172420A1 (en) | Scoring Computer File Health | |
| CN109492020A (en) | A kind of data cache method, device, electronic equipment and storage medium | |
| Siakavaras et al. | RCU‐HTM: A generic synchronization technique for highly efficient concurrent search trees | |
| Wang et al. | DHash: enabling dynamic and efficient hash tables | |
| CN112699138A (en) | Method, device and storage medium for updating data among threads | |
| Dion | Reliable storage in a local network | |
| US12468688B1 (en) | Efficient transaction management | |
| JP6645296B2 (en) | Information processing system, information processing method, and program | |
| JP2014215869A (en) | Information processing device, information processing method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15880442 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 15545389 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15880442 Country of ref document: EP Kind code of ref document: A1 |



