tpcc_current (Дополнительные методические материалы), страница 12
Описание файла
Файл "tpcc_current" внутри архива находится в следующих папках: Дополнительные методические материалы, TPC-C. PDF-файл из архива "Дополнительные методические материалы", который расположен в категории "". Всё это находится в предмете "структурное проектирование автоматизированных систем обработки информации и управления" из 10 семестр (2 семестр магистратуры), которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "остальное", в предмете "структурное проектирование автоматизированных систем обработки информации и управления" в общих файлах.
Просмотр PDF-файла онлайн
Текст 12 страницы из PDF
H ow ever, the d u rability tests d escribed in Clau ses 3.5.3.2 and 3.5.3.3 m u st be ru n on all the system sthat are m easu red . All Fu ll Disclosu re Rep orts m u st id entify the system s w hich w ere u sed to verify ACIDrequ irem ents and fu ll d etails of the ACID tests cond u cted and resu lts obtained .Comment: All requ ired ACID tests m u st be p erform ed on new ly op tim ized binaries even if there have not been anysou rce cod e changes.3.2Atomicity Requirements3.2.1Atomicity Property D efinitionThe system u nd er test m ust gu arantee that d ata base transaction s are atom ic; the system w ill either p erform allind ivid u al op erations on the d ata, or w ill assu re that no p artially -com p leted op erations leave any effects on the d ata.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 47 of 1303.2.2Atomicity Tests3.2.2.1Perform the Paym ent transaction for a rand om ly selected w arehou se, d istrict, and cu stom er (bycu stom er nu m ber as sp ecified in Clau se 2.5.1.2) and verify that the record s in the CUSTOMER , DISTRICT, andWAREH OUSE tables have been changed ap p rop riately.3.2.2.2Perform the Paym ent transaction for a rand om ly selected w arehou se, d istrict, and cu stom er (bycu stom er nu m ber as sp ecified in Clau se 2.5.1.2) and su bstitu te a ROLLBACK of the transaction for the COMMIT ofthe transaction.
Verify that the record s in the CUSTOMER, DISTRICT, and WAREH OUSE tables have N OT beenchanged .3.3Consistency Requirements3.3.1Consistency Property D efinitionConsistency is the p rop erty of the ap p lication that requ ires any execu tion of a d atabase transaction to take thed atabase from one consistent state to another, assu m ing that the d atabase is initially in a consistent state .3.3.2Consistency ConditionsTw elve consistency cond itions are d efined in the follow ing clau ses to sp ecify the level of d atabase consistencyrequ ired across the m ix of TPC-C transactions.
A d atabase, w hen p op u lated as d efined in Clau se 4.3, m u st m eet allof these cond itions to be consistent. If d ata is rep licated , each cop y m u st m eet these cond itions. Of the tw elvecond itions, exp licit d em onstration that the cond itions are satisfied is requ ired for the first fou r only.
Dem onstrationof the last eight consistency cond itions is not requ ired becau se of the lengthy tests w hich w ou ld be necessary.Comment 1: The consistency cond itions w ere chosen so that they w ou ld rem ain valid w ithin the context of a largerord er-entry ap p lication that inclu d es the five TPC-C transactions (See Clau se 1.1.). They are d esigned to beind ep end ent of the length of tim e for w hich su ch an ap p lication w ou ld be e xecu ted .
Thu s, for exam p le, a cond itioninvolving I_PRICE w as not inclu d ed here since it is conceivable that w ithin a larger ap p lication I_PRICE is m od ifiedfrom tim e to tim e.Comment 2: For Consistency Cond itions 2 and 4 (Clau ses 3.3.2.2 and 3.3.2.4), sam p ling the first, last, and tw orand om w arehou ses is su fficient.3.3.2.1Consistency Cond ition 1Entries in the WAREH OUSE and DISTRICT tables m ust satisfy the relationship :W_YTD = su m (D_YTD)for each w arehou se d efined by (W_ID = D_W_ID).3.3.2.2Consistency Cond ition 2Entries in the DISTRICT, ORDER, and N EW-ORDER tables m u st satisfy the relationship :D_N EXT_O_ID - 1 = m ax(O_ID) = m ax(N O_O_ID)TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 48 of 130for each d istrict d efined by (D_W_ID = O_W_ID = N O_W_ID) and (D_ID = O_D_ID = N O_D_ID).
This cond itiond oes not ap p ly to the N EW-ORDER table for any d istricts w hich have no ou tstand ing new ord ers (i.e., the nu m be r ofrow s is zero).3.3.2.3Consistency Cond ition 3Entries in the N EW-ORDER table m u st satisfy the relationship :m ax(N O_O_ID) - m in(NO_O_ID) + 1 = [nu m ber of row s in the N EW -ORDER table for this d istrict]for each d istrict d efined by N O_W_ID and N O_D_ID.
This cond ition d oes not ap p ly to any d istricts w hich have noou tstand ing new ord ers (i.e., the num ber of row s is zero).3.3.2.4Consistency Cond ition 4Entries in the ORDER and ORDER-LIN E tables m u st satisfy the relationship :su m (O_OL_CN T) = [nu m ber of row s in the ORDER-LIN E table for this d istrict]for each d istrict d efined by (O_W_ID = OL_W_ID) and (O_D_ID = OL_D_ID).3.3.2.5Consistency Cond ition 5For any row in the ORDER table, O_CARRIER_ID is set to a nu ll valu e if and only if there is a corresp ond ing row inthe N EW-ORDER table d efined by (O_W_ID, O_D_ID, O_ID) = (N O_W_ID, N O_D_ID, N O_O_ID).3.3.2.6Consistency Cond ition 6For any row in the ORDER table, O_OL_CN T m u st equ al the nu m ber of row s in the ORDER-LIN E table for thecorresp ond ing ord er d efin ed by (O_W_ID, O_D_ID, O_ID) = (OL_W_ID, OL_D_ID, OL_O_ID).3.3.2.7Consistency Cond ition 7For any row in the ORDER-LIN E table, OL_DELIVERY_D is set to a nu ll d ate/ tim e if and only if the corresp ond ingrow in the ORDER table d efined by (O_W_ID, O_D_ID, O_ID) = (OL_W_ID, OL_D_ID, OL_O_ID) hasO_CARRIER_ID set to a null valu e.3.3.2.8Consistency Cond ition 8Entries in the WAREH OUSE and H ISTORY tables m u st satisfy the relationship :W_YTD = su m (H _AMOUN T)for each w arehou se d efined by (W_ID = H _W_ID).3.3.2.9Consistency Cond ition 9Entries in the DISTRICT and H ISTORY tables m u st satisfy the relationship :D_YTD = su m (H _AMOUN T)TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 49 of 130for each d istrict d efined by (D_W_ID, D_ID) = (H _W_ID, H _D_ID).3.3.2.10Consistency Cond ition 10Entries in the CUSTOMER, H ISTORY, ORDER, and ORDER-LIN E tables m u st satisfy the relationship :C_BALAN CE = su m (OL_AMOUN T) - su m (H _AMOUN T)w here:H _AMOUN T is selected by (C_W_ID, C_D_ID, C_ID) = (H _C_W_ID, H _C_D_ID, H _C_ID)andOL_AMOUN T is selected by:(OL_W_ID, OL_D_ID, OL_O_ID) = (O_W_ID, O_D_ID, O_ID) and(O_W_ID, O_D_ID, O_C_ID) = (C_W_ID, C_D_ID, C_ID) and(OL_DELIVERY_D is not a nu ll valu e)3.3.2.11Consistency Cond ition 11Entries in the CUSTOMER, ORDER and N EW-ORDER tables m u st satisfy the relationship :(cou nt(*) from ORDER) - (cou nt(*) from N EW-ORDER) = 2100for each d istrict d efined by (O_W_ID, O_D_ID) = (N O_W_ID, N O_D_ID) = (C_W_ID, C_D_ID).3.3.2.12Consistency Cond ition 12Entries in the CUSTOMER and ORDER-LIN E tables m u st satisfy the relationship :C_BALAN CE + C_YTD_PAYMEN T = su m (OL_AMOUN T)for any rand om ly selected cu stom ers and w here OL_DELIVERY_D is not set to a nu ll d ate/ tim e.3.3.3Consistency Tests3.3.3.1Verify that the d atabase is initially consistent by verifying that it m eets the consistency cond itionsd efined in Clau ses 3.3.2.1 to 3.3.2.4.
Describe the step s u sed to d o this in su fficient d etail so that the step s ar eind ep end ently rep eatable.3.3.3.2Im m ed iately after p erform ing the verification p rocess d escribed in Clau se 3.3.3.1, d o the follow ing:1.Use the stand ard d riving m echanism to su bm it transactions to the SUT. The transaction rate m u st be atleast 90% of the rep orted tp m C rate and m eet all other requ irem ents of a rep orted m easu rem ent interval(see Clau se 5.5). The test sp onsor m u st inclu d e at least one check -p oint (as d efined in Clau se 5.5.2.2)w ithin this interval.
The SUT m u st be ru n at this rate for a t least 5 m inu tes.2.Stop su bm itting transactions to the SUT and then repeat the verification step s d one for Clau se 3.3.3.1. Thed atabase m u st still be consistent after ap p lying transactions. Consistency Cond ition 4 need only beverified for row s ad d ed to the ORDER and ORDER-LIN E tables since the p reviou s verification.TPC Benchm ark™C - Stand ard Sp ecification, Revision 5.11 - Page 50 of 1303.4Isolation Requirements3.4.1Isolation Property D efinitionIsolation can be d efined in term s of p henom ena that can occu r d u ring the execu tion of concu rrent d atabasetransaction s. The follow in g p henom ena are p ossible:P0 ("Dirty Write"): Database transaction T1 read s a d ata elem ent and m od ifies it.
Database transaction T2 thenm od ifies or d eletes that d ata elem ent, and p erform s a COMMIT. If T1 w ere to attem p t to re-read the d ataelem ent, it m ay receive the m od ified valu e from T2 or d iscover that the d ata elem ent has been d eleted .P1 ("Dirty Read "): Database transaction T1 m od ifies a d ata elem ent. Database transaction T2 then read s that d ataelem ent before T1 p erform s a COMMIT. If T1 w ere to p erform a ROLLBACK, T2 w ill have read a valu e thatw as never com m itted and that m ay thu s be consid ered to have never existed .P2 ("N on -rep eatable Read "): Database transaction T1 read s a d ata elem ent. Database transaction T2 then m od ifiesor d eletes that d ata elem ent, and p erform s a COMMIT.
If T1 w ere to attem p t to re-read the d ata elem ent, itm ay receive the m od ified valu e or d iscover that the d ata elem ent has been d eleted .P3 ("Phantom "): Database transaction T1 read s a set of valu es N that satisfy som e <search cond ition>.