libfoedus-core
FOEDUS Core Library
|
Pimpl object of ArrayStorage. More...
Pimpl object of ArrayStorage.
A private pimpl object for ArrayStorage. Do not include this header from a client program unless you know what you are doing.
Definition at line 88 of file array_storage_pimpl.hpp.
#include <array_storage_pimpl.hpp>
Public Types | |
enum | Constants { kBatchMax = 16 } |
Public Member Functions | |
ArrayStoragePimpl ()=delete | |
ArrayStoragePimpl (ArrayStorage *storage) | |
ArrayStoragePimpl (Engine *engine, ArrayStorageControlBlock *control_block) | |
~ArrayStoragePimpl () | |
ErrorStack | create (const Metadata &metadata) |
ErrorStack | load (const StorageControlBlock &snapshot_block) |
ErrorStack | load_empty () |
void | report_page_distribution () |
bool | exists () const |
const ArrayMetadata & | get_meta () const |
StorageId | get_id () const |
uint16_t | get_levels () const |
uint16_t | get_snapshot_drop_volatile_pages_threshold () const |
uint16_t | get_payload_size () const |
ArrayOffset | get_array_size () const |
ErrorCode | get_root_page (thread::Thread *context, bool for_write, ArrayPage **out) __attribute__((always_inline)) |
ErrorStack | verify_single_thread (thread::Thread *context) |
ErrorStack | verify_single_thread (thread::Thread *context, ArrayPage *page) |
ErrorStack | hcc_reset_all_temperature_stat () |
ErrorStack | hcc_reset_all_temperature_stat_intermediate (VolatilePagePointer intermediate_page_id) |
ErrorCode | prefetch_pages (thread::Thread *context, bool install_volatile, bool cache_snapshot, ArrayOffset from, ArrayOffset to) |
defined in array_storage_prefetch.cpp More... | |
ErrorCode | prefetch_pages_recurse (thread::Thread *context, bool install_volatile, bool cache_snapshot, ArrayOffset from, ArrayOffset to, ArrayPage *page) |
ErrorCode | locate_record_for_read (thread::Thread *context, ArrayOffset offset, Record **out, bool *snapshot_record) __attribute__((always_inline)) |
ErrorCode | locate_record_for_write (thread::Thread *context, ArrayOffset offset, Record **out) __attribute__((always_inline)) |
ErrorCode | get_record (thread::Thread *context, ArrayOffset offset, void *payload, uint16_t payload_offset, uint16_t payload_count) __attribute__((always_inline)) |
template<typename T > | |
ErrorCode | get_record_primitive (thread::Thread *context, ArrayOffset offset, T *payload, uint16_t payload_offset) |
ErrorCode | get_record_payload (thread::Thread *context, ArrayOffset offset, const void **payload) __attribute__((always_inline)) |
ErrorCode | get_record_for_write (thread::Thread *context, ArrayOffset offset, Record **record) __attribute__((always_inline)) |
template<typename T > | |
ErrorCode | get_record_primitive_batch (thread::Thread *context, uint16_t payload_offset, uint16_t batch_size, const ArrayOffset *offset_batch, T *payload_batch) __attribute__((always_inline)) |
ErrorCode | get_record_payload_batch (thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, const void **payload_batch) __attribute__((always_inline)) |
ErrorCode | get_record_for_write_batch (thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, Record **record_batch) __attribute__((always_inline)) |
ErrorCode | overwrite_record (thread::Thread *context, ArrayOffset offset, const void *payload, uint16_t payload_offset, uint16_t payload_count) __attribute__((always_inline)) |
template<typename T > | |
ErrorCode | overwrite_record_primitive (thread::Thread *context, ArrayOffset offset, T payload, uint16_t payload_offset) |
ErrorCode | overwrite_record (thread::Thread *context, ArrayOffset offset, Record *record, const void *payload, uint16_t payload_offset, uint16_t payload_count) __attribute__((always_inline)) |
template<typename T > | |
ErrorCode | overwrite_record_primitive (thread::Thread *context, ArrayOffset offset, Record *record, T payload, uint16_t payload_offset) __attribute__((always_inline)) |
template<typename T > | |
ErrorCode | increment_record (thread::Thread *context, ArrayOffset offset, T *value, uint16_t payload_offset) |
template<typename T > | |
ErrorCode | increment_record_oneshot (thread::Thread *context, ArrayOffset offset, T value, uint16_t payload_offset) |
ErrorCode | lookup_for_read (thread::Thread *context, ArrayOffset offset, ArrayPage **out, uint16_t *index, bool *snapshot_page) __attribute__((always_inline)) |
ErrorCode | lookup_for_write (thread::Thread *context, ArrayOffset offset, ArrayPage **out, uint16_t *index) __attribute__((always_inline)) |
This version always returns a volatile page, installing a new one if needed. More... | |
ErrorCode | locate_record_for_read_batch (thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, Record **out_batch, bool *snapshot_page_batch) |
ErrorCode | lookup_for_read_batch (thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, ArrayPage **out_batch, uint16_t *index_batch, bool *snapshot_page_batch) |
ErrorCode | lookup_for_write_batch (thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, Record **record_batch) |
ErrorCode | follow_pointer (thread::Thread *context, bool in_snapshot, bool for_write, DualPagePointer *pointer, ArrayPage **out, const ArrayPage *parent, uint16_t index_in_parent) __attribute__((always_inline)) |
ErrorCode | follow_pointers_for_read_batch (thread::Thread *context, uint16_t batch_size, bool *in_snapshot, ArrayPage **parents, const uint16_t *index_in_parents, ArrayPage **out) |
ErrorCode | follow_pointers_for_write_batch (thread::Thread *context, uint16_t batch_size, ArrayPage **parents, const uint16_t *index_in_parents, ArrayPage **out) |
Static Public Member Functions | |
static void | release_pages_recursive (const memory::GlobalVolatilePageResolver &resolver, memory::PageReleaseBatch *batch, VolatilePagePointer volatile_page_id) |
Used only from drop() More... | |
static std::vector< uint64_t > | calculate_required_pages (uint64_t array_size, uint16_t payload) |
Calculate leaf/interior pages we need. More... | |
static std::vector< uint64_t > | calculate_offset_intervals (uint8_t levels, uint16_t payload) |
The offset interval a single page represents in each level. More... | |
Public Attributes | |
Engine *const | engine_ |
ArrayStorageControlBlock *const | control_block_ |
Enumerator | |
---|---|
kBatchMax |
If you want more than this, you should loop. ArrayStorage should take care of it. |
Definition at line 90 of file array_storage_pimpl.hpp.
|
delete |
|
inlineexplicit |
Definition at line 96 of file array_storage_pimpl.hpp.
|
inline |
Definition at line 98 of file array_storage_pimpl.hpp.
|
inline |
Definition at line 101 of file array_storage_pimpl.hpp.
|
static |
The offset interval a single page represents in each level.
index=level. So, offset_intervals[0] is the number of records in a leaf page.
Definition at line 241 of file array_storage_pimpl.cpp.
References foedus::assorted::align8(), foedus::storage::array::kDataSize, foedus::storage::array::kInteriorFanout, and foedus::storage::kRecordOverhead.
|
static |
Calculate leaf/interior pages we need.
Definition at line 170 of file array_storage_pimpl.cpp.
References foedus::assorted::align8(), foedus::assorted::int_div_ceil(), foedus::storage::array::kDataSize, foedus::storage::array::kInteriorFanout, and foedus::storage::kRecordOverhead.
ErrorStack foedus::storage::array::ArrayStoragePimpl::create | ( | const Metadata & | metadata | ) |
Definition at line 288 of file array_storage_pimpl.cpp.
References CHECK_ERROR, control_block_, ERROR_STACK, exists(), foedus::storage::Metadata::id_, foedus::kErrorCodeStrAlreadyExists, foedus::storage::kExists, foedus::kRetOk, load_empty(), foedus::storage::array::ArrayStorageControlBlock::meta_, and foedus::storage::array::ArrayStorageControlBlock::status_.
Referenced by foedus::storage::array::ArrayStorage::create().
|
inline |
Definition at line 109 of file array_storage_pimpl.hpp.
References control_block_, and foedus::storage::array::ArrayStorageControlBlock::exists().
Referenced by create(), locate_record_for_read(), locate_record_for_write(), lookup_for_read(), and lookup_for_write().
|
inline |
Definition at line 304 of file array_storage_pimpl.hpp.
References foedus::storage::array::array_volatile_page_init(), ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::follow_page_pointer(), foedus::storage::array::ArrayPage::get_level(), get_payload_size(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), and foedus::kErrorCodeOk.
Referenced by lookup_for_read(), and lookup_for_write().
ErrorCode foedus::storage::array::ArrayStoragePimpl::follow_pointers_for_read_batch | ( | thread::Thread * | context, |
uint16_t | batch_size, | ||
bool * | in_snapshot, | ||
ArrayPage ** | parents, | ||
const uint16_t * | index_in_parents, | ||
ArrayPage ** | out | ||
) |
Definition at line 1010 of file array_storage_pimpl.cpp.
References foedus::storage::array::array_volatile_page_init(), ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::follow_page_pointers_for_read_batch(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), foedus::storage::array::ArrayPage::get_level(), get_payload_size(), foedus::storage::array::ArrayPage::header(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), kBatchMax, foedus::kErrorCodeOk, foedus::storage::Record::owner_id_, foedus::storage::PageHeader::snapshot_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by lookup_for_read_batch().
ErrorCode foedus::storage::array::ArrayStoragePimpl::follow_pointers_for_write_batch | ( | thread::Thread * | context, |
uint16_t | batch_size, | ||
ArrayPage ** | parents, | ||
const uint16_t * | index_in_parents, | ||
ArrayPage ** | out | ||
) |
Definition at line 1075 of file array_storage_pimpl.cpp.
References foedus::storage::array::array_volatile_page_init(), ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::follow_page_pointers_for_write_batch(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), foedus::storage::array::ArrayPage::get_level(), get_payload_size(), foedus::storage::array::ArrayPage::header(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), kBatchMax, foedus::kErrorCodeOk, foedus::storage::Record::owner_id_, foedus::storage::PageHeader::snapshot_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by lookup_for_write_batch().
|
inline |
Definition at line 117 of file array_storage_pimpl.hpp.
References foedus::storage::array::ArrayMetadata::array_size_, and get_meta().
Referenced by locate_record_for_read(), locate_record_for_write(), lookup_for_read(), lookup_for_read_batch(), lookup_for_write(), and lookup_for_write_batch().
|
inline |
Definition at line 111 of file array_storage_pimpl.hpp.
References get_meta(), and foedus::storage::Metadata::id_.
Referenced by increment_record(), increment_record_oneshot(), load_empty(), lookup_for_read_batch(), lookup_for_write_batch(), overwrite_record(), and overwrite_record_primitive().
|
inline |
Definition at line 112 of file array_storage_pimpl.hpp.
References control_block_, and foedus::storage::array::ArrayStorageControlBlock::levels_.
Referenced by lookup_for_read(), lookup_for_read_batch(), lookup_for_write(), and lookup_for_write_batch().
|
inline |
Definition at line 110 of file array_storage_pimpl.hpp.
References control_block_, and foedus::storage::array::ArrayStorageControlBlock::meta_.
Referenced by get_array_size(), get_id(), get_payload_size(), get_snapshot_drop_volatile_pages_threshold(), load(), and prefetch_pages().
|
inline |
Definition at line 116 of file array_storage_pimpl.hpp.
References get_meta(), and foedus::storage::array::ArrayMetadata::payload_size_.
Referenced by follow_pointer(), follow_pointers_for_read_batch(), follow_pointers_for_write_batch(), get_record(), get_record_primitive(), increment_record(), increment_record_oneshot(), load(), locate_record_for_read(), locate_record_for_read_batch(), locate_record_for_write(), lookup_for_read(), lookup_for_read_batch(), lookup_for_write(), lookup_for_write_batch(), overwrite_record(), overwrite_record_primitive(), and verify_single_thread().
|
inline |
Definition at line 372 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), get_payload_size(), foedus::kErrorCodeOk, locate_record_for_read(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, and foedus::storage::Record::payload_.
Referenced by foedus::storage::array::ArrayStorage::get_record().
|
inline |
Definition at line 419 of file array_storage_pimpl.cpp.
References CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), foedus::xct::Xct::get_isolation_level(), foedus::xct::kDirtyRead, foedus::kErrorCodeOk, locate_record_for_write(), and foedus::xct::Xct::on_record_read().
Referenced by foedus::storage::array::ArrayStorage::get_record_for_write().
|
inline |
Definition at line 746 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), foedus::xct::Xct::get_isolation_level(), kBatchMax, foedus::xct::kDirtyRead, foedus::kErrorCodeOk, lookup_for_write_batch(), foedus::assorted::memory_fence_consume(), foedus::xct::Xct::on_record_read(), and foedus::storage::Record::owner_id_.
Referenced by foedus::storage::array::ArrayStorage::get_record_for_write_batch().
|
inline |
Definition at line 403 of file array_storage_pimpl.cpp.
References CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), foedus::xct::Xct::get_isolation_level(), foedus::xct::kDirtyRead, foedus::kErrorCodeOk, locate_record_for_read(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, and foedus::storage::Record::payload_.
Referenced by foedus::storage::array::ArrayStorage::get_record_payload().
|
inline |
Definition at line 717 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), foedus::xct::Xct::get_isolation_level(), kBatchMax, foedus::xct::kDirtyRead, foedus::kErrorCodeOk, locate_record_for_read_batch(), foedus::assorted::memory_fence_consume(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, and foedus::storage::Record::payload_.
Referenced by foedus::storage::array::ArrayStorage::get_record_payload_batch().
ErrorCode foedus::storage::array::ArrayStoragePimpl::get_record_primitive | ( | thread::Thread * | context, |
ArrayOffset | offset, | ||
T * | payload, | ||
uint16_t | payload_offset | ||
) |
Definition at line 388 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), get_payload_size(), foedus::kErrorCodeOk, locate_record_for_read(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, and foedus::storage::Record::payload_.
Referenced by foedus::storage::array::ArrayStorage::get_record_primitive().
|
inline |
Definition at line 678 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), foedus::xct::Xct::get_isolation_level(), kBatchMax, foedus::xct::kDirtyRead, foedus::kErrorCodeOk, foedus::storage::kRecordOverhead, locate_record_for_read_batch(), foedus::assorted::memory_fence_consume(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, foedus::storage::Record::payload_, and foedus::assorted::prefetch_cacheline().
Referenced by foedus::storage::array::ArrayStorage::get_record_primitive_batch().
|
inline |
Definition at line 337 of file array_storage_pimpl.hpp.
References control_block_, foedus::thread::Thread::follow_page_pointer(), and foedus::storage::array::ArrayStorageControlBlock::root_page_pointer_.
Referenced by lookup_for_read(), lookup_for_read_batch(), lookup_for_write(), lookup_for_write_batch(), prefetch_pages(), and verify_single_thread().
|
inline |
Definition at line 113 of file array_storage_pimpl.hpp.
References get_meta(), and foedus::storage::array::ArrayMetadata::snapshot_drop_volatile_pages_threshold_.
ErrorStack foedus::storage::array::ArrayStoragePimpl::hcc_reset_all_temperature_stat | ( | ) |
Definition at line 969 of file array_storage_pimpl.cpp.
References CHECK_ERROR, control_block_, engine_, hcc_reset_all_temperature_stat_intermediate(), foedus::storage::VolatilePagePointer::is_null(), foedus::kRetOk, foedus::storage::array::ArrayStorageControlBlock::root_page_pointer_, and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by foedus::storage::array::ArrayStorage::hcc_reset_all_temperature_stat().
ErrorStack foedus::storage::array::ArrayStoragePimpl::hcc_reset_all_temperature_stat_intermediate | ( | VolatilePagePointer | intermediate_page_id | ) |
Definition at line 987 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR, engine_, foedus::memory::EngineMemory::get_global_volatile_page_resolver(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_level(), foedus::Engine::get_memory_manager(), foedus::storage::array::ArrayPage::header(), foedus::storage::PageHeader::hotness_, foedus::storage::array::ArrayPage::is_leaf(), foedus::storage::VolatilePagePointer::is_null(), foedus::storage::array::kInteriorFanout, foedus::kRetOk, foedus::assorted::ProbCounter::reset(), and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by hcc_reset_all_temperature_stat().
ErrorCode foedus::storage::array::ArrayStoragePimpl::increment_record | ( | thread::Thread * | context, |
ArrayOffset | offset, | ||
T * | value, | ||
uint16_t | payload_offset | ||
) |
Definition at line 486 of file array_storage_pimpl.cpp.
References foedus::xct::Xct::add_to_write_set(), ASSERT_ND, foedus::storage::array::ArrayOverwriteLogType::calculate_log_length(), CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), get_id(), get_payload_size(), foedus::thread::Thread::get_thread_log_buffer(), locate_record_for_write(), foedus::xct::Xct::on_record_read(), foedus::storage::Record::owner_id_, foedus::storage::Record::payload_, foedus::storage::array::ArrayOverwriteLogType::populate_primitive(), and foedus::log::ThreadLogBuffer::reserve_new_log().
Referenced by foedus::storage::array::ArrayStorage::increment_record().
ErrorCode foedus::storage::array::ArrayStoragePimpl::increment_record_oneshot | ( | thread::Thread * | context, |
ArrayOffset | offset, | ||
T | value, | ||
uint16_t | payload_offset | ||
) |
Definition at line 512 of file array_storage_pimpl.cpp.
References foedus::xct::Xct::add_to_write_set(), ASSERT_ND, foedus::storage::array::ArrayIncrementLogType::calculate_log_length(), CHECK_ERROR_CODE, foedus::thread::Thread::get_current_xct(), get_id(), get_payload_size(), foedus::thread::Thread::get_thread_log_buffer(), locate_record_for_write(), foedus::storage::Record::owner_id_, foedus::storage::Record::payload_, foedus::storage::array::ArrayIncrementLogType::populate(), and foedus::log::ThreadLogBuffer::reserve_new_log().
Referenced by foedus::storage::array::ArrayStorage::increment_record_oneshot().
ErrorStack foedus::storage::array::ArrayStoragePimpl::load | ( | const StorageControlBlock & | snapshot_block | ) |
Definition at line 301 of file array_storage_pimpl.cpp.
References ASSERT_ND, foedus::storage::array::calculate_levels(), CHECK_ERROR, control_block_, engine_, foedus::Engine::get_memory_manager(), get_meta(), get_payload_size(), foedus::DefaultInitializable::initialize(), foedus::storage::kExists, foedus::kRetOk, foedus::UninitializeGuard::kWarnIfUninitializeError, foedus::storage::array::ArrayStorageControlBlock::levels_, load_empty(), foedus::memory::EngineMemory::load_one_volatile_page(), foedus::storage::array::ArrayStorageControlBlock::meta_, foedus::storage::StorageControlBlock::meta_, foedus::storage::array::ArrayStorageControlBlock::root_page_pointer_, foedus::storage::Metadata::root_snapshot_page_id_, foedus::storage::array::ArrayStorageControlBlock::route_finder_, foedus::storage::DualPagePointer::snapshot_pointer_, foedus::storage::array::ArrayStorageControlBlock::status_, foedus::DefaultInitializable::uninitialize(), foedus::storage::DualPagePointer::volatile_pointer_, and foedus::storage::VolatilePagePointer::word.
Referenced by foedus::storage::array::ArrayStorage::load().
ErrorStack foedus::storage::array::ArrayStoragePimpl::load_empty | ( | ) |
Definition at line 254 of file array_storage_pimpl.cpp.
References foedus::storage::array::ArrayMetadata::array_size_, foedus::storage::array::calculate_levels(), CHECK_ERROR, control_block_, engine_, ERROR_STACK, get_id(), foedus::savepoint::SavepointManager::get_initial_current_epoch(), foedus::Engine::get_memory_manager(), foedus::storage::array::LookupRouteFinder::get_records_in_leaf(), foedus::Engine::get_savepoint_manager(), foedus::memory::EngineMemory::grab_one_volatile_page(), foedus::storage::array::ArrayPage::initialize_volatile_page(), foedus::storage::array::ArrayStorageControlBlock::intervals_, foedus::kErrorCodeStrTooLargeArray, foedus::storage::array::kInteriorFanout, foedus::storage::array::kMaxArrayOffset, foedus::kRetOk, foedus::storage::array::ArrayStorageControlBlock::levels_, foedus::storage::array::ArrayStorageControlBlock::meta_, foedus::storage::array::ArrayMetadata::payload_size_, foedus::storage::array::ArrayStorageControlBlock::root_page_pointer_, foedus::storage::Metadata::root_snapshot_page_id_, foedus::storage::array::ArrayStorageControlBlock::route_finder_, foedus::storage::DualPagePointer::snapshot_pointer_, foedus::storage::DualPagePointer::volatile_pointer_, and foedus::storage::VolatilePagePointer::word.
Referenced by create(), and load().
|
inline |
Definition at line 337 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::storage::array::ArrayRange::contains(), exists(), foedus::storage::array::ArrayPage::get_array_range(), get_array_size(), foedus::storage::array::ArrayPage::get_leaf_record(), get_payload_size(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), foedus::kErrorCodeOk, lookup_for_read(), foedus::storage::Record::owner_id_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by get_record(), get_record_payload(), and get_record_primitive().
|
inline |
Definition at line 767 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::storage::array::ArrayPage::get_leaf_record(), get_payload_size(), kBatchMax, foedus::kErrorCodeOk, and lookup_for_read_batch().
Referenced by get_record_payload_batch(), and get_record_primitive_batch().
|
inline |
Definition at line 355 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::storage::array::ArrayRange::contains(), exists(), foedus::storage::array::ArrayPage::get_array_range(), get_array_size(), foedus::storage::array::ArrayPage::get_leaf_record(), get_payload_size(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), foedus::kErrorCodeOk, lookup_for_write(), foedus::storage::Record::owner_id_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by get_record_for_write(), increment_record(), increment_record_oneshot(), overwrite_record(), and overwrite_record_primitive().
|
inline |
Definition at line 535 of file array_storage_pimpl.cpp.
References ASSERT_ND, foedus::storage::array::ArrayRange::begin_, CHECK_ERROR_CODE, foedus::storage::array::ArrayRange::contains(), control_block_, exists(), foedus::storage::array::LookupRouteFinder::find_route(), follow_pointer(), foedus::storage::array::ArrayPage::get_array_range(), get_array_size(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), get_levels(), get_payload_size(), get_root_page(), foedus::storage::array::ArrayPage::header(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), foedus::kErrorCodeOk, foedus::storage::Record::owner_id_, foedus::storage::array::ArrayStorageControlBlock::route_finder_, foedus::storage::PageHeader::snapshot_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by locate_record_for_read().
|
inline |
Definition at line 794 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::storage::construct_volatile_page_pointer(), control_block_, foedus::storage::extract_local_page_id_from_snapshot_pointer(), foedus::storage::array::LookupRouteFinder::find_route(), follow_pointers_for_read_batch(), get_array_size(), get_id(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), get_levels(), get_payload_size(), get_root_page(), foedus::storage::array::ArrayPage::header(), kBatchMax, foedus::kErrorCodeOk, foedus::assorted::prefetch_cacheline(), foedus::storage::array::LookupRoute::route, foedus::storage::array::ArrayStorageControlBlock::route_finder_, and foedus::storage::PageHeader::snapshot_.
Referenced by locate_record_for_read_batch().
|
inline |
This version always returns a volatile page, installing a new one if needed.
Definition at line 574 of file array_storage_pimpl.cpp.
References ASSERT_ND, foedus::storage::array::ArrayRange::begin_, CHECK_ERROR_CODE, foedus::storage::array::ArrayRange::contains(), control_block_, exists(), foedus::storage::array::LookupRouteFinder::find_route(), follow_pointer(), foedus::storage::array::ArrayPage::get_array_range(), get_array_size(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), get_levels(), get_payload_size(), get_root_page(), foedus::storage::array::ArrayPage::header(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::XctId::is_valid(), foedus::kErrorCodeOk, foedus::storage::Record::owner_id_, foedus::storage::array::ArrayStorageControlBlock::route_finder_, foedus::storage::PageHeader::snapshot_, and foedus::xct::RwLockableXctId::xct_id_.
Referenced by locate_record_for_write().
|
inline |
Definition at line 864 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, foedus::storage::construct_volatile_page_pointer(), control_block_, foedus::storage::array::LookupRouteFinder::find_route(), follow_pointers_for_write_batch(), get_array_size(), get_id(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), get_levels(), get_payload_size(), get_root_page(), foedus::storage::array::ArrayPage::header(), kBatchMax, foedus::kErrorCodeOk, foedus::assorted::prefetch_cacheline(), foedus::storage::array::LookupRoute::route, foedus::storage::array::ArrayStorageControlBlock::route_finder_, and foedus::storage::PageHeader::snapshot_.
Referenced by get_record_for_write_batch().
|
inline |
Definition at line 432 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, get_payload_size(), and locate_record_for_write().
Referenced by foedus::storage::array::ArrayStorage::overwrite_record().
|
inline |
Definition at line 449 of file array_storage_pimpl.cpp.
References foedus::xct::Xct::add_to_write_set(), foedus::storage::array::ArrayOverwriteLogType::calculate_log_length(), foedus::thread::Thread::get_current_xct(), get_id(), foedus::thread::Thread::get_thread_log_buffer(), foedus::storage::Record::owner_id_, foedus::storage::Record::payload_, foedus::storage::array::ArrayOverwriteLogType::populate(), and foedus::log::ThreadLogBuffer::reserve_new_log().
ErrorCode foedus::storage::array::ArrayStoragePimpl::overwrite_record_primitive | ( | thread::Thread * | context, |
ArrayOffset | offset, | ||
T | payload, | ||
uint16_t | payload_offset | ||
) |
Definition at line 441 of file array_storage_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR_CODE, get_payload_size(), and locate_record_for_write().
Referenced by foedus::storage::array::ArrayStorage::overwrite_record_primitive().
|
inline |
Definition at line 468 of file array_storage_pimpl.cpp.
References foedus::xct::Xct::add_to_write_set(), foedus::storage::array::ArrayOverwriteLogType::calculate_log_length(), foedus::thread::Thread::get_current_xct(), get_id(), foedus::thread::Thread::get_thread_log_buffer(), foedus::storage::Record::owner_id_, foedus::storage::Record::payload_, foedus::storage::array::ArrayOverwriteLogType::populate_primitive(), and foedus::log::ThreadLogBuffer::reserve_new_log().
ErrorCode foedus::storage::array::ArrayStoragePimpl::prefetch_pages | ( | thread::Thread * | context, |
bool | install_volatile, | ||
bool | cache_snapshot, | ||
ArrayOffset | from, | ||
ArrayOffset | to | ||
) |
defined in array_storage_prefetch.cpp
Definition at line 31 of file array_storage_prefetch.cpp.
References CHECK_ERROR_CODE, foedus::debugging::StopWatch::elapsed_us(), get_meta(), get_root_page(), foedus::thread::Thread::get_thread_id(), foedus::storage::array::ArrayPage::is_leaf(), foedus::kErrorCodeOk, foedus::storage::Metadata::name_, foedus::storage::prefetch_page_l2(), prefetch_pages_recurse(), and foedus::debugging::StopWatch::stop().
Referenced by foedus::storage::array::ArrayStorage::prefetch_pages().
ErrorCode foedus::storage::array::ArrayStoragePimpl::prefetch_pages_recurse | ( | thread::Thread * | context, |
bool | install_volatile, | ||
bool | cache_snapshot, | ||
ArrayOffset | from, | ||
ArrayOffset | to, | ||
ArrayPage * | page | ||
) |
Definition at line 53 of file array_storage_prefetch.cpp.
References ASSERT_ND, foedus::storage::array::ArrayRange::begin_, CHECK_ERROR_CODE, control_block_, foedus::storage::array::ArrayRange::end_, foedus::thread::Thread::find_or_read_a_snapshot_page(), foedus::storage::array::ArrayPage::get_array_range(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_level(), foedus::storage::array::LookupRouteFinder::get_records_in_leaf(), foedus::storage::array::ArrayPage::header(), foedus::thread::Thread::install_a_volatile_page(), foedus::storage::VolatilePagePointer::is_null(), foedus::kErrorCodeOk, foedus::storage::array::kInteriorFanout, foedus::storage::array::ArrayRange::overlaps(), foedus::storage::prefetch_page_l2(), foedus::thread::Thread::resolve_cast(), foedus::storage::array::ArrayStorageControlBlock::route_finder_, foedus::storage::PageHeader::snapshot_, foedus::storage::DualPagePointer::snapshot_pointer_, and foedus::storage::DualPagePointer::volatile_pointer_.
Referenced by prefetch_pages().
|
static |
Used only from drop()
Definition at line 207 of file array_storage_pimpl.cpp.
References ASSERT_ND, foedus::storage::VolatilePagePointer::is_null(), foedus::storage::array::kInteriorFanout, foedus::memory::PageReleaseBatch::release(), foedus::memory::GlobalVolatilePageResolver::resolve_offset(), foedus::storage::DualPagePointer::volatile_pointer_, and foedus::storage::VolatilePagePointer::word.
Referenced by foedus::storage::array::ArrayStorage::drop().
void foedus::storage::array::ArrayStoragePimpl::report_page_distribution | ( | ) |
ErrorStack foedus::storage::array::ArrayStoragePimpl::verify_single_thread | ( | thread::Thread * | context | ) |
Definition at line 932 of file array_storage_pimpl.cpp.
References get_root_page(), and WRAP_ERROR_CODE.
Referenced by verify_single_thread(), and foedus::storage::array::ArrayStorage::verify_single_thread().
ErrorStack foedus::storage::array::ArrayStoragePimpl::verify_single_thread | ( | thread::Thread * | context, |
ArrayPage * | page | ||
) |
Definition at line 937 of file array_storage_pimpl.cpp.
References CHECK_AND_ASSERT, CHECK_ERROR, foedus::thread::Thread::get_global_volatile_page_resolver(), foedus::storage::array::ArrayPage::get_interior_record(), foedus::storage::array::ArrayPage::get_leaf_record(), foedus::storage::array::ArrayPage::get_leaf_record_count(), get_payload_size(), foedus::xct::McsRwLock::get_tail_waiter(), foedus::xct::McsRwLock::get_tail_waiter_block(), foedus::xct::RwLockableXctId::is_being_written(), foedus::xct::RwLockableXctId::is_deleted(), foedus::xct::RwLockableXctId::is_keylocked(), foedus::storage::array::ArrayPage::is_leaf(), foedus::xct::RwLockableXctId::is_moved(), foedus::storage::VolatilePagePointer::is_null(), foedus::storage::array::kInteriorFanout, foedus::kRetOk, foedus::xct::RwLockableXctId::lock_, foedus::storage::Record::owner_id_, foedus::memory::GlobalVolatilePageResolver::resolve_offset(), verify_single_thread(), and foedus::storage::DualPagePointer::volatile_pointer_.
ArrayStorageControlBlock* const foedus::storage::array::ArrayStoragePimpl::control_block_ |
Definition at line 301 of file array_storage_pimpl.hpp.
Referenced by create(), exists(), get_levels(), get_meta(), get_root_page(), hcc_reset_all_temperature_stat(), load(), load_empty(), lookup_for_read(), lookup_for_read_batch(), lookup_for_write(), lookup_for_write_batch(), and prefetch_pages_recurse().
Engine* const foedus::storage::array::ArrayStoragePimpl::engine_ |
Definition at line 300 of file array_storage_pimpl.hpp.
Referenced by hcc_reset_all_temperature_stat(), hcc_reset_all_temperature_stat_intermediate(), load(), and load_empty().