libfoedus-core
FOEDUS Core Library
|
Shared data of this storage type. More...
Shared data of this storage type.
Definition at line 49 of file sequential_storage_pimpl.hpp.
#include <sequential_storage_pimpl.hpp>
Public Member Functions | |
SequentialStorageControlBlock ()=delete | |
~SequentialStorageControlBlock ()=delete | |
bool | exists () const |
ErrorCode | optimistic_read_truncate_epoch (thread::Thread *context, Epoch *out) const |
Public Attributes | |
soc::SharedMutex | status_mutex_ |
StorageStatus | status_ |
Status of the storage. More... | |
DualPagePointer | root_page_pointer_ |
Points to the root page (or something equivalent). More... | |
SequentialMetadata | meta_ |
metadata of this storage. More... | |
xct::RwLockableXctId | cur_truncate_epoch_tid_ |
Protects accesses to cur_truncate_epoch_. More... | |
std::atomic< Epoch::EpochInteger > | cur_truncate_epoch_ |
The min epoch value (truncate-epoch) for all valid records in this storage. More... | |
VolatilePagePointer | head_pointer_pages_ [kPointerPageCount] |
Points to pages that store thread-private head pages to store thread-private volatile pages. More... | |
VolatilePagePointer | tail_pointer_pages_ [kPointerPageCount] |
Same above, but for tail pointers. More... | |
|
delete |
|
delete |
|
inline |
Definition at line 54 of file sequential_storage_pimpl.hpp.
References foedus::storage::kExists, foedus::storage::kMarkedForDeath, and status_.
ErrorCode foedus::storage::sequential::SequentialStorageControlBlock::optimistic_read_truncate_epoch | ( | thread::Thread * | context, |
Epoch * | out | ||
) | const |
Definition at line 213 of file sequential_storage_pimpl.cpp.
References foedus::xct::Xct::add_to_lock_free_read_set(), CHECK_ERROR_CODE, cur_truncate_epoch_, cur_truncate_epoch_tid_, foedus::thread::Thread::get_current_xct(), foedus::storage::Metadata::id_, foedus::xct::Xct::is_active(), foedus::xct::XctId::is_being_written(), foedus::kErrorCodeOk, foedus::kErrorCodeXctNoXct, foedus::assorted::memory_fence_acquire(), meta_, and UNLIKELY.
std::atomic< Epoch::EpochInteger > foedus::storage::sequential::SequentialStorageControlBlock::cur_truncate_epoch_ |
The min epoch value (truncate-epoch) for all valid records in this storage.
When a physical record or a page has an epoch value less than a truncate-epoch, they are logically non-existent. Truncate-epoch is always valid, starting from the system's lowest epoch.
Definition at line 77 of file sequential_storage_pimpl.hpp.
Referenced by optimistic_read_truncate_epoch().
xct::RwLockableXctId foedus::storage::sequential::SequentialStorageControlBlock::cur_truncate_epoch_tid_ |
Protects accesses to cur_truncate_epoch_.
Definition at line 74 of file sequential_storage_pimpl.hpp.
Referenced by optimistic_read_truncate_epoch().
VolatilePagePointer foedus::storage::sequential::SequentialStorageControlBlock::head_pointer_pages_[kPointerPageCount] |
Points to pages that store thread-private head pages to store thread-private volatile pages.
Each page can contain 2^10 pointers (as the node is implicit, PagePoolOffset suffices) and we can have at most 2^16 cores. Thus we have 2^6 pointers here. This means we can waste 64*2=128 volatile pages (=512kb) per one sequential storage.. shouldn't be a big issue.
Definition at line 86 of file sequential_storage_pimpl.hpp.
SequentialMetadata foedus::storage::sequential::SequentialStorageControlBlock::meta_ |
metadata of this storage.
Definition at line 63 of file sequential_storage_pimpl.hpp.
Referenced by optimistic_read_truncate_epoch().
DualPagePointer foedus::storage::sequential::SequentialStorageControlBlock::root_page_pointer_ |
Points to the root page (or something equivalent).
Definition at line 61 of file sequential_storage_pimpl.hpp.
StorageStatus foedus::storage::sequential::SequentialStorageControlBlock::status_ |
Status of the storage.
Definition at line 59 of file sequential_storage_pimpl.hpp.
Referenced by exists().
soc::SharedMutex foedus::storage::sequential::SequentialStorageControlBlock::status_mutex_ |
Definition at line 57 of file sequential_storage_pimpl.hpp.
VolatilePagePointer foedus::storage::sequential::SequentialStorageControlBlock::tail_pointer_pages_[kPointerPageCount] |
Same above, but for tail pointers.
Definition at line 88 of file sequential_storage_pimpl.hpp.