00001 // -*- mode:c++; c-basic-offset:4 -*- 00002 /*<std-header orig-src='shore' incl-file-exclusion='API_H'> 00003 00004 $Id: api.h,v 1.9 2012/01/02 17:02:07 nhall Exp $ 00005 00006 SHORE -- Scalable Heterogeneous Object REpository 00007 00008 Copyright (c) 1994-99 Computer Sciences Department, University of 00009 Wisconsin -- Madison 00010 All Rights Reserved. 00011 00012 Permission to use, copy, modify and distribute this software and its 00013 documentation is hereby granted, provided that both the copyright 00014 notice and this permission notice appear in all copies of the 00015 software, derivative works or modified versions, and any portions 00016 thereof, and that both notices appear in supporting documentation. 00017 00018 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY 00019 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS 00020 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND 00021 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 00022 00023 This software was developed with support by the Advanced Research 00024 Project Agency, ARPA order number 018 (formerly 8230), monitored by 00025 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518. 00026 Further funding for this work was provided by DARPA through 00027 Rome Research Laboratory Contract No. F30602-97-2-0247. 00028 00029 */ 00030 00031 /* -- do not edit anything above this line -- </std-header>*/ 00032 00033 /* 00034 * This file contains doxygen documentation only 00035 * Its purpose is to determine the layout of the SSMAPI 00036 * page, which is the starting point for the on-line 00037 * storage manager documentation. 00038 */ 00039 00040 /**\defgroup SSMAPI SHORE Storage Manager Application Programming Interface (SSM API) 00041 *\section SSMINTRO Introduction 00042 * 00043 * Most of the SHORE Storage Manager functionality is presented to the 00044 * user (server-writer) in two C++ classes, ss_m and smthread_t. 00045 * The ss_m is the SHORE storage manager, a single instance of which must be 00046 * constructed before any storage manager methods may be used. 00047 * There cannot be more than one ss_m instance extant. 00048 * The construction of the single instance performs recovery. Deletion 00049 * of the single instance shuts down the storage manager. 00050 * 00051 * The storage manager stores state information in per-thread variables; for 00052 * this reason, storage manager methods must be called in the context 00053 * of a storage manager thread, smthread_t. 00054 * This means they must be called 00055 * (directly or indirectly) by the run() method of a class derived from 00056 * smthread_t. As a result, you must write a class to encapsulate 00057 * your server functionality, and that class must derive from smthread_t, as 00058 * described in the following pseudo-code: 00059 * 00060 * \verbatim 00061 main() 00062 { 00063 // Marshall all the resources needed to get going: 00064 // "Open" the sources of work for your server, such as 00065 // listening on a network socket, or opening an input 00066 // file for reading. 00067 // 00068 // Start up a storage manager: 00069 your_server_thread_t *server = new your_server_thread_t(...); 00070 // let the server thread do its thing 00071 server->fork(); 00072 // wait until it's done 00073 server->join(); 00074 // clean up 00075 delete server; 00076 // un-marshall resources (close files, clean up, etc) 00077 } 00078 00079 // This class creates and destroys a storage manager, 00080 // and forks the worker threads that use the storage manager. 00081 class \em your_server_thread_t : public smthread_t 00082 { 00083 your_server_thread_t ( ...sources... ) ; 00084 ~your_server_thread_t () ; 00085 void run(); // this is virtual in smthread_t 00086 }; 00087 00088 // This class performs work given to it by a source. 00089 // It uses the given storage manager instance to perform that work. 00090 00091 class \em your_worker_thread_t : public smthread_t 00092 { 00093 your_worker_thread_t (ss_m *ssm, ...source... ) ; 00094 ~your_worker_thread_t () ; 00095 void run(); // this waits for work from its assigned source 00096 // (e.g., from terminal input or from a network connection), and 00097 // performs the necessary work 00098 }; 00099 00100 void your_server_thread_t::run() 00101 { 00102 // marshal resources neeeded for storage manager work 00103 // including run-time options (see discussion below). 00104 ss_m *ssm = new ss_m(...); 00105 00106 // Fork off some number of threads 00107 // worker threads that use the instance ssm. 00108 // Either pass ssm to these threads' constructors or 00109 // make ssm global. 00110 for(int i = 0; i < num_threads; i++) { 00111 workers[i] = new your_worker_t(ssm, ... source ... ); 00112 } 00113 00114 // smthreads' run() method is not called until thread is forked. 00115 for(int i = 0; i < NUM_THREADS; i++) { 00116 workers[i]->fork(); 00117 } 00118 00119 // Await and join worker threads. Join() returns when thread's 00120 // run() method returns. 00121 for(int i = 0; i < NUM_THREADS; i++) { 00122 workers[i]->join(); 00123 } 00124 for(int i = 0; i < NUM_THREADS; i++) { 00125 delete workers[i]; 00126 } 00127 00128 delete ssm; 00129 // un-marshal (clean up) resources neeeded for storage manager work 00130 } // a join() on this thread now returns. 00131 00132 * \endverbatim 00133 * 00134 * The storage manager relies heavily on certain programming idioms 00135 * to make sure return values from all methods are checked. 00136 * The idioms are encapsulated in preprocessor macros. 00137 * As a user of the storage manager, you 00138 * strongly encouraged to use these idioms. 00139 * Although the use of the macros is optional, 00140 * perusal of the storage manager source code and examples 00141 * will be easier if you are aware of them. 00142 * They are described in \ref IDIOMS, \ref MACROS, and \ref w_rc.h. Before you 00143 * spend much time looking at examples, it would be worthwhile to look at the 00144 * macro definitions in \ref w_rc.h. 00145 * 00146 * The storage manager is parameterized with options and their associated values. 00147 * The options determine such things as the size of the buffer pool 00148 * and lock table, 00149 * the location of the log, 00150 * lock granularity, 00151 * certain caching behavior. 00152 * Most of these have default values, but some options 00153 * (such as a path name indicating the location of the log) 00154 * do not have a default value and must be given values at run time. 00155 * 00156 * An options-processing package is provided for this 00157 * purpose. It handles the parsing of option names and values, which 00158 * may be given on the command line, or in a file or input stream. 00159 * Because certain options \e must be given a value at run-time, 00160 * the use of this package is \e not optional: every server must at 00161 * least create a minimal set of options and give them values. 00162 * In the above pseudo-code, invoking the run-time options package would 00163 * be inserted in 00164 * \code your_server_thread_t::run() \endcode 00165 * or in 00166 * \code main(). \endcode 00167 * 00168 * The storage manager release comes with small examples illustrating 00169 * how the options are to be used. 00170 * 00171 * See 00172 * - \ref SSMOPT for an inventory of the storage manager's options, 00173 * - \ref OPTIONS for a discussion of code to initialize the options, 00174 * - \ref SSMINIT and \ref smthread_t for discussion of how to initialize and start up 00175 * a storage manager, 00176 * - \ref startstop.cpp for an example of the minimal required use of 00177 * options in a server, and 00178 * - the example consisting of \ref create_rec.cpp and \ref init_config_options.cpp for a more complete example. 00179 * 00180 * With few exceptions, the storage manager does work on behalf of a 00181 * \e transaction and the storage manager acquires locks for that transaction, 00182 * e.g., to read a record, the storage manager acquires read locks and to update a record it 00183 * acquires write locks. 00184 * Rather than expect the transaction of interest to be given as an argument to every storage manager method, the storage manager 00185 * assumes an \e attachment between a storage manager thread and a transaction. 00186 * The attachment is not fixed and permanent; rather, 00187 * a worker thread can choose which transaction it is serving, 00188 * and can set aside transaction A and proceed to serve transaction B, while another 00189 * thread can pick up transaction B and do work on its behalf. 00190 * A thread cannot serve more than one transaction at any time, and, except under 00191 * limited circumstances, 00192 * a transaction cannot be served by more than one thread at a time. 00193 * Through the API, a storage manager thread can : 00194 * - start a new transaction (implictly attaching the transaction to the thread) 00195 * - detach the attached transaction 00196 * - attach an arbitrary transaction 00197 * - perform work on behalf of the attached transaction 00198 * - prepare the attached transaction 00199 * - commit or abort the attached transaction (implicitly detaching it) 00200 * 00201 * See \ref SSMXCT for details. 00202 * 00203 * Persistent data are contained in a variety of storage structures (files of records, indexes, etc.). 00204 * All data structures reside in volumes, which are \e mounted. 00205 * Identifiers for data on the volume contain that volume number. The act of mounting a volume 00206 * creates the association of the volume number with the path name of a Unix file. 00207 * OK, that's a lie. The original design of SHORE called for multiple volumes per Unix file, 00208 * and so the file was associated with a \e device, and volumes were contained in a device. 00209 * SHORE never supported multiple volumes on a device, but the device-volume distinction remains. 00210 * Thus, a server mounts (and formats, if necessary) a device, which is identified by a path name. 00211 * Then the server creates a volume (numbered), which resides on the device. 00212 * 00213 * See \ref SSMSTG for details about storage structures, and see \ref IDS for a description of the 00214 * identifiers used for storage structures and transactions. 00215 * 00216 * Please refer to the list of modules at the bottom of this page for more information. 00217 */ 00218 00219 /**\defgroup IDIOMS Programming Idioms 00220 * \ingroup SSMAPI 00221 */ 00222 00223 /**\defgroup MACROS Significant C Preprocessor Macros 00224 * \ingroup SSMAPI 00225 * 00226 * See the "Defines" sections in the files listed below to see 00227 * significant macros used in the storage manager source code. 00228 * (This is not a complete list.) 00229 * 00230 * The macros that are useful for value-added-server code are 00231 * those found in \ref w_rc.h. 00232 */ 00233 00234 /**\defgroup IDS Identifiers 00235 * \ingroup SSMAPI 00236 * 00237 * Identifiers for persistent storage entities are used throughout 00238 * the storage manager API. This page collects them for convenience of 00239 * reference. 00240 */ 00241 00242 /**\defgroup SSMINIT Starting Up, Shutting Down, Thread Context 00243 * \ingroup SSMAPI 00244 * 00245 * \section SSMSTART Starting a Storage Manager 00246 * Starting the Storage Manager consists in 2 major things: 00247 * - Initializing the options the storage manager expects to be set. 00248 * See 00249 * - \ref OPTIONS for a discussion of code to initialize the options 00250 * - \ref SSMOPT for an inventory of the storage manager's options. 00251 * - Constructing an instance of the class ss_m. 00252 * The constructor ss_m::ss_m performs recovery, and when 00253 * it returns to the caller, the caller may begin 00254 * using the storage manager. 00255 * 00256 * No more than one instance may exist at any time. 00257 * 00258 * Storage manager functions must be called in the context of 00259 * a run() method of an smthread_t. 00260 * 00261 * See \ref create_rec.cpp for an example of how this is done. 00262 * 00263 * See also \ref SSMLOGSPACEHANDLING and \ref LOGSPACE for discussions 00264 * relating to the constructor and its arguments. 00265 * 00266 * \section SSMSHUTDOWN Shutting Down a Storage Manager 00267 * Shutting down the storage manager consists of deleting the instance 00268 * of ss_m created above. 00269 * 00270 * The storage manager normally shuts down gracefully; if you want 00271 * to force an unclean shutdown (for testing purposes), you can do so. 00272 * See ss_m::set_shutdown_flag. 00273 * 00274 * \section SSMLOGSPACEHANDLING Handling Log Space 00275 * The storage manager contains a primitive mechanism for responding 00276 * to potential inability to rollback or recover due to lack of log 00277 * space. 00278 * When it detects a potential problem, it can issue a callback to the 00279 * server, which can then deal with the situation as it sees fit. 00280 * The use of such a callback mechanism is entirely optional. 00281 * 00282 * The steps that are necessary are: 00283 * - The server constructs the storage manager ( ss_m::ss_m() ) with two callback function 00284 * pointers, 00285 * the first of type \ref ss_m::LOG_WARN_CALLBACK_FUNC, and 00286 * the second of type \ref ss_m::LOG_ARCHIVED_CALLBACK_FUNC. 00287 * - The server is run with a value given to the sm_log_warn option, 00288 * which determines the threshold at which the storage manager will 00289 * invoke *LOG_WARN_CALLBACK_FUNC. This is a percentage of the 00290 * total log space in use by active transactions. 00291 * This condition is checked when any thread calls a storage manager 00292 * method that acts on behalf of a transaction. 00293 * - When the server calls the given LOG_WARN_CALLBACK_FUNC, that function 00294 * is given these arguments: 00295 * - iter Pointer to an iterator over all xcts. 00296 * - victim Victim will be returned here. 00297 * - curr Bytes of log consumed by active transactions. 00298 * - thresh Threshhold just exceeded. 00299 * - logfile Character string name of oldest file to archive. 00300 * 00301 * The initial value of the victim parameter is the transaction that 00302 * is attached to the running thread. The callback function might choose 00303 * a different victim and this in/out parameter is used to convey its choice. 00304 * 00305 * The callback function can use the iterator to iterate over all 00306 * the transactions in the system. The iterator owns the transaction-list 00307 * mutex, and if this function is not using that mutex, or if it 00308 * invokes other static methods on xct_t, it must release the mutex by 00309 * calling iter->never_mind(). 00310 * 00311 * The curr parameter indicates whte bytes of log consumed by the 00312 * active transactions and the thresh parameter indicates the threshold 00313 * that was just exceeded. 00314 * 00315 * The logfile parameter is the name (including path) of the log file 00316 * that contains the oldest log record (minimum lsn) needed to 00317 * roll back any of the active transactions, so it is the first 00318 * log file candidate for archiving. 00319 * 00320 * If the server's policy is to abort a victim, it needs only set 00321 * the victim parameter and return eUSERABORT. The storage manager 00322 * will then abort that transaction, and the storage manager 00323 * method that was called by the victim will return to the running 00324 * thread with eUSERABORT. 00325 * 00326 * If the server's policy is not to abort a victim, it can use 00327 * xct_t::log_warn_disable() to prevent the callback function 00328 * from being called with this same transaction as soon as 00329 * it re-enters the storage manager. 00330 * 00331 * If the policy is to archive the indicated log file, and an abort 00332 * of some long-running transaction ensues, that log file might be 00333 * needed again, in which case, a failure to open that log file will 00334 * result in a call to the second callback function, indicated by the 00335 * LOG_ARCHIVED_CALLBACK_FUNC pointer. If this function returns \ref RCOK, 00336 * the log manager will re-try opening the file before it chokes. 00337 * 00338 * This is only a stub of an experimental handling of the problem. 00339 * It does not yet provide any means of resetting the counters that 00340 * cause the tripping of the LOG_WARN_CALLBACK_FUNC. 00341 * Nor does it handle the problem well in the face of true physical 00342 * media limits. For example, if, in recovery undo, it needs to 00343 * restore archived log files, there is no automatic means of 00344 * setting aside the tail-of-log files to make room for the older 00345 * log files; and similarly, when undo is finished, it assumes that 00346 * the already-opened log files are still around. 00347 * If a callback function renames or unlinks a log file, because the 00348 * log might have the files opened, the rename/unlink will not 00349 * effect a removal of these files until the log is finished with them. 00350 * Thus, these hooks are just a start in dealing with the problem. 00351 * The system must be stopped and more disks added to enable the 00352 * log size to increase, or a fully-designed log-archiving feature 00353 * needs to be added. 00354 * Nor is this well-tested. 00355 * 00356 * The example \ref log_exceed.cpp is a primitive 00357 * example using these callbacks. That example shows how you must 00358 * compile the module that uses the API for xct_t. 00359 * 00360 */ 00361 00362 00363 /**\defgroup OPTIONS Run-Time Options 00364 * \ingroup SSMAPI 00365 */ 00366 00367 /**\defgroup SSMOPT List of Run-Time Options 00368 * \ingroup OPTIONS 00369 */ 00370 00371 /**\defgroup SSMSTG Storage Structures 00372 * 00373 * The modules below describe the storage manager's storage structures. 00374 * In summary, 00375 * - devices contain 00376 * - volumes, which contain 00377 * - stores, upon which are built 00378 * - files of records, 00379 * - conventional indexes (B+-trees), and 00380 * - spatial indexes (R*-trees) 00381 * 00382 * 00383 * \ingroup SSMAPI 00384 */ 00385 00386 /**\defgroup SSMVOL Devices and Volumes 00387 * \ingroup SSMSTG 00388 */ 00389 00390 /**\defgroup SSMSTORE Stores 00391 * \ingroup SSMSTG 00392 */ 00393 00394 /**\defgroup SSMFILE Files of Records 00395 * \ingroup SSMSTG 00396 */ 00397 00398 /**\defgroup SSMPIN Pinning Records 00399 * \ingroup SSMFILE 00400 */ 00401 00402 /**\defgroup SSMBTREE B+-Tree Indexes 00403 * \ingroup SSMSTG 00404 */ 00405 00406 /**\defgroup SSMRTREE R*-Tree Indexes 00407 * \ingroup SSMSTG 00408 */ 00409 00410 /**\defgroup SSMSCAN Scanning 00411 * \ingroup SSMSTG 00412 */ 00413 00414 /**\defgroup SSMSCANF Scanning Files 00415 * \ingroup SSMSCAN 00416 * To iterate over the records in a file, 00417 * construct an instance of the class scan_file_i, q.v.. 00418 * That page contains examples. 00419 */ 00420 00421 /**\defgroup SSMSCANI Scanning B+-Tree Indexes 00422 * \ingroup SSMSCAN 00423 * To iterate over the {key,value} pairs in an index, 00424 * construct an instance of the class scan_index_i, q.v. 00425 * That page contains examples. 00426 */ 00427 00428 /**\defgroup SSMSCANRT Scanning R*-Tree Indexes 00429 * \ingroup SSMSCAN 00430 * To iterate over the {key,value} pairs in a spatial index, 00431 * construct an instance of the class scan_rt_i, q.v. 00432 * That page contains examples. 00433 * 00434 */ 00435 00436 /**\defgroup SSMBULKLD Bulk-Loading Indexes 00437 * \ingroup SSMSTG 00438 * 00439 * Bulk-loading indexes consists of the following steps: 00440 * - create the source of the datas for the bulk-load, which can be 00441 * - one or more file(s) of records, or 00442 * - a sort_stream_i 00443 * - call a bulk-loading method in ss_m 00444 * 00445 * To avoid excessive logging of files that do not need to persist after 00446 * the bulk-load is done, use the sm_store_property_t property 00447 * t_load_file for the source files. 00448 */ 00449 00450 /**\defgroup SSMSORT Sorting 00451 * \ingroup SSMSTG 00452 */ 00453 /**\example sort_stream.cpp */ 00454 00455 /**\defgroup SSMXCT Transactions, Locking and Logging 00456 * \ingroup SSMAPI 00457 */ 00458 00459 /**\defgroup SSMLOCK Locking 00460 * \ingroup SSMXCT 00461 */ 00462 00463 /**\defgroup SSMSP Partial Rollback: Savepoints 00464 * \ingroup SSMXCT 00465 */ 00466 00467 /**\defgroup SSMQK Early Lock Release: Quarks 00468 * \ingroup SSMXCT 00469 */ 00470 00471 /**\defgroup SSM2PC Distributed Transactions: Two-Phase Commit 00472 * \ingroup SSMXCT 00473 */ 00474 /**\defgroup SSMMULTIXCT Multi-threaded Transactions 00475 * \ingroup SSMXCT 00476 */ 00477 00478 /**\defgroup LOGSPACE Running Out of Log Space 00479 * \ingroup SSMXCT 00480 */ 00481 00482 /**\defgroup LSNS How Log Sequence Numbers are Used 00483 * \ingroup SSMXCT 00484 */ 00485 00486 /**\defgroup SSMSTATS Storage Manager Statistics 00487 * \ingroup SSMAPI 00488 * 00489 * The storage manager contains functions to gather statistics that 00490 * it collects. These are mostly counters and are described here. 00491 * 00492 * Volumes can be analyzed to gather usage statistics. 00493 * See ss_m::get_du_statistics and ss_m::get_volume_meta_stats. 00494 * 00495 * Bulk-loading indexes gathers statistics about the bulk-load activity. 00496 * See ss_m::bulkld_index and ss_m::bulkld_md_index. 00497 * 00498 * \note A Perl script facilitates modifying the statistics gathered by 00499 * generating much of the supporting code, including 00500 * structure definitions and output operators. 00501 * The server-writer can generate her own sets of statistics using 00502 * the same Perl tool. 00503 * See \ref STATS for 00504 * more information about how these statistics sets are built. 00505 * 00506 */ 00507 00508 /**\defgroup SSMVTABLE Virtual Tables 00509 * \ingroup SSMAPI 00510 * \details 00511 * 00512 * Virtual tables are string representations of internal 00513 * storage manager tables. 00514 * These tables are experimental. If the tables get to be very 00515 * large, they might fail. 00516 * - lock table (see ss_m::lock_collect) 00517 * Columns are: 00518 * - mode 00519 * - duration 00520 * - number of children 00521 * - id of owning transaction 00522 * - status (granted, waiting) 00523 * - transaction table (see ss_m::xct_collect) 00524 * Columns are: 00525 * - number of threads attached 00526 * - global transaction id 00527 * - transaction id 00528 * - transaction state (in integer form) 00529 * - coordinator 00530 * - forced-readonly (Boolean) 00531 * - threads table (see ss_m::thread_collect) 00532 * Columns are: 00533 * - sthread ID 00534 * - sthread status 00535 * - number of I/Os issued 00536 * - number of reads issued 00537 * - number of writes issued 00538 * - number of syncs issued 00539 * - number of truncates issued 00540 * - number of writev issued 00541 * - number of readv issued 00542 * - smthread name 00543 * - smthread thread type (integer) 00544 * - smthread pin count 00545 * - is in storage manager 00546 * - transaction ID of any attached transaction 00547 */ 00548 /**\example vtable_example.cpp */ 00549 00550 /**\defgroup MISC Miscellaneous 00551 * \ingroup SSMAPI 00552 */ 00553 /**\defgroup HEAPMGMT Memory Management 00554 * \ingroup MISC 00555 * The storage manager generally uses the malloc-library heap management, 00556 * whose implementation is determined by the library chosen at link-time. 00557 * Exceptions are made for certain classes whose memory is provided by 00558 * per-thread, per-class heaps. 00559 * 00560 * Classes using TLS heaps include: 00561 * 00562 * - xct_t : DECLARE_TLS(block_alloc<xct_t>, xct_pool); 00563 * - xct_t::xct_core : 00564 * DECLARE_TLS(block_alloc<xct_t::xct_core>, core_pool); 00565 * - logrec_t : 00566 * DECLARE_TLS(block_alloc<logrec_t>, logrec_pool); 00567 * - lock_head_t : 00568 * DECLARE_TLS(block_alloc<lock_head_t>, lockHeadPool); 00569 * - lock_request_t : 00570 * typedef object_cache<lock_request_t, object_cache_initializing_factory<lock_request_t> > lock_request_cache_t; 00571 * DECLARE_TLS(lock_request_cache_t, lock_request_pool); 00572 * 00573 * - w_error_t : DECLARE_TLS_SCHWARZ(w_error_alloc); 00574 * 00575 */ 00576 ` 00577 /**\defgroup SSMSYNC Synchronization, Mutual Exclusion, Deadlocks 00578 * \ingroup MISC 00579 * 00580 * Within the storage manager are a variety of primitives that provide for 00581 * ACID properties of transactions and for correct behavior of concurrent 00582 * threads. These include: 00583 * - read-write locking primitives for concurrent threads (occ_rwlock, 00584 * mcs_rwlock) 00585 * - mutexes (pthread_mutex_t, queue_based_lock_t) 00586 * - condition variables (pthread_cond_t) 00587 * - latches (latch_t) 00588 * - database locks 00589 * 00590 * The storage manager uses database locks to provide concurrency control 00591 * among transactions; 00592 * latches are used for syncronize concurrent threads' accesses to pages in the 00593 * buffer pool. The storage manager's threads use carefully-designed 00594 * orderings of the entities they "lock" with synchronization primitives 00595 * to avoid any sort of deadlock. All synchronization primitives 00596 * except data base locks are meant to be held for short durations; they 00597 * are not even held for the duration of a disk write, for example. 00598 * 00599 * Deadlock detection is done only for database locks. 00600 * Latches are covered by locks, which is 00601 * to say that locks are acquired before latches are requested, so that 00602 * deadlock detection in the lock manager is generally sufficient to prevent 00603 * deadlocks among concurrent threads in a properly-written server. 00604 * 00605 * Care must be taken, when writing server code, to avoid deadlocks of 00606 * other sorts such as latch-mutex, or latch-latch deadlocks. 00607 * For example, multiple threads may cooperate on behalf of the same 00608 * transaction; if they are trying to pin records without a well-designed 00609 * ordering protocol, they may deadlock with one thread holding page 00610 * A pinned (latched) and waiting to pin (latch) B, while the other holds 00611 * B pinned and waits for a pin of A. 00612 */ 00613 00614 /**\defgroup SSMAPIDEBUG Storage Manager API Methods for Debugging 00615 * \ingroup SSMAPI 00616 */ 00617 00618 /**\defgroup TLS Thread-Local Variables 00619 * \ingroup MISC 00620 */ 00621 /**\defgroup UNUSED Unused code 00622 * \ingroup MISC 00623 */ 00624 00625 00626 /**\defgroup OPT Configuring and Building the Storage Manager 00627 */ 00628 00629 /**\defgroup IMPLGRP Implementation Notes 00630 * See \ref IMPLNOTES "this page" for some implementation details. 00631 */ 00632 00633 /**\defgroup REFSGRP References 00634 * See \ref REFERENCES "this page" for references to selected papers 00635 * from which ideas are used in the Shore Storage Manager. 00636 */