|
CUBRID Engine
latest
|
#include <thread_entry.hpp>

Public Types | |
| enum | status { status::TS_DEAD, status::TS_FREE, status::TS_RUN, status::TS_WAIT, status::TS_CHECK } |
Public Member Functions | |
| entry () | |
| ~entry () | |
| void | request_lock_free_transactions (void) |
| thread_id_t | get_id () |
| pthread_t | get_posix_id () |
| void | register_id () |
| void | unregister_id () |
| bool | is_on_current_thread () const |
| void | return_lock_free_transaction_entries (void) |
| void | lock (void) |
| void | unlock (void) |
| cuberr::context & | get_error_context (void) |
| cubbase::alloc_tracker & | get_alloc_tracker (void) |
| cubbase::pgbuf_tracker & | get_pgbuf_tracker (void) |
| cubsync::critical_section_tracker & | get_csect_tracker (void) |
| log_system_tdes * | get_system_tdes (void) |
| void | set_system_tdes (log_system_tdes *sys_tdes) |
| void | reset_system_tdes (void) |
| void | claim_system_worker () |
| void | retire_system_worker () |
| void | end_resource_tracks (void) |
| void | push_resource_tracks (void) |
| void | pop_resource_tracks (void) |
| void | assign_lf_tran_index (lockfree::tran::index idx) |
| lockfree::tran::index | pull_lf_tran_index () |
| lockfree::tran::index | get_lf_tran_index () |
Private Member Functions | |
| void | clear_resources (void) |
Definition at line 189 of file thread_entry.hpp.
|
strong |
| Enumerator | |
|---|---|
| TS_DEAD | |
| TS_FREE | |
| TS_RUN | |
| TS_WAIT | |
| TS_CHECK | |
Definition at line 196 of file thread_entry.hpp.
| cubthread::entry::entry | ( | ) |
Definition at line 77 of file thread_entry.cpp.
References assert, cnv_adj_buffer, db_create_private_heap(), event_stats, fi_thread_init(), NULL, private_heap_id, pthread_mutex_init, rand_buf, rand_seed, th_entry_lock, THREAD_TS_CATALOG, THREAD_TS_FPCACHE, THREAD_TS_FREE_SORT_LIST, THREAD_TS_GLOBAL_UNIQUE_STATS, THREAD_TS_HFID_TABLE, THREAD_TS_OBJ_LOCK_ENT, THREAD_TS_OBJ_LOCK_RES, THREAD_TS_SESSIONS, THREAD_TS_SPAGE_SAVING, THREAD_TS_XCACHE, tran_entries, tran_index_lock, and wakeup_cond.
| cubthread::entry::~entry | ( | void | ) |
Definition at line 191 of file thread_entry.cpp.
References clear_resources(), m_alloc_tracker, m_csect_tracker, and m_pgbuf_tracker.
| void cubthread::entry::assign_lf_tran_index | ( | lockfree::tran::index | idx | ) |
Definition at line 405 of file thread_entry.cpp.
References m_lf_tran_index.
Referenced by cubthread::manager::init_entries(), and cubthread::initialize_thread_entries().

| void cubthread::entry::claim_system_worker | ( | ) |
Definition at line 389 of file thread_entry.cpp.
References assert, LOG_SYSTEM_TRAN_INDEX, m_systdes, NULL, and tran_index.
Referenced by index_builder_loader_context::on_create(), and vacuum_init_thread_context().

|
private |
Definition at line 218 of file thread_entry.cpp.
References adj_ar_free(), assert, cnv_adj_buffer, db_destroy_private_heap(), end_resource_tracks(), fi_thread_final(), i, log_data_ptr, log_zip_free(), log_zip_redo, log_zip_undo, m_cleared, m_systdes, no_logging, NULL, private_heap_id, pthread_mutex_destroy, th_entry_lock, THREAD_TS_COUNT, tran_entries, tran_index_lock, and wakeup_cond.
Referenced by ~entry().

