111 #ifndef SM_EXTENTSIZE 112 #define SM_EXTENTSIZE 8 114 #ifndef SM_LOG_PARTITIONS 115 #define SM_LOG_PARTITIONS 8 144 #if W_DEBUG_LEVEL > 2 145 #define CHECK_NESTING_VARIABLES 1 147 #define CHECK_NESTING_VARIABLES 0 150 struct check_compensated_op_nesting {
151 #if CHECK_NESTING_VARIABLES 155 const char *
const _file;
158 static int compensated_op_depth(
xct_t* xd,
int dflt);
160 check_compensated_op_nesting(
xct_t* xd,
int line,
const char *
const file)
162 _depth(_xd? compensated_op_depth(_xd, 0) : 0),
167 ~check_compensated_op_nesting() {
169 if( _depth != compensated_op_depth(_xd, _depth) ) {
171 "th.XXX check_compensated_op_nesting(%d,%s) depth was %d is %d\n",
172 _line, _file, _depth, compensated_op_depth(_xd, _depth));
176 w_assert0(_depth == compensated_op_depth(_xd, _depth));
181 check_compensated_op_nesting(
xct_t*,
int,
const char*
const) {}
190 enum error_constant_t {
195 page_sz = SM_PAGESIZE,
196 ext_sz = SM_EXTENTSIZE,
197 #if defined(_POSIX_PATH_MAX) 198 max_devname = _POSIX_PATH_MAX,
202 #elif defined(MAXPATHLEN) 203 max_devname = MAXPATHLEN,
210 max_openlog = SM_LOG_PARTITIONS,
217 srvid_map_sz = (max_servers - 1) / 8 + 1,
218 ext_map_sz_in_bytes = ((ext_sz + 7) / 8),
293 static void add_to_global_stats(
const sm_stats_t& from);
295 static void add_from_global_stats(
sm_stats_t& to);
297 static BackupManager* bk;
309 static int dcommit_timeout;
312 static ErrLog* errlog;
316 static constexpr
size_t IO_ALIGN = 512;
320 static bool shutdown_clean;
322 static bool shutdown_filthy;
324 static bool shutting_down;
326 static bool logging_enabled;
328 static bool lock_caching_default;
330 static bool statistics_enabled;
334 static char zero_page[page_sz];
350 st_insert_file = 0x08,
364 enum store_operation_t {
372 enum store_deleting_t {
373 t_not_deleting_store = 0,
394 xct_committing = 0x4,
396 xct_freeing_space = 0x6,
484 enum sm_store_property_t {
498 t_insert_file = 0x08,
500 t_bad_storeproperty = 0x80
506 typedef smlevel_0 smlevel_top;
509 operator<<(ostream& o, smlevel_0::sm_store_property_t p);
511 class xct_log_warn_check_t :
public smlevel_0 {
517 operator<<(ostream& o, smlevel_0::store_flag_t flag);
520 operator<<(ostream& o,
const smlevel_0::store_operation_t op);
523 operator<<(ostream& o,
const smlevel_0::store_deleting_t value);
525 #if defined(__GNUC__) && __GNUC_MINOR__ > 6 526 ostream&
operator<<(ostream& o,
const smlevel_0::xct_state_t& xct_state);
533 #endif // __SM_BASE_H Definition: sm_base.h:285
Definition: sm_base.h:238
Lock Manager API.See Orthogonal Key Value Locking and Light-weight Intent Lock.
Definition: lock.h:27
Definition: sm_base.h:241
Definition: sm_base.h:258
w_base_t::base_stat_t base_stat_t
Definition: btree_page_h.h:16
Definition: sm_base.h:262
Definition: buffer_pool.hpp:34
A transaction. Internal to the storage manager.This class may be used in a limited way for the handli...
Definition: xct.h:185
Definition: sm_base.h:257
Definition: allocator.h:59
cmp_t
Comparison types used in scan_index_iShorthand for CompareOp.
Definition: sm_base.h:237
const uint32_t max_uint4
Definition: basics.h:107
uint32_t partition_number_t
Definition: sm_base.h:231
Definition: sm_base.h:240
Definition: log_core.h:87
Definition: sm_base.h:284
int32_t base_stat_t
Definition: w_base.h:296
Definition: sm_base.h:243
#define w_assert0(x)
Default assert/debug level is 0.
Definition: w_base.h:175
This is the SHORE Storage Manager API.
Definition: sm.h:405
Definition: sm_base.h:260
Log Sequence Number. See Log Sequence Numbers (LSN).
Definition: lsn.h:243
Definition: allocator.h:24
Definition: allocator.h:13
std::array< long, enum_to_base(sm_stat_id::stat_max)> sm_stats_t
Definition: smstats.h:205
Return code for most functions and methods.
Definition: w_rc.h:87
Definition: sm_base.h:242
Definition: sm_base.h:259
Iterator over transaction list.
Definition: xct.h:969
std::ostream & operator<<(std::ostream &os, const ConfigFile &cf)
Definition: confparser.cpp:83
A buffer manager that exploits the tree structure of indexes.
Definition: buffer_pool.hpp:40
Implementation of a log archiver using asynchronous reader and writer threads.
Definition: logarchiver.h:225
Definition: sm_base.h:286
const size_t IO_ALIGN
Definition: logarchive_index.cpp:48
w_rc_t rc_t
Definition: sm_base.h:118
pg_policy_t
File-compaction policy for creating records.
Definition: sm_base.h:283
concurrency_t
Lock granularities.
Definition: sm_base.h:256
Definition: sm_base.h:239
Definition: sm_base.h:261