Documentation update; added more sections under modules, reduced amount of cruft generated by doxygen.

This commit is contained in:
Sears Russell 2008-04-23 01:41:57 +00:00
parent 2929394b31
commit 2863487991
18 changed files with 1930 additions and 223 deletions

View file

@ -15,7 +15,6 @@ ACLOCAL_AMFLAGS = -I m4
#-Wconversion
docs:
doxygen doc/Doxyfile-api
doxygen doc/Doxyfile-developers
tidy: precoverage

File diff suppressed because it is too large Load diff

BIN
doc/figures/StasisDBMS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

413
doc/figures/StasisDBMS.svg Normal file
View file

@ -0,0 +1,413 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="467.8634"
height="273.87051"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45.1"
version="1.0"
sodipodi:docbase="/home/sears/stasis2/doc/figures"
sodipodi:docname="StasisDBMS.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/sears/stasis2/doc/figures/StasisDBMS.png"
inkscape:export-xdpi="115.42"
inkscape:export-ydpi="115.42">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.99398774"
inkscape:cx="-11.130951"
inkscape:cy="208.68131"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1024"
inkscape:window-height="697"
inkscape:window-x="0"
inkscape:window-y="25" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-12.799133,-122.42533)">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.85751379px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 352.27169,295.59456 C 353.13804,295.34748 354.0044,295.10039 354.87074,294.85332 C 359.44837,293.54776 367.28377,300.00533 365.71035,302.82009 C 363.94019,305.98682 357.7786,303.87593 356.06326,306.57676 C 354.66475,308.7787 362.21113,308.32685 364.82553,309.73253 C 364.94009,309.79413 358.34688,310.93254 362.24941,313.98578 C 370.00807,320.05596 363.52428,322.81314 354.0442,324.93376 C 351.48366,325.50654 347.84187,325.56353 345.21409,325.63003"
id="path3470"
inkscape:transform-center-y="8.3452194"
inkscape:transform-center-x="-7.7749744" />
<path
style="fill:none;fill-rule:evenodd;stroke:#caf3de;stroke-width:20.81105804;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 470.25702,194.16441 C 469.51314,194.10733 468.76928,194.05027 468.02542,193.99319 C 463.89542,193.67631 461.73569,191.44175 457.53742,190.87359 C 454.01504,190.39689 461.99375,196.50751 462.21516,196.65964 C 463.0745,197.25 468.97563,201.19071 463.24856,199.33673 C 457.7478,197.55603 451.97815,195.75797 444.58573,194.53534 C 436.39855,193.18129 454.57898,202.54295 454.94615,202.7122 C 458.66372,204.42582 466.8846,208.64197 466.69798,209.27249 C 466.69398,209.28598 462.74815,207.3485 455.94233,205.51506 C 443.13204,202.06402 433.56843,197.72331 419.97086,194.42149 C 414.65013,193.12948 424.1112,198.81186 430.33127,202.59833 C 437.21221,206.78709 451.29961,210.04283 457.45792,214.27359 C 459.36241,215.58197 448.18175,212.01455 440.49849,209.88583 C 422.40901,204.87401 411.53242,198.02851 394.93233,192.65469 C 394.37692,192.47491 393.82154,192.29511 393.26614,192.11533 C 392.9882,192.02533 395.52814,195.2967 398.85141,197.91954 C 408.94434,205.88526 430.47521,212.42861 449.76529,218.67323 C 452.26839,219.48353 455.25091,220.17345 457.75403,220.98376 C 465.46992,223.48157 450.37782,218.73372 448.96941,218.2778 C 428.38858,211.61533 409.33941,204.87139 390.19268,197.8725 C 373.49095,191.76733 382.21559,196.62919 388.01252,200.61168 C 398.96247,208.13428 413.48532,215.19652 432.53648,221.3638 C 452.17429,227.72098 418.60544,216.24403 416.47746,215.47616 C 399.3409,209.29245 384.981,201.871 365.07972,196.35719 C 356.50304,193.98097 368.04574,203.47011 376.97163,208.61259 C 384.09584,212.71704 400.3326,218.6186 410.8303,220.67577 C 413.80016,221.25773 405.62258,219.26551 403.25811,218.50007 C 383.93797,212.24572 363.68837,206.25703 347.32274,199.29016 C 337.16151,194.96452 320.60902,187.76194 319.7193,190.76772 C 317.64131,197.78807 332.11653,204.86084 343.93558,210.73333 C 344.38579,210.95701 371.39068,221.86095 363.03627,220.22383 C 344.09987,216.51299 328.53555,210.21161 314.53134,205.21069 C 312.90758,204.63085 284.27148,191.78382 282.95571,196.22913 C 281.46757,201.25669 299.82776,211.26074 308.75661,215.46755 C 310.55914,216.3168 336.67691,227.12412 318.46293,221.22785 C 297.56,214.46112 277.98215,207.58503 259.38133,200.31046 C 254.86861,198.54558 236.0845,188.06605 230.31205,193.65607 C 224.86328,198.9327 239.34305,210.17547 247.76623,214.8776 C 259.9679,221.68901 259.86762,221.27545 244.18044,216.19718 C 225.94879,210.29516 211.87112,202.45165 198.22076,195.66927 C 188.13074,190.65591 192.89099,200.60952 193.2578,201.64157 C 195.54103,208.06567 209.29883,214.32626 217.88353,220.22394 C 223.19904,223.8757 190.71696,212.13557 190.20567,211.95299 C 170.49299,204.91357 155.12058,197.0336 137.9606,189.52818 C 130.00115,186.0469 135.36045,196.95752 138.31521,200.66686 C 143.60031,207.30159 156.04204,213.45045 165.09811,219.67193 C 165.40261,219.88115 165.57906,220.10323 165.81953,220.31887 C 165.93727,220.42445 161.17592,218.81563 154.5729,216.67809 C 134.76803,210.26684 119.75823,201.90414 104.97598,194.55936 C 91.799584,188.01245 98.621923,197.68006 100.23635,199.77716 C 104.7433,205.63152 117.70124,211.03848 121.18765,216.89443 C 123.05865,220.03709 106.56609,211.44614 105.58239,211.01587 C 90.842862,204.56913 80.012212,197.51434 65.863713,190.99256 C 53.856068,185.45758 58.919336,194.50133 59.651117,196.5603 C 61.858785,202.7718 72.710387,208.59526 75.276017,214.70928 C 76.873162,218.51539 66.636913,212.21984 64.862472,211.33818 C 55.697221,206.78429 50.123003,201.65001 42.184797,196.96919 C 40.083578,195.7302 41.092874,203.79549 41.387235,204.28993 C 43.408514,207.68496 46.007677,211.13152 47.031036,214.52265 C 47.890792,217.37162 38.951563,212.44901 38.246434,211.81668 C 37.578472,211.21768 27.324375,201.75513 30.206265,206.59574 C 32.083262,209.74847 34.604311,213.1375 35.091412,216.30727 C 35.488334,218.89009 28.33316,217.24762 25.562388,216.11629"
id="path9844" />
<path
style="fill:none;fill-rule:evenodd;stroke:#cfe4f4;stroke-width:24.11679649;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 25.362386,371.46916 C 26.113829,371.66758 26.865273,371.866 27.616716,372.06441 C 31.788793,373.16606 34.31699,382.03853 38.599221,384.14508 C 42.192079,385.9125 33.211296,361.73466 32.964994,361.1337 C 32.009071,358.80145 25.463705,343.24015 31.486019,350.44041 C 37.270349,357.35614 43.325764,364.33037 50.903256,368.93061 C 59.295406,374.02541 39.595615,337.2281 39.201072,336.56438 C 35.20641,329.8447 26.301352,313.2739 26.381897,310.73778 C 26.38362,310.68354 30.643414,318.29152 37.738163,325.36531 C 51.092293,338.68 61.357374,355.69532 75.471715,368.37947 C 80.994646,373.34277 70.607155,350.94293 63.76953,336.01328 C 56.205439,319.4974 41.610308,307.01818 34.759862,290.3043 C 32.641345,285.1355 44.389665,298.98362 52.408974,307.20555 C 71.289637,326.56317 83.283659,353.56929 100.7395,374.43946 C 101.32353,375.13772 101.90754,375.83599 102.49157,376.53423 C 102.78386,376.88372 99.702831,363.86906 95.949173,353.48709 C 84.549123,321.95654 61.97976,296.59825 41.695268,272.34616 C 39.063126,269.19918 35.972996,266.5546 33.340853,263.40763 C 25.227187,253.70694 41.074227,272.12864 42.555235,273.89932 C 64.197035,299.7742 84.324883,326.03849 104.59274,353.32126 C 122.27243,377.12012 112.75684,357.9805 106.30838,342.24743 C 94.127816,312.52901 78.460921,284.80295 58.427646,260.8512 C 37.777487,236.1619 73.179,280.81189 75.429913,283.80408 C 93.556439,307.90006 109.12097,337.07325 129.89266,358.36968 C 138.84443,367.54762 125.74337,329.96726 115.98005,309.71063 C 108.18744,293.5428 91.005584,270.54139 80.191311,262.72166 C 77.131903,260.50945 85.621333,268.1638 88.10771,271.13652 C 108.42384,295.4264 129.62244,318.6129 147.11122,345.88103 C 157.96982,362.81152 175.68444,391.0173 176.06843,378.92719 C 176.96525,350.68946 161.34411,322.91922 148.57305,299.85356 C 148.0866,298.97496 119.32752,256.35415 127.93387,262.57729 C 147.44132,276.68301 164.0195,301.31526 178.82393,320.79636 C 180.54045,323.05514 211.25177,373.40121 211.81963,355.52097 C 212.46188,335.29884 192.47522,295.93273 182.86565,279.42841 C 180.92569,276.09657 153.06754,233.82681 172.22048,256.72604 C 194.201,283.00592 214.87826,309.77847 234.64783,338.18907 C 239.44409,345.08173 259.93315,386.33725 264.75412,363.68406 C 269.30476,342.30094 252.98074,297.8085 243.79254,279.29716 C 230.48268,252.4819 230.65193,254.13621 247.14781,273.85866 C 266.31934,296.78014 281.67307,327.65747 296.42292,354.29698 C 307.32566,373.98831 300.91118,334.26764 300.37253,330.14399 C 297.01957,304.47585 282.24994,279.93322 272.70046,256.63411 C 266.78753,242.20763 301.14925,287.95741 301.68976,288.66868 C 322.52882,316.09077 339.17996,347.06128 357.55116,376.45658 C 366.07242,390.09121 358.90023,346.55735 355.33216,331.80333 C 348.95006,305.41343 335.51172,281.26499 325.43787,256.68659 C 325.09915,255.86013 324.88598,254.97676 324.61004,254.12183 C 324.47493,253.70329 329.49303,259.95994 336.43644,268.26146 C 357.26227,293.16077 373.63259,326.0819 389.60549,354.93037 C 403.84321,380.645 395.42005,342.1558 393.45873,333.81217 C 387.98337,310.51982 374.15442,289.36763 369.69665,266.02711 C 367.30433,253.50111 385.19169,287.277 386.24484,288.9621 C 402.02475,314.21111 414.008,342.05839 429.21102,367.63253 C 442.11363,389.33697 435.54933,353.27743 434.47469,345.05064 C 431.2327,320.23204 419.43475,297.32329 415.85207,272.91022 C 413.62178,257.71247 424.88508,282.53954 426.80244,286.00247 C 436.70593,303.88902 443.12512,324.25001 451.82607,342.69578 C 454.12918,347.57833 451.77194,315.27666 451.39555,313.30592 C 448.81111,299.7741 445.64169,286.05933 444.05316,272.50222 C 442.7186,261.11262 452.4584,280.48709 453.26754,282.99391 C 454.03404,285.36865 465.84549,322.89509 462.16064,303.60153 C 459.76067,291.03548 456.67879,277.54817 455.66216,264.85682 C 454.83376,254.51559 462.24495,260.80914 465.19782,265.23257"
id="path4658" />
<path
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#6e9499;stroke-width:3.6915431;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 19.635731,236.71777 C 22.887101,236.918 33.626101,232.23388 36.933002,231.72478 C 43.322217,230.74115 49.413903,231.48259 55.311354,232.39052 C 61.460763,233.33722 68.180904,235.11278 73.689705,236.38491 C 78.336633,237.458 86.312553,237.71637 92.068056,237.71637 C 98.0558,237.71637 104.818,236.43641 109.36533,235.3863 C 114.5448,234.19023 117.04892,233.38911 124.50044,233.38911 C 131.52149,233.38911 135.05881,233.6637 139.63556,234.72058 C 146.20026,236.23654 146.55455,235.71918 148.28419,235.71918"
id="path3685" />
<path
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#6e9499;stroke-width:3.03635597;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 272.26196,239.4078 C 272.82559,239.63928 285.76016,236.00808 287.5976,235.75654 C 295.0212,234.74023 299.7384,235.42186 306.26705,236.85192 C 314.50451,238.65627 317.21296,239.04267 326.27006,239.04267 C 336.25602,239.04267 344.20601,238.85402 354.27427,239.77292 C 366.56529,240.89471 377.12392,239.56578 388.94615,237.9473 C 401.94944,236.16712 408.03879,239.19189 420.28418,240.8683 C 430.31781,242.24193 439.83003,239.16264 449.62191,240.50318 C 457.97571,241.64683 462.20504,245.29661 469.62492,241.23343"
id="path3687" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.61970472;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2160"
width="124.79104"
height="35.724258"
x="152.23189"
y="122.73518" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51315171;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3166"
width="85.312355"
height="35.830814"
x="125.78846"
y="203.50175" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51315171;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3186"
width="85.312355"
height="35.830814"
x="211.55647"
y="203.50175" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.61970472;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3202"
width="124.79104"
height="35.724258"
x="152.23189"
y="160.67102" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.52413839;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3320"
width="88.823135"
height="35.820427"
x="93.645309"
y="244.27599" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51375002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3402"
width="67.930901"
height="35.885712"
x="183.25385"
y="244.24333" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51375002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3412"
width="85.312355"
height="35.830814"
x="251.61296"
y="244.27077" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51375002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3517"
width="85.312355"
height="35.830814"
x="89.030739"
y="289.741" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51375002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3545"
width="85.312355"
height="35.830814"
x="174.79875"
y="289.74103" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.51375002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3557"
width="85.312355"
height="35.830814"
x="261.03802"
y="289.74103" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.54627436;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3629"
width="223.15393"
height="30.162682"
x="110.82613"
y="332.97052" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="165.21823"
y="143.8024"
id="text7766"><tspan
sodipodi:role="line"
id="tspan7768"
x="165.21823"
y="143.8024">Query Processor</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="214.82077"
y="174.34369"
id="text7770"><tspan
sodipodi:role="line"
x="214.82077"
y="174.34369"
id="tspan7774">Relational</tspan><tspan
sodipodi:role="line"
x="214.82077"
y="189.34369"
id="tspan7778">Storage API</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="168.78156"
y="224.72771"
id="text7780"><tspan
sodipodi:role="line"
x="168.78156"
y="224.72771"
id="tspan7784">Tuple Store</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="254.27417"
y="217.22771"
id="text7788"><tspan
sodipodi:role="line"
x="254.27417"
y="217.22771"
id="tspan7796">Indices / Ref.</tspan><tspan
sodipodi:role="line"
x="254.27417"
y="232.22771"
id="tspan7800">Integrity</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="138.55492"
y="257.99677"
id="text7802"><tspan
sodipodi:role="line"
id="tspan7804"
x="138.55492"
y="257.99677">Allocation and</tspan><tspan
sodipodi:role="line"
x="138.55492"
y="272.99677"
id="tspan7806">space mgmt</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="216.80914"
y="265.31216"
id="text7808"><tspan
sodipodi:role="line"
id="tspan7810"
x="216.80914"
y="265.31216">Recovery</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="293.97617"
y="258.68811"
id="text7812"><tspan
sodipodi:role="line"
x="293.97617"
y="258.68811"
id="tspan7816">Page formats</tspan><tspan
sodipodi:role="line"
x="293.97617"
y="273.68811"
id="tspan7820">/ metadata</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="131.10391"
y="303.46695"
id="text7822"><tspan
sodipodi:role="line"
id="tspan7824"
x="131.10391"
y="303.46695">Buffer</tspan><tspan
sodipodi:role="line"
x="131.10391"
y="318.46695"
id="tspan7826">Manager</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="216.87192"
y="310.78241"
id="text7828"><tspan
sodipodi:role="line"
id="tspan7830"
x="216.87192"
y="310.78241">Logger</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="303.62094"
y="304.15839"
id="text7832"><tspan
sodipodi:role="line"
id="tspan7834"
x="303.62094"
y="304.15839">Page eviction</tspan><tspan
sodipodi:role="line"
x="303.62094"
y="319.15839"
id="tspan7836">LRU/DBMIN/?</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="222.21266"
y="343.75693"
id="text7842"><tspan
sodipodi:role="line"
id="tspan7844"
x="222.21266"
y="343.75693">OS Wrappers: I/O, Memory mgmt</tspan><tspan
sodipodi:role="line"
x="222.21266"
y="358.75693"
id="tspan7846">Threading, etc...</tspan></text>
<text
xml:space="preserve"
style="font-size:19"
x="27.8965"
y="294.55219"
id="text7848"
inkscape:export-xdpi="115.42"
inkscape:export-ydpi="115.42"><tspan
sodipodi:role="line"
x="27.8965"
y="294.55219"
style="font-size:19"
id="tspan9828">Stasis</tspan><tspan
sodipodi:role="line"
x="27.8965"
y="318.30219"
style="font-size:19"
id="tspan9834">Core</tspan><tspan
sodipodi:role="line"
x="27.8965"
y="342.05219"
style="font-size:19"
id="tspan9830">Library</tspan></text>
<text
xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="330.97623"
y="226.31837"
id="text7852"><tspan
sodipodi:role="line"
id="tspan7854"
x="330.97623"
y="226.31837">Operations API</tspan></text>
<text
xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="415.38751"
y="265.61475"
id="text7864"><tspan
sodipodi:role="line"
id="tspan7866"
x="415.38751"
y="265.61475">Record API</tspan></text>
<text
xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:center;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:middle;opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
x="423.41174"
y="300.4202"
id="text7868"><tspan
sodipodi:role="line"
id="tspan7870"
x="423.41174"
y="300.4202">Transactional</tspan><tspan
sodipodi:role="line"
x="423.41174"
y="320.4202"
id="tspan7872">Page API</tspan></text>
<text
xml:space="preserve"
style="font-size:19;text-anchor:middle;text-align:center"
x="69.480774"
y="198.53194"
id="text9820"><tspan
sodipodi:role="line"
x="69.480774"
y="198.53194"
style="font-size:19;text-anchor:middle;text-align:center"
id="tspan9822">Stasis</tspan><tspan
sodipodi:role="line"
x="69.480774"
y="222.28194"
style="font-size:19;text-anchor:middle;text-align:center"
id="tspan9824">Extensions</tspan></text>
<path
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#6e9499;stroke-width:3.6915431;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 23.73458,173.59036 C 26.98595,173.79059 37.72495,169.10647 41.03185,168.59737 C 47.42107,167.61374 53.51275,168.35518 59.4102,169.26311 C 65.55961,170.20981 72.27975,171.98537 77.78855,173.2575 C 82.43548,174.33059 90.4114,174.58896 96.16691,174.58896 C 102.15465,174.58896 108.91685,173.309 113.46418,172.25889 C 118.64365,171.06282 121.14777,170.2617 128.59929,170.2617 C 135.62034,170.2617 139.15766,170.53629 143.73441,171.59317 C 150.29911,173.10913 150.6534,172.59177 152.38304,172.59177"
id="path9840" />
<path
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#6e9499;stroke-width:3.03635597;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 276.36081,176.28039 C 276.92444,176.51187 289.85901,172.88067 291.69645,172.62913 C 299.12005,171.61282 303.83725,172.29445 310.3659,173.72451 C 318.60336,175.52886 321.31181,175.91526 330.36891,175.91526 C 340.35487,175.91526 348.30486,175.72661 358.37312,176.64551 C 370.66414,177.7673 381.22277,176.43837 393.045,174.81989 C 406.04829,173.03971 412.13764,176.06448 424.38303,177.74089 C 434.41666,179.11452 443.92888,176.03523 453.72076,177.37577 C 462.07456,178.51942 466.30389,182.1692 473.72377,178.10602"
id="path9842" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.61970472;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect11784"
width="124.79104"
height="35.724258"
x="288.42435"
y="156.20139" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="308.31888"
y="177.37405"
id="text11786"><tspan
sodipodi:role="line"
id="tspan11788"
x="308.31888"
y="177.37405">Lock Manager</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.21695054;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 296.60575,200.64572 C 321.65217,208.11628 291.2209,214.6853 311.38132,216.7662 C 331.58426,218.8515 331.82454,221.22691 311.07532,223.50996 C 290.29161,225.79681 321.75574,234.92006 296.6363,241.84105"
id="path12763"
sodipodi:nodetypes="cszz" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.21695054;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 336.87189,241.85742 C 361.91831,249.32798 331.48704,255.897 351.64746,257.9779 C 371.8504,260.0632 372.09068,262.43861 351.34146,264.72166 C 330.55775,267.00851 362.02188,276.13176 336.90244,283.05275"
id="path12765"
sodipodi:nodetypes="cszz" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.21695054;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 346.90819,287.25058 C 371.9546,294.72114 341.52333,301.29016 361.68376,303.37106 C 381.88669,305.45636 382.12697,307.83177 361.37775,310.11482 C 340.59405,312.40167 372.05817,321.52492 346.93873,328.44591"
id="path12767"
sodipodi:nodetypes="cszz" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 32 KiB