| void cubthread::entry::end_resource_tracks | ( | void | ) |
Definition at line 349 of file thread_entry.cpp.
References cubsync::critical_section_tracker::clear_all(), cubbase::resource_tracker< Res >::clear_all(), m_alloc_tracker, m_csect_tracker, m_pgbuf_tracker, and m_qlist_count.
Referenced by clear_resources(), cubthread::entry_manager::recycle_context(), and cubthread::entry_manager::retire_context().

|
inline |
Definition at line 302 of file thread_entry.hpp.
Referenced by db_private_alloc_debug(), db_private_realloc_debug(), and db_private_realloc_external().

|
inline |
Definition at line 310 of file thread_entry.hpp.
|
inline |
Definition at line 297 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::create_context(), cubthread::finalize(), cuberr::context::get_thread_local_context(), cubthread::initialize(), and cubthread::entry_manager::retire_context().

| thread_id_t cubthread::entry::get_id | ( | ) |
Definition at line 280 of file thread_entry.cpp.
References m_id.
| lockfree::tran::index cubthread::entry::get_lf_tran_index | ( | ) |
Definition at line 419 of file thread_entry.cpp.
References m_lf_tran_index.
Referenced by cubthread::lockfree_hashmap< Key, T >::iterator::iterator().

|
inline |
Definition at line 306 of file thread_entry.hpp.
| pthread_t cubthread::entry::get_posix_id | ( | ) |
Definition at line 286 of file thread_entry.cpp.
References m_id.
Referenced by register_id().

|
inline |
Definition at line 315 of file thread_entry.hpp.
Referenced by vacuum_init_thread_context().

| bool cubthread::entry::is_on_current_thread | ( | ) | const |
Definition at line 318 of file thread_entry.cpp.
References m_id.
| void cubthread::entry::lock | ( | void | ) |
Definition at line 337 of file thread_entry.cpp.
References pthread_mutex_lock, and th_entry_lock.
Referenced by thread_lock_entry().

| void cubthread::entry::pop_resource_tracks | ( | void | ) |
Definition at line 376 of file thread_entry.cpp.
References m_alloc_tracker, m_csect_tracker, m_pgbuf_tracker, cubbase::resource_tracker< Res >::pop_track(), and cubsync::critical_section_tracker::stop().
| lockfree::tran::index cubthread::entry::pull_lf_tran_index | ( | ) |
Definition at line 411 of file thread_entry.cpp.
References lockfree::tran::INVALID_INDEX, and m_lf_tran_index.
| void cubthread::entry::push_resource_tracks | ( | void | ) |
Definition at line 363 of file thread_entry.cpp.
References m_alloc_tracker, m_csect_tracker, m_pgbuf_tracker, cubbase::resource_tracker< Res >::push_track(), and cubsync::critical_section_tracker::start().
| void cubthread::entry::register_id | ( | ) |
Definition at line 301 of file thread_entry.cpp.
References assert, get_posix_id(), and m_id.
Referenced by cubthread::entry_manager::create_context(), and cubthread::initialize().

| void cubthread::entry::request_lock_free_transactions | ( | void | ) |
Definition at line 201 of file thread_entry.cpp.
References catalog_Ts, dwb_slots_Ts, fpcache_Ts, free_sort_list_Ts, global_unique_stats_Ts, hfid_table_Ts, lf_tran_request_entry(), obj_lock_ent_Ts, obj_lock_res_Ts, sessions_Ts, spage_saving_Ts, THREAD_TS_CATALOG, THREAD_TS_DWB_SLOTS, THREAD_TS_FPCACHE, THREAD_TS_FREE_SORT_LIST, THREAD_TS_GLOBAL_UNIQUE_STATS, THREAD_TS_HFID_TABLE, THREAD_TS_OBJ_LOCK_ENT, THREAD_TS_OBJ_LOCK_RES, THREAD_TS_SESSIONS, THREAD_TS_SPAGE_SAVING, THREAD_TS_XCACHE, tran_entries, and xcache_Ts.
Referenced by cubthread::manager::init_entries(), and cubthread::initialize_thread_entries().

