tpcc_current (1034761), страница 14
Текст из файла (страница 14)
COMMIT transaction T48B.Verify that the p rices read by transaction T4 m atch the valu es set by transaction T3.Case C, if transaction T3 ROLLS BACK:5C.Verify that transaction T3 is instru cted to ROLL BACK by the d ata m anager.6C.Continu e transaction T2 and verify that the p rice of item s x (the second tim e) and y m atch the valu es readby transaction T1. COMMIT transaction T2.7C.Start a transaction T4.
Qu ery I_PRICE from item s x and y. COMMIT transaction T48C.Verify that the p rices read by transaction T4 m atch the valu es read by transactions T1 and T2.Case D , if transaction T3 d oes not stall and no transaction is ROLLED BACK:5D.Transaction T3 has com p leted and has been COMMITTED.6D.Continu e transaction T2 and verify that the p rice of item s x (the second tim e) and y m atch the valu es readby transaction T1.
COMMIT transaction T2.7D.Start a transaction T4. Qu ery I_PRICE from item s x and y. COMMIT transaction T48D.Verify that the p rices read by transaction T4 m atch the valu es set by transaction T3.Comment 1: This test is su ccessfu lly execu ted if either case A, B, C or D of the above step s are follow ed . The testsp onsor m u st d isclose the case follow ed d u ring the execu tion of this test.Comment 2: If the im p lem entation u ses rep lication on the ITEM table and all transactions in Isolation Test 7 u se thesam e cop y of the ITEM table, u p d ates to the ITEM table are not requ ired to be p rop agated to other cop ies of theITEM table.
This relaxation of ACID p rop erties on a rep licated table is only valid u nd er the above cond itions and inthe context of Isolation Test 7.Comment 3: Transactions T1, T2, and T4 are not u sed to m easu re throu ghp u t and are only u sed in the context ofIsolation Test 7.3.4.2.8 Isolation Test 8This test d em onstrates isolation for Level 3 (p hantom ) p rotection betw een a Delivery and a N ew -Ord er transaction.Perform the follow ing step s:1.Rem ove all row s for a rand om ly selected d istrict and w arehou se from the N EW -ORDER table.2.Start a Delivery transaction T1 for the selected w arehou se.3.Stop T1 im m ed iately after read ing the N EW-ORDER table for the selected d istrict.
N o qu alifying rowshou ld be fou nd .4.Start a N ew -Ord er transaction T2 for the sam e w arehou se and d istrict.Case A, if transaction T2 stalls:TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 55 of 1305A.Continu e transaction T1 by rep eating the read of the NEW -ORDER table for the selected d istrict.6A.Verify that there is still no q u alifying row fou nd .7A.Com p lete and COMMIT transaction T1.8A.Transaction T2 shou ld now com p lete.Case B, if transaction T2 d oes not stall:5B.Com p lete and COMMIT transaction T2.6B.Continu e transaction T1 by rep eating th e read of the NEW-ORDER table for the selected d istrict.7B.Verify that there is still no qu alifying row fou nd .8B.Com p lete and COMMIT transaction T1.Comment: N ote that other cases, besid es A and B, are p ossible.
The intent of this test is to d em onstrate that in allcases w hen T1 rep eats the read of the N EW -ORDER table for the selected d istrict, there is still no qu alifying rowfou nd .3.4.2.9 Isolation Test 9This test d em onstrates isolation for Level 3 (p hantom ) p rotection betw een an Ord er -Statu s and a N ew -Ord ertransaction . Perform the follow ing step s:1.Start an Ord er-Statu s transaction T1 for a selected cu stom er.2.Stop T1 im m ed iately after read ing the ORDER table for the selected cu stom er. The m ost recent ord er forthat cu stom er is fou nd .3.Start a N ew -Ord er transaction T2 for the sam e cu stom er.Case A, if transaction T2 stalls:5A.Continu e transaction T1 by rep eating the read of the ORDER table for the selected cu stom er.6A.Verify that the ord er fou nd is the sam e as in step 2.7A.Com p lete and COMMIT transaction T1.8A.Transaction T2 shou ld now com p lete.Case B, if transaction T2 d oes not stall.5B.Com p lete and COMMIT transaction T2.6B.Continu e transaction T1 by rep eating the read of the ORDER table for the selected d istrict.7B.Verify that the ord er fou nd is the sam e as in step 2.8B.Com p lete and COMMIT transaction T1.Comment: N ote that other cases, besid es A and B, are p ossible.
The intent of this test is to d em onstrate that in allcases w hen T1 rep eats the read of the ORDER table for the selected cu stom er, the ord er fou nd is the sam e as in step3.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 56 of 1303.5D urability RequirementsThe tested system m u st gu arantee d u rability: the ability to p res erve the effects of com m itted transactions and ensu red atabase consistency after recovery from any one of the failu res listed in Clau se 3.5.3.Comment 1: N o system p rovid es com p lete d u rability (i.e., d u rability u nd er all p ossible typ es of failu res).
Thesp ecific set of single failu res ad d ressed in Clau se 3.5.3 is d eem ed su fficiently significant to ju stify d em onstration ofd u rability across su ch failu res. H ow ever, the lim ited natu re of the tests listed m u st not be interp reted to allow othe ru nrecoverable single p oints of failu re.Comment 2: The d u rability requ irem ent d oes not inclu d e the ability to p rotect against the effect of m u ltip le failu resas d escribed in Clau se 3.5.3 even if those m u ltip le failu res are the resu lt of a single incid ent .3.5.1Du rable Med iu m is a Field Rep laceable Unit (FRU) d ata storage m ed iu m that is either:1.An inherently non -volatile m ed iu m (e.g., m agnetic d isk, m agnetic tap e, op tical d isk, etc.) or2.A volatile m ed iu m that w ill ensu re the transfer of d ata au tom atically, before any d ata is lost, to aninherently non -volatile m ed iu m after the failu re of external p ow er ind ep end ently of reap p lication ofexternal p ow er.A configu red and p riced Uninterru p tible Pow er Su p p ly (UPS) is not consid ered external p ow er.Comment: A d u rable m ed iu m can fail; this is u su ally p rotected against by rep lication on a second d u rable m ed iu m(e.g., m irroring) or logging to another d u rable m ed iu m .
Mem ory can be consid ered a d u rable m ed iu m if it canp reserve d ata long enou gh to satisfy the requ irem ent stated in item 2 above, for exam p le, if it is accom p anied by anUninterru p tible Pow er Su p p ly, and the contents of m em ory can be transferred to an inherently non -volatile m ed iu md u ring the failu re.
N ote that no d istinction is m ad e betw een m ain m em ory and m em ory p erform ing sim ilarp erm anent or tem p orary d ata storage in other p arts of the system (e.g., d isk controller caches).3.5.2Committed Property D efinitionA transaction is consid ered com m itted w hen the transaction m anager com p onent of the system h as either w rittenthe log or w ritten the d ata for the com m itted u p d ates associated w ith the transaction to a d u rable m ed iu m .Comment 1: Transactions can be com m itted w ithou t the u ser su bsequ ently receiving notification of that fact, sincem essage integrity is not requ ired for TPC-C.Comment 2: Althou gh the ord er of op erations in the transaction p rofiles (Clau se 2) is im m aterial, the actu alcom m u nication of the ou tp u t d ata cannot begin u ntil the com m it op eration has su ccessfu lly com p leted .3.5.3List of single failuresThe Single Points of Failu re ap p ly to com p onents of th e SUT that contribu te to the d u rability requ irem ent.
Inconfigu rations w here m ore than one instance of an op erating system p erform s an id entica l benchm ark fu nction, thetests for the failu res listed here m u st be com p leted on at least one su ch instance. In ad d ition, if m u ltip le instances ofan op erating system m anage d ata that is m aintained as a single im age for the benchm ark ap p lication (e.g., ad atabase clu ster), then the Pow er Failu re test m u st also be p erform ed sim u ltaneou sly on all su ch instances.Comment 1: An exam p le of m u ltip le system s p erform ing an id entical fu nction is a single d atabase im age on aclu stered system in TPC-C.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 57 of 130Comment 2: A single test can ad equ ately satisfy the requ irem ents of m u ltip le single p oints of failu re (e.g., A single"system crash test" cou ld be u sed for clau ses 3.5.3.2, 3.5.3.3, and 3.5.3.4.)Comment 3: The term "sim u ltaneou sly" as ap p lied to a p ow er failu re of m u ltip le instances w ithin the SUT isinterp reted to m ean w ithin 3 second s to allow for variances in a m anu al p roced u re that m ay be u sed to accom p lishthe test.3.5.3.1Perm anent irrecoverable failu re of any single d u rable m ed iu m d u ring the Measu rem ent Intervalcontaining TPC-C d atabase tables or recovery log d ata.Comment: If m ain m em ory is u sed as a d u rable m ed iu m , then it m u st be consid ered as a p otential single p oint offailu re.
Sam p le m echanism s to su rvive single d u rable m ed iu m failu res are d atabase archiving in conju nction w ith ared o (after im age) log, and m irrored d u rable m ed ia. If m em ory is the d u rable m ed iu m and m irroring is them echanism u sed to ensu re d u rability, then the m irrored m em ories m u st be ind epend ently p ow ere d .3.5.3.2Instantaneou s interru p tion (system or su bsystem crash/ system hang) in p rocessing w hich cau ses allor p art of the p rocessing of atom ic transactions to halt.Comment 1: This m ay im p ly abnorm al system shu td ow n w hich requ ires load ing of a fresh cop y of the op eratingsystem from the boot d evice.