50
doc/modules Normal file
View file

@ -0,0 +1,50 @@
/**
@defgroup LLADD_CORE
*//**
@defgroup BUFFER_MANAGER
@ingroup LLADD_CORE
*//** @defgroup BUFFER_MANAGER_IMPLEMENTATIONS
@ingroup BUFFER_MANAGER
*//**
@defgroup PAGE_EVICTION
@ingroup BUFFER_MANAGER
*//**
@defgroup LOGGER
@ingroup LLADD_CORE
*//**
@defgroup LOGGING_DISCIPLINES
@ingroup LOGGER
*//**
@defgroup RECOVERY
@ingroup LLADD_CORE
*//**
@defgroup PAGE_FORMATS
*//**
@defgroup PAGE_HOWTO
@ingroup PAGE_FORMATS
*//**
@defgroup PAGE_HEADER
@ingroup PAGE_FORMATS
*//**
@defgroup PAGE_UTIL
@ingroup PAGE_FORMATS
*//**
@defgroup PAGE_RECORD_INTERFACE
@ingroup PAGE_FORMATS
*//**
@defgroup PAGE_IMPLEMENTATIONS
@ingroup PAGE_FORMATS
*//**
@defgroup ALLOCATION
*//**
@defgroup OPERATIONS
*//**
@defgroup COLLECTIONS
@ingroup OPERATIONS
*//**
@defgroup ARRAY_LIST
@ingroup COLLECTIONS
*//**
@defgroup ROSE
@ingroup OPERATIONS
*/