|
inline |
Definition at line 323 of file thread_entry.hpp.
References NULL.
Referenced by log_system_tdes::rv_end_simulation().

| void cubthread::entry::retire_system_worker | ( | ) |
Definition at line 397 of file thread_entry.cpp.
References m_systdes, NULL, NULL_TRAN_INDEX, and tran_index.
Referenced by index_builder_loader_context::on_retire().

| void cubthread::entry::return_lock_free_transaction_entries | ( | void | ) |
Definition at line 324 of file thread_entry.cpp.
References i, lf_tran_return_entry(), NULL, THREAD_TS_COUNT, and tran_entries.
Referenced by cubthread::manager::return_lock_free_transaction_entries(), and cubthread::return_lock_free_transaction_entries().

|
inline |
Definition at line 319 of file thread_entry.hpp.
Referenced by log_system_tdes::rv_simulate_system_tdes().

| void cubthread::entry::unlock | ( | void | ) |
Definition at line 343 of file thread_entry.cpp.
References pthread_mutex_unlock, and th_entry_lock.
Referenced by thread_unlock_entry().

| void cubthread::entry::unregister_id | ( | ) |
Definition at line 312 of file thread_entry.cpp.
References m_id.
Referenced by cubthread::daemon_entry_manager::on_retire(), and cubthread::entry_manager::retire_context().

