33 : engine_(engine), group_id_(group_id) {
44 threads_.push_back(
new Thread(engine_,
id, global_ordinal));
53 node_memory_ =
nullptr;
59 o <<
"<group_id_>" <<
static_cast<int>(v.group_id_) <<
"</group_id_>";
61 for (
Thread* child_thread : v.threads_) {
65 o <<
"</ThreadGroup>";
ErrorStack initialize_once() override
uint8_t ThreadLocalOrdinal
Typedef for a local ID of Thread (core), which is NOT unique across NUMA nodes.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Represents one thread running on one NUMA core.
Brings error stacktrace information as return value of functions.
ErrorStack uninitialize_once() override
const EngineOptions & get_options() const
ThreadLocalOrdinal thread_count_per_group_
Number of Thread in each ThreadGroup.
Represents a group of pre-allocated threads running in one NUMA node.
Batches zero or more ErrorStack objects to represent in one ErrorStack.
Database engine object that holds all resources and provides APIs.
ThreadId compose_thread_id(ThreadGroupId node, ThreadLocalOrdinal local_core)
Returns a globally unique ID of Thread (core) for the given node and ordinal in the node...
#define SUMMARIZE_ERROR_BATCH(x)
This macro calls ErrorStackBatch::summarize() with automatically provided parameters.
uint16_t ThreadGlobalOrdinal
Typedef for a globally and contiguously numbered ID of thread.
thread::ThreadOptions thread_
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
NumaNodeMemory * get_local_memory() const
uint16_t ThreadId
Typedef for a global ID of Thread (core), which is unique across NUMA nodes.
void uninitialize_and_delete_all(std::vector< T * > *vec)
A convenience method to uninitialize and delete all Initializable objects in a vector, storing all errors in this batch.
const ErrorStack kRetOk
Normal return value for no-error case.
std::ostream & operator<<(std::ostream &o, const ImpersonateSession &v)
ThreadGlobalOrdinal to_global_ordinal(ThreadId thread_id, uint8_t threads_per_nodes)
Calculate ThreadGlobalOrdinal from ThreadId.
uint8_t ThreadGroupId
Typedef for an ID of ThreadGroup (NUMA node).
memory::EngineMemory * get_memory_manager() const
See Memory Manager.