View file

@ -41,7 +41,9 @@ terms specified in this license.
---*/
/**
* @file Implementation of in memory buffer pool
* @file
*
* Implementation of in memory buffer pool
*
* $Id$
*

View file

@ -180,7 +180,7 @@ typedef struct nbw_impl {
static inline void freeFastHandle(nbw_impl * impl, const tree_node * n);
/** Obtain a slow handle from the pool of existing ones, or obtain a new one
by calling impl->slow_factory.. */
by calling impl.slow_factory. */
static stasis_handle_t * getSlowHandle(nbw_impl * impl) {
pthread_mutex_lock(&impl->mut);
stasis_handle_t * slow

View file

@ -41,7 +41,9 @@ terms specified in this license.
---*/
/**
@file Abstract log implementation. Provides access to methods that
@file
Abstract log implementation. Provides access to methods that
directly read and write log entries, force the log to disk, etc.
@todo Switch logger2 to use function pointers

View file

@ -12,19 +12,6 @@
#define _XOPEN_SOURCE 600
#include <math.h>
/**
Implement resizable arrays, just like java's ArrayList class.
Essentially, the base page contains a fixed size array of rids
pointing at contiguous blocks of pages. Each block is twice as
big as the previous block.
The base block is of type FIXED_PAGE, of int's. The first few slots are reserved:
*/
typedef struct {
int firstPage;
int initialSize;
@ -166,7 +153,6 @@ static compensated_function int TarrayListExtendInternal(int xid, recordid rid,
int blockSize = tlp.initialSize * pow(tlp.multiplier, i);
int newFirstPage = TpageAllocMany(xid, blockSize);
DEBUG("block %d\n", i);
/* We used to call OPERATION_INITIALIZE_FIXED_PAGE on each page in current indirection block. */
tmp.slot = i + FIRST_DATA_PAGE_OFFSET;
/* Iterate over the (large number) of new blocks, clearing their contents */
/* @todo XXX arraylist generates N log entries initing pages.

View file

@ -1,6 +1,8 @@
/**
@file Implements three phase recovery
@file
Implements three phase recovery
*/
@ -20,7 +22,7 @@
#include <stasis/operations/prepare.h>
#include <stasis/logger/logHandle.h>
/** @todo Get rid of linkedlist.[ch] */
/** @todo Get rid of linkedlist */
#include <stasis/linkedlist.h>
#include <stasis/page.h> // Needed for pageReadLSN.
@ -28,7 +30,7 @@
static pblHashTable_t * transactionLSN;
static LinkedList * rollbackLSNs = NULL;
/** @todo There is no real reason to have this mutex (which prevents
concurrent aborts, except that we need to protect rollbackLSNs's
concurrent aborts), except that we need to protect rollbackLSNs's
from concurrent modifications. */
static pthread_mutex_t rollback_mutex = PTHREAD_MUTEX_INITIALIZER;

View file

@ -68,9 +68,7 @@ void setupOperationsTable() {
operationsTable[OPERATION_NOOP] = getNoop();
operationsTable[OPERATION_INSTANT_SET] = getInstantSet();
operationsTable[OPERATION_ARRAY_LIST_ALLOC] = getArrayListAlloc();
// operationsTable[OPERATION_INITIALIZE_FIXED_PAGE] = getInitFixed();
operationsTable[OPERATION_INITIALIZE_PAGE] = getInitializePage();
// operationsTable[OPERATION_UNINITIALIZE_PAGE] = getUnInitPage();
operationsTable[OPERATION_LINEAR_INSERT] = getLinearInsert();
operationsTable[OPERATION_UNDO_LINEAR_INSERT] = getUndoLinearInsert();

View file

@ -73,7 +73,7 @@ terms specified in this license.
When such a value is returned, the transaction aborts, and an
error is passed up to the application.
* @ingroup LLADD_CORE
@ingroup BUFFER_MANAGER
* $Id$
*/

View file

@ -43,7 +43,9 @@ terms specified in this license.
/**
* @file
*
* New version of logger. Based on logger.h
* Interface to Stasis' log file.
*
* @ingroup LOGGING_DISCIPLINE
*
* $Id$
*

View file

@ -45,10 +45,21 @@ terms specified in this license.
*
* Interface for defining new logical operations.
*
* @ingroup LLADD_CORE OPERATIONS
* @ingroup OPERATIONS
* @todo The functions in operations.h don't belong in the API, but it defines some constants and typedefs that should be there.
* $Id$
*/
/**
@defgroup COLLECTIONS Collections
Stasis provides a number of general-purpose data structures for use
by applications.
Stasis provides a number of general-purpose data structures for use
by applications. This section documents these data structures and
associated interfaces, such as iterators.
*/
#ifndef __OPERATIONS_H__
#define __OPERATIONS_H__

View file

@ -42,32 +42,84 @@ terms specified in this license.
/**
@file
Implements an extendible array of fixed length records with O(1)
complexity for all operations.
@ingroup ARRAY_LIST
@ingroup OPERATIONS
@defgroup ARRAY_LIST ArrayList
O(1) growable array.
ArrayList provides an growable array of fixed length records with
O(1) complexity for all operations. The list grows by doubling the
amount of space it reserves each time the list is extended.
Therefore, this data structure can use up to twice as much storage
as is strictly necessary.
These arrays are similar to those in Java's ArrayList class.
Essentially, the base page contains a fixed size array of recordid's
pointing at contiguous blocks of pages. Each block is twice as big
as the previous block.
The base block is of type FIXED_PAGE, of int values. The first few slots
are reserved and store information about the arrayList (size of
array entries, number/size of allocated regions, etc.)
@todo arrayList's base block should store pageid_t values, not ints.
@ingroup COLLECTIONS
$Id$
*/
/** @ingroup ARRAY_LIST */
/** @{ */
#ifndef __ARRAY_LIST_H
#define __ARRAY_LIST_H
/** Allocate a new array list.
@param xid The transaction allocating the new arrayList.
@param numPages The number of pages to be allocated as part of the
first region. (The arraylist starts with zero capacity
regardless of this parameter's value.)
@param multiplier Each time the array list runs out of space, the
allocate multipler times more space than last time.
@param recordSize The size of the things stored in this arrayList.
Must fit on a single page (arrayList cannot store blobs.)
*/
compensated_function recordid TarrayListAlloc(int xid, int numPages, int multiplier, int recordSize);
/**
Extend the ArrayList in place.
@param xid the transaction performing the expansion
@param rid the recordid pointing to the ArrayList.
@param slots the number of slots to end to the end of the ArrayList.
*/
compensated_function int TarrayListExtend(int xid, recordid rid, int slots);
/**
Do not call this function.
@deprecated This function is known to be broken, and is only
called by a deprecated hash implementation.
*/
compensated_function int TarrayListInstantExtend(int xid, recordid rid, int slots);
/**
Get the length of an ArrayList.
@param xid the transaction performing the expansion
@param rid the recordid pointing to the ArrayList.
@return The number of items stored in the ArrayList.
*/
compensated_function int TarrayListLength(int xid, recordid rid);
/** Used by Tread() and Tset() to map from arrayList index to recordid. */
recordid dereferenceArrayListRid(int xid, Page * p, int offset);
Operation getArrayListAlloc();
Operation getInitFixed();
Operation getUnInitPage();
/** Initialized a fixed page with the maximum possible number of slots
allocated. The rid.size field is used to determine the size of
record that the slots can hold. */
#define TinitFixed(xid, rid) Tupdate(xid, rid, NULL, OPERATION_INITIALIZE_FIXED_PAGE)
/** Un-initializes a page. */
#define TunInitPage(xid, rid) Tupdate(xid, rid, NULL, OPERATION_UNINITIALIZE_PAGE)
recordid dereferenceArrayListRid(int xid, Page * p, int offset);
compensated_function int TarrayListExtend(int xid, recordid rid, int slots);
compensated_function int TarrayListInstantExtend(int xid, recordid rid, int slots);
compensated_function int TarrayListLength(int xid, recordid rid);
/** @} */
#endif

View file

@ -87,12 +87,14 @@ void TlsmFree(int xid, recordid tree, lsm_page_deallocator_t dealloc,
/**
Lookup a leaf page.
@param xid The transaction that is looking up this page
@param tree The tree to be queried.
@param key The value you're looking for. The first page that may
contain this value will be returned. (lsmTree supports
duplicate keys...)
@param keySize Must match the keySize passed to TlsmCreate.
Currently unused.
duplicate keys...) LSM trees currently store fixed
length keys, so there is no keySize parameter.
*/
pageid_t TlsmFindPage(int xid, recordid tree,
const byte *key);

View file

@ -48,13 +48,13 @@ terms specified in this license.
* This file provides a re-entrant interface for pages that are labeled
* with an LSN and a page type.
*
* @ingroup LLADD_CORE pageFormats
* @ingroup PAGE_FORMATS
*
* $Id$
*/
/**
@defgroup pageFormats Page format implementations
@defgroup PAGE_FORMATS Page layouts
Stasis allows developers to define their own on-disk page formats.
Currently, each page format must end with a hard-coded header
@ -90,7 +90,7 @@ terms specified in this license.
and APIs. However, Stasis's record oriented page interface
provides a default set of methods for page access.
@see pageRecordInterface
@see PAGE_RECORD_INTERFACE
@todo Page deallocators should call stasis_page_cleanup()
@todo Create variant of loadPage() that takes a page type
@ -196,8 +196,7 @@ struct Page_s {
/*@}*/
/**
@defgroup pageLSNHeaderGeneric LSN and Page Types
@ingroup pageFormats
@defgroup PAGE_HEADER Default page header
Most Stasis pages contain an LSN and a page type. These are used
by recovery to determine whether or not to perform redo. At
@ -279,8 +278,7 @@ lsn_t stasis_page_lsn_read(const Page * page);
/*@}*/
/**
@defgroup pageUtils Utility methods for page manipulation
@ingroup pageFormats
@defgroup PAGE_UTIL Byte-level page manipulation
These methods make it easy to manipulate pages that use a standard
Stasis header (one with an LSN and page type).
@ -291,6 +289,60 @@ lsn_t stasis_page_lsn_read(const Page * page);
Methods with "_ptr_" in their names take non-const pages, and
return non-const pointers.
@par Implementing new pointer arithmetic macros
Stasis page type implementations typically do little more than
pointer arithmetic. However, implementing page types cleanly and
portably is a bit tricky. Stasis has settled upon a compromise in
this matter. Its page file formats are compatible within a single
architecture, but not across systems with varying lengths of
primitive types, or that vary in endianness.
Over time, types that vary in length such as "int", "long", etc
will be removed from Stasis, but their usage still exists in a few
places. Once they have been removed, file compatibility problems
should be limited to endianness (though application code will still
be free to serialize objects in a non-portable manner).
Most page implementations leverage C's pointer manipulation
semantics to lay out pages. Rather than casting pointers to
char*'s and then manually calculating byte offsets using sizeof(),
the existing page types prefer to cast pointers to appropriate
types, and then add or subtract the appropriate number of values.
For example, instead of doing this:
@code
// p points to an int, followed by a two bars, then the foo whose address
// we want to calculate
int * p;
foo* f = (foo*)( ((char*)p) + sizeof(int) + 2 * sizeof(bar))
@endcode
the implementations would do this:
@code
int * p;
foo * f = (foo*)( ((bar*)(p+1)) + 2 )
@endcode
The main disadvantage of this approach is the large number of ()'s
involved. However, it lets the compiler deal with the underlying
multiplications, and often reduces the number of casts, leading to
slightly more readable code. Take this implementation of
stasis_page_type_ptr(), for example:
@code
int * stasis_page_type_ptr(Page *p) {
return ( (int*)stasis_page_lsn_ptr(Page *p) ) - 1;
}
@endcode
Here, the page type is stored as an integer immediately before the
LSN pointer. Using arithmetic over char*'s would require an extra
cast to char*, and a multiplication by sizeof(int).
*/
/*@{*/
static inline byte*
@ -365,14 +417,37 @@ void stasis_page_init();
void stasis_page_deinit();
/**
@defgroup pageRecordInterface Record-oriented page interface
@ingroup pageFormats
@defgroup PAGE_RECORD_INTERFACE Record interface
@ingroup PAGE_FORMATS
Page formats define the layout of data on pages. Currently, all
pages contain a header with an LSN and a page type in it. This
information is used by recovery and the buffer manager to invoke
callbacks at appropriate times. (LSN-free pages are currently not
supported.)
Stasis' record-oriented page interface uses the page type to determine
which page implementation should be used to access or modify
records. This API's functions begin with "stasis_record". Two
commonly used examples are stasis_read_record() and
stasis_write_record().
This interface is not re-entrant. Rather, page implementations
assume that their callers will latch pages using
readLock(p->rwlatch) and writeLock(p-rwlatch) before attempting to
access the page. A second latch, p->loadlatch, should not be
acquired by page manipulation code. Instead, it is used by the
buffer manager to protect against races during page eviction.
@par Registering new page type implementations
Page implementations are registered with Stasis by passing a
page_impl struct into registerPageType(). page_impl.page_type
should contain an integer that is unique across all page types,
while the rest of the fields contain function pointers to the page
type's implementation.
Stasis provides a default record-oriented interface to page
implementations. By defining these methods, and registering
appropriate callbacks, page implementations allow callers to
access their data through standard Stasis methods such as Tread()
and Tset().
*/
/*@{*/
static const size_t USABLE_SIZE_OF_PAGE = (PAGE_SIZE - sizeof(lsn_t) - sizeof(int));

View file

@ -56,13 +56,59 @@ terms specified in this license.
/**
@mainpage Introduction to Stasis
This is the main section.
<ul>
<li>@ref gettingStarted</li>
<li>@ref pageFormats</li>
<li>@ref LLADD_CORE</li>
<li>@ref OPERATIONS</li>
</ul>
Stasis is a <i>flexible</i> transactional storage library. Unlike
existing systems, it provides application and server developers
with much freedom, but little guidance regarding page file layouts,
data models, and concurrency schemes. This often means that Stasis
can outperform general purpose storage solutions by orders of
magnitude, but it does require more effort on the part of its end
users. We are in the process of implementing a library of commonly
used, general-purpose transactional data structures on top of
Stasis.
@section The Stasis data model
Stasis does not really have a data model. While designing and
implementing Stasis, we focused on providing end users with
<i>mechanisms, not policy</i>. As much as possible, we have
avoiding hardcoding application-specific implmentation details such
as data formats and concurrency models. Instead, Stasis provides a
number of reusable lower-level mechanisms that make it easy for
applications to implement custom transactional storage systems.
At the lowest level, Stasis provides <i>transactional pages</i>;
the buffer manager manages a set of pages and regions on disk, and
coordinates with the log and other Stasis mechanisms to provide
recovery and concurrent transactions. On top of this low level
API, we have developed record oriented interfaces that facilitate
development and interchangability of new page formats. Conformance
to these APIs is recommended, but not required. Stasis records are
simply arrays of bytes (not tuples). A Stasis recordid is simply a
record that contains a pointer to another record.
Stasis's @ref OPERATIONS provide a set of methods that manipulate
records in a transactional, durable fashion. They are implemented
on top of the record (and sometimes page) API's, and range from low
level access methods like record reads and writes to higher level
data structure implementations, such as hash tables and log-oriented
tree indexes. Stasis' library of operations makes use of a number of
different @ref LOGGING_DISCIPLINES. Most new operations will want to
choose one of these disciplines, as many subtlties arise during the
development of new concurrent, high-performance recovery
algorithms.
@image html "StasisDBMS.png" "Stasis' place in a conventional DBMS architecture"
@section Tutorial
@ref gettingStarted explains how to download and compile Stasis,
and includes a number of sample programs.
The "Modules" section in the navigation pane contains detailed
documentation of Stasis' major components.
@see <a href="modules.html">Modules</a>
*/
/**
@ -109,11 +155,11 @@ terms specified in this license.
This will fail if your system defaults to an old (pre-1.7) version
of autotools. Fortunately, multiple versions of autotools may
exist on the same system. Execute the following commands to
compile with version 1.8 of autotools:
compile with version 1.8 (or 1.9) of autotools:
@code
$ ./reconf-1.8
$ ./reconf-1.8 # or ./reconf-1.9
$ ./configure --quiet
$ make -j4 > /dev/null
$ cd test/stasis
@ -133,7 +179,7 @@ terms specified in this license.
@section usage Using Stasis in your software
Synopsis:
Synopsis (examples/ex1.c):
@include examples/ex1.c
@ -153,25 +199,27 @@ terms specified in this license.
or naming of objects within the page file. This means that the application
must maintain such information manually.
In order to facilitate this, Stasis provides the function TgetRecordType() and
guarantees that the first recordid returned by any allocation will point to
the same page and slot as the constant ROOT_RECORD. TgetRecordType
will return NULLRID if the record passed to it does not exist.
In order to facilitate this, Stasis provides the function
TrecordType() and guarantees that the first recordid returned by
any allocation will point to the same page and slot as the constant
ROOT_RECORD. TrecordType() will return UNINITIALIZED_RECORD if the
record passed to it does not exist. A second function,
TrecordSize() returns the size of a record in bytes, or -1 if the
record does not exist.
Therefore, the following code will safely initialize or reopen a data
store:
Therefore, the following code (found in examples/ex2.c) will safely
initialize or reopen a data store:
@include examples/ex2.c
@see test.c for a complete, executable example of reopening an existing store.
@todo Explain how to determine the correct value of rootEntry.size in the case
of a hashtable.
@see OPERATIONS for more operations that may be useful for your software.
@see OPERATIONS for other transactional primitives that may be
useful for your software.
@subsection consistency Using Stasis in multithreaded applications.
@subsection consistency Using Stasis in multithreaded applications
Unless otherwise noted, Stasis' operations are re-entrant. This
means that an application may call them concurrently without
@ -229,7 +277,7 @@ terms specified in this license.
Stasis components can be classified as follows:
- I/O utilities (file handles, OS compatibility wrappers)
- Write ahead logging component interfaces (logger.h, XXX)
- Write ahead logging component interfaces (logger.h, logger/inMemoryLog.h logger/logEntry.h logger/logger2.h logger/logHandle.h logger/logMemory.h logger/logWriter.h)
- Write ahead logging component implementations (hash based buffer manager, in memory log, etc...)
- Page formats and associated operations (page/slotted.c page/fixed.c)
- Application visible methods (Talloc, Tset, ThashInsert, etc)
@ -353,106 +401,50 @@ terms specified in this license.
Interesting files in this part of Stasis include logger2.c,
bufferManager.c, and recovery2.c.
@subsection page Page types
@subsection page Custom page formats
Page types define the layout of data on pages. Currently, all
pages contain a header with an LSN and a page type in it. This
information is used by recovery and the buffer manager to invoke
callbacks at appropriate times. (LSN-free pages are currently not
supported.)
Stasis provides a default @ref PAGE_RECORD_INTERFACE to custom page
implementations. Methods that define their own log disciplines, or
otherwise need to bypass Stasis' default recovery mechanisms should
call into this API.
XXX: This section is not complete.
@todo Discuss readRecord, writeRecord (high level page access
methods)
@todo Explain the latching convention. (Also, explain which
latches are not to be used by page implementations, and which
latches may not be used by higher level code.)
@par Registering new page type implementations
Page implementations are registered with Stasis by passing a
page_impl struct into registerPageType(). page_impl.page_type
should contain an integer that is unique across all page types,
while the rest of the fields contain function pointers to the page
type's implementation.
@par Pointer arithmetic
Stasis page type implementations typically do little more than
pointer arithmetic. However, implementing page types cleanly and
portably is a bit tricky. Stasis has settled upon a compromise in
this matter. Its page file formats are compatible within a single
architecture, but not across systems with varying lengths of
primitive types, or that vary in endianness.
Over time, types that vary in length such as "int", "long", etc
will be removed from Stasis, but their usage still exists in a few
places. Once they have been removed, file compatibility problems
should be limited to endianness (though application code will still
be free to serialize objects in a non-portable manner).
Most page implementations leverage C's pointer manipulation
semantics to lay out pages. Rather than casting pointers to
char*'s and then manually calculating byte offsets using sizeof(),
the existing page types prefer to cast pointers to appropriate
types, and then add or subtract the appropriate number of values.
For example, instead of doing this:
@code
// p points to an int, followed by a two bars, then the foo whose address
// we want to calculate
int * p;
foo* f = (foo*)( ((char*)p) + sizeof(int) + 2 * sizeof(bar))
@endcode
the implementations would do this:
@code
int * p;
foo * f = (foo*)( ((bar*)(p+1)) + 2 )
@endcode
The main disadvantage of this approach is the large number of ()'s
involved. However, it lets the compiler deal with the underlying
multiplications, and often reduces the number of casts, leading to
slightly more readable code. Take this implementation of
stasis_page_type_ptr(), for example:
@code
int * stasis_page_type_ptr(Page *p) {
return ( (int*)stasis_page_lsn_ptr(Page *p) ) - 1;
}
@endcode
Here, the page type is stored as an integer immediately before the
LSN pointer. Using arithmetic over char*'s would require an extra
cast to char*, and a multiplication by sizeof(int).
By defining these methods and registering appropriate callbacks,
page implementations allow callers to access their data through
standard Stasis methods such as Tread() and Tset(). This module
also includes a set of utility methods to simplify the pointer
arithmetic associated with manipulating the buffer manager's copy
of pages.
@par A note on storage allocation
Finally, while Stasis will correctly call appropriate functions
when it encounters a properly registered third party page type, it
currently provides few mechanisms to allocate such pages in the
first place. There are examples of three approaches in the current
code base:
Stasis currently provides a few different mechanisms that allocate
entire pages and page ranges at once. There are examples of three
approaches in the current code base:
# Implement a full-featured, general purpose allocator, like the
- Implement a full-featured, general purpose allocator, like the
one in alloc.h. This is more difficult than it sounds.
# Allocate entire regions at a time, and manually initialize pages
within them. arrayList.h attempts to do this, but gets it wrong
by relying upon lazy initialization to eventually set page types
correctly. Doing so is problematic if the page was deallocated,
then reused without being reset.
- Allocate entire regions at a time, and manually initialize pages
within them. arrayList.h does this. This is the most flexible
and efficient approach, but requires extra management code if
region allocation is not a natural approach.
# Allocate a single page at a time using TallocPage(), and
TsetPage(). This is currently the most attractive route, though
TsetPage() does not call pageLoaded() when it resets page types,
which can lead to trouble.
- Allocate a single page at a time using TallocPage(), then call
page initialization methods on each page. Currently,
TallocPage() is poorly implemented and wastes one page for every
page it allocates.
Note that before you initialize a new page you need to call
stasis_page_cleanup() to notify the page's old format that it should
free resources associated with the old version of the page.
Stasis' allocation routines guarantee that the pages they return
were freed by committed transactions (and therefore, that their
contents can be discarded). Therefore, you do not need to log the
preimage of pages returned by the allocator.
@todo Should we change the API so that allocation routines (TpageAlloc(), TregionAlloc()) call stasis_page_cleanup() on behalf of their callers?
@todo Optimize page, region allocation to call page initializers automatically during forward operation and redo?
@see page.h, fixed.h, and slotted.h for more information on the
page API's, and the implementations of two common page formats.
@ -461,8 +453,7 @@ terms specified in this license.
These methods start with "T". Look at the examples above. These
are the "wrapper functions" from the OSDI paper. They are
supported by operation implementations, which can be found in the
operations/ directory.
supported by @ref OPERATIONS.
@section extending Implementing you own operations
@ -472,9 +463,6 @@ terms specified in this license.
@see linearHashNTA.h for a more sophisticated example that makes use of Nested Top Actions.
*/
/**
* @defgroup pageFormats Page format implementations
*/
/**
* @defgroup OPERATIONS Logical Operations
*
@ -483,6 +471,53 @@ terms specified in this license.
* @todo Write a brief howto to explain the implementation of new operations.
*
*/
/**
* @defgroup LOGGING_DISCIPLINES Logging Disciplines
*
* Stasis' log API provides a number of methods that directly
* manipulate the log.
*
* @section SNF STEAL/NO-FORCE recovery
* Stasis includes a function, Tupdate(), that
* provides traditional STEAL/NO-FORCE logging for recovery. The
* STEAL/NO-FORCE strategy allows dirty, uncommitted pages to be
* written back to disk (STEAL), which prevents long running
* transactions from exhausting RAM. It does not force write pages to
* disk at commit (NO-FORCE), and instead only forces the log. This
* prevents the hard drive head from performing unnecessary seeks
* during commit. Recovery works by "repeating history"; all actions
* are redone up to some point in time after the last successful
* transaction committed, but before the crash. Conceptually, any
* partially commited transactions are then rolled back using
* Tabort(), as they would be during normal operation. For more
* information about STEAL/NO-FORCE recovery strategies, see the ARIES
* paper (XXX cite aries properly)
*
*
* @section SF STEAL/FORCE and bulk-logged recovery
*
* Stasis supports other logging disciplines as well. In particular,
* the buffer manager allows REGIONS (XXX document region allocator)
* to be synchronously written to disk, allowing operations to make
* use of a STEAL/FORCE recovery strategy. This is attractive when a
* transaction is writing a large, contiguous region of disk, as
* STEAL/FORCE operations do not write redo information to the log.
* If the STEAL/FORCE transaction is overwriting newly allocated
* pages, it can also avoid writing undo information to the log, as
* the newly allocated pages do not contain useful data. This allows
* large objects to be written with no tangible logging overhead, and
* has been implemented by a number of commercial systems. It is used
* by the Stasis' Rose indexes. (XXX cite LSM trees, etc.)
*
* @section LSNFREE LSN-Free pages
*
* Stasis' third (and most exotic) logging strategy makes use of
* LSN-free pages. By constraining the behavior of redo and undo log
* entries, we can entirely avoid storing Stasis metadata on pages.
* This logging discipline is under development.
*
*/
/**
* @file