| bool cubthread::entry::check_interrupt |
Definition at line 242 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::retire_context(), and vacuum_init_thread_context().
| bool cubthread::entry::clear_trace |
Definition at line 272 of file thread_entry.hpp.
Referenced by thread_need_clear_trace(), and thread_set_clear_trace().
| int cubthread::entry::client_id |
Definition at line 214 of file thread_entry.hpp.
| adj_array* cubthread::entry::cnv_adj_buffer[3] |
Definition at line 225 of file thread_entry.hpp.
Referenced by clear_resources(), and entry().
| css_conn_entry* cubthread::entry::conn_entry |
Definition at line 227 of file thread_entry.hpp.
Referenced by cubload::session::load_batch(), index_builder_loader_context::on_create(), cubload::worker_context_manager::on_retire(), and index_builder_loader_context::on_retire().
| int cubthread::entry::count_private_allocators |
Definition at line 280 of file thread_entry.hpp.
Referenced by cubmem::deregister_private_allocator(), and cubmem::register_private_allocator().
| thread_id_t cubthread::entry::emulate_tid |
Definition at line 212 of file thread_entry.hpp.
| EVENT_STAT cubthread::entry::event_stats |
Definition at line 267 of file thread_entry.hpp.
Referenced by entry(), log_is_log_flush_daemon_available(), cubthread::entry_manager::recycle_context(), and thread_suspend_wakeup_and_unlock_entry().
| fi_test_item* cubthread::entry::fi_test_array |
Definition at line 278 of file thread_entry.hpp.
| int cubthread::entry::index |
Definition at line 210 of file thread_entry.hpp.
Referenced by heap_classrepr_logging_template(), cubthread::manager::init_entries(), cubthread::initialize(), and thread_get_entry_index().
| bool cubthread::entry::interrupted |
Definition at line 240 of file thread_entry.hpp.
| void* cubthread::entry::lockwait |
Definition at line 246 of file thread_entry.hpp.
| int cubthread::entry::lockwait_msecs |
Definition at line 248 of file thread_entry.hpp.
| int cubthread::entry::lockwait_state |
Definition at line 249 of file thread_entry.hpp.
| INT64 cubthread::entry::lockwait_stime |
Definition at line 247 of file thread_entry.hpp.
| int cubthread::entry::log_data_length |
Definition at line 257 of file thread_entry.hpp.
| char* cubthread::entry::log_data_ptr |
Definition at line 256 of file thread_entry.hpp.
Referenced by clear_resources().
| struct log_zip* cubthread::entry::log_zip_redo |
Definition at line 255 of file thread_entry.hpp.
Referenced by clear_resources().
| struct log_zip* cubthread::entry::log_zip_undo |
Definition at line 254 of file thread_entry.hpp.
Referenced by clear_resources().
|
private |
Definition at line 350 of file thread_entry.hpp.
Referenced by end_resource_tracks(), pop_resource_tracks(), push_resource_tracks(), and ~entry().
|
private |
Definition at line 347 of file thread_entry.hpp.
Referenced by clear_resources().
|
private |
Definition at line 352 of file thread_entry.hpp.
Referenced by end_resource_tracks(), pop_resource_tracks(), push_resource_tracks(), and ~entry().
|
private |
Definition at line 344 of file thread_entry.hpp.
|
private |
Definition at line 341 of file thread_entry.hpp.
Referenced by get_id(), get_posix_id(), is_on_current_thread(), register_id(), and unregister_id().
|
private |
Definition at line 355 of file thread_entry.hpp.
Referenced by assign_lf_tran_index(), get_lf_tran_index(), and pull_lf_tran_index().
| cubload::driver* cubthread::entry::m_loaddb_driver |
Definition at line 284 of file thread_entry.hpp.
Referenced by cubload::server_object_loader::finish_line(), cubload::error_handler::get_driver_lineno(), cubload::error_handler::get_scanner_lineno(), cubload::session::install_class(), ldr_init_driver(), ldr_sa_load(), cubload::worker_context_manager::on_create(), cubload::worker_context_manager::on_retire(), and cubload::session::session().
|
private |
Definition at line 351 of file thread_entry.hpp.
Referenced by end_resource_tracks(), pop_resource_tracks(), push_resource_tracks(), and ~entry().
| int cubthread::entry::m_qlist_count |
Definition at line 282 of file thread_entry.hpp.
Referenced by end_resource_tracks().
| status cubthread::entry::m_status |
Definition at line 219 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::create_context(), cubthread::initialize(), cubthread::daemon_entry_manager::on_retire(), cubthread::entry_manager::retire_context(), thread_suspend_timeout_wakeup_and_unlock_entry(), thread_suspend_wakeup_and_unlock_entry(), and thread_suspend_with_other_mutex().
|
private |
Definition at line 353 of file thread_entry.hpp.
Referenced by claim_system_worker(), clear_resources(), and retire_system_worker().
| int cubthread::entry::net_request_index |
Definition at line 261 of file thread_entry.hpp.
| entry* cubthread::entry::next_wait_thrd |
Definition at line 244 of file thread_entry.hpp.
| bool cubthread::entry::no_logging |
Definition at line 259 of file thread_entry.hpp.
Referenced by clear_resources().
| bool cubthread::entry::on_trace |
Definition at line 271 of file thread_entry.hpp.
Referenced by thread_is_on_trace(), and thread_trace_on().
| HL_HEAPID cubthread::entry::private_heap_id |
Definition at line 224 of file thread_entry.hpp.
Referenced by clear_resources(), entry(), cubmem::get_private_heapid(), cubmem::private_heap_allocate(), and cubmem::private_heap_deallocate().
| int cubthread::entry::private_lru_index |
Definition at line 216 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::recycle_context(), and cubthread::entry_manager::retire_context().
| void* cubthread::entry::query_entry |
Definition at line 250 of file thread_entry.hpp.
| struct drand48_data cubthread::entry::rand_buf |
Definition at line 234 of file thread_entry.hpp.
Referenced by entry().
| unsigned int cubthread::entry::rand_seed |
Definition at line 233 of file thread_entry.hpp.
Referenced by entry().
| int cubthread::entry::request_fix_count |
Definition at line 238 of file thread_entry.hpp.
| int cubthread::entry::request_latch_mode |
Definition at line 237 of file thread_entry.hpp.
| thread_resume_suspend_status cubthread::entry::resume_status |
Definition at line 236 of file thread_entry.hpp.
Referenced by cubthread::initialize(), cubthread::entry_manager::recycle_context(), cubthread::entry_manager::retire_context(), thread_check_suspend_reason_and_wakeup_internal(), thread_suspend_timeout_wakeup_and_unlock_entry(), thread_suspend_wakeup_and_unlock_entry(), thread_suspend_with_other_mutex(), and thread_wakeup_internal().
| unsigned int cubthread::entry::rid |
Definition at line 218 of file thread_entry.hpp.
| std::atomic_bool cubthread::entry::shutdown |
Definition at line 241 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::create_context(), cubthread::entry_manager::recycle_context(), and cubthread::entry_manager::stop_execution().
| bool cubthread::entry::sort_stats_active |
Definition at line 265 of file thread_entry.hpp.
Referenced by thread_get_sort_stats_active(), and thread_set_sort_stats_active().
| pthread_mutex_t cubthread::entry::th_entry_lock |
Definition at line 221 of file thread_entry.hpp.
Referenced by clear_resources(), entry(), lock(), thread_suspend_timeout_wakeup_and_unlock_entry(), thread_suspend_wakeup_and_unlock_entry(), thread_suspend_with_other_mutex(), and unlock().
| int cubthread::entry::trace_format |
Definition at line 270 of file thread_entry.hpp.
Referenced by thread_set_trace_format().
| lf_tran_entry* cubthread::entry::tran_entries[THREAD_TS_COUNT] |
Definition at line 275 of file thread_entry.hpp.
Referenced by clear_resources(), entry(), cubthread::lockfree_hashmap< Key, T >::get_tran_entry(), request_lock_free_transactions(), return_lock_free_transaction_entries(), and thread_get_tran_entry().
| int cubthread::entry::tran_index |
Definition at line 215 of file thread_entry.hpp.
Referenced by claim_system_worker(), heap_classrepr_logging_template(), cubthread::initialize(), cubthread::daemon_entry_manager::on_create(), index_builder_loader_context::on_recycle(), cubthread::entry_manager::recycle_context(), cubthread::entry_manager::retire_context(), and retire_system_worker().
| pthread_mutex_t cubthread::entry::tran_index_lock |
Definition at line 217 of file thread_entry.hpp.
Referenced by clear_resources(), and entry().
| entry* cubthread::entry::tran_next_wait |
Definition at line 251 of file thread_entry.hpp.
| thread_type cubthread::entry::type |
Definition at line 211 of file thread_entry.hpp.
Referenced by cubthread::entry_manager::create_context(), cubload::worker_context_manager::on_create(), cubthread::daemon_entry_manager::on_create(), and vacuum_init_thread_context().
| struct vacuum_worker* cubthread::entry::vacuum_worker |
Definition at line 263 of file thread_entry.hpp.
Referenced by vacuum_init_thread_context().
| bool cubthread::entry::victim_request_fail |
Definition at line 239 of file thread_entry.hpp.
| bool cubthread::entry::wait_for_latch_promote |
Definition at line 243 of file thread_entry.hpp.
| pthread_cond_t cubthread::entry::wakeup_cond |
Definition at line 222 of file thread_entry.hpp.
Referenced by clear_resources(), entry(), thread_check_suspend_reason_and_wakeup_internal(), thread_suspend_timeout_wakeup_and_unlock_entry(), thread_suspend_wakeup_and_unlock_entry(), thread_suspend_with_other_mutex(), and thread_wakeup_internal().
| entry* cubthread::entry::worker_thrd_list |
Definition at line 252 of file thread_entry.hpp.
| int cubthread::entry::xasl_errcode |
Definition at line 230 of file thread_entry.hpp.
| int cubthread::entry::xasl_recursion_depth |
Definition at line 231 of file thread_entry.hpp.
Referenced by thread_clear_recursion_depth(), thread_dec_recursion_depth(), thread_get_recursion_depth(), and thread_inc_recursion_depth().
| xasl_unpack_info* cubthread::entry::xasl_unpack_info_ptr |
Definition at line 229 of file thread_entry.hpp.