CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
#include "btree.h"
#include "thread_compat.hpp"
#include "heap_file.h"
#include "dbtype.h"
#include "boot_sr.h"
#include "locator_sr.h"
#include "set_object.h"
#include "xserver_interface.h"
#include "server_interface.h"
Go to the source code of this file.
Functions | |
static bool | is_class (OID *obj_oid, OID *class_oid) |
static int | process_set (THREAD_ENTRY *thread_p, DB_SET *set) |
static int | process_value (THREAD_ENTRY *thread_p, DB_VALUE *value) |
static int | process_object (THREAD_ENTRY *thread_p, HEAP_SCANCACHE *upd_scancache, HEAP_CACHE_ATTRINFO *attr_info, OID *oid) |
static int | desc_disk_to_attr_info (THREAD_ENTRY *thread_p, OID *oid, RECDES *recdes, HEAP_CACHE_ATTRINFO *attr_info) |
static int | process_class (THREAD_ENTRY *thread_p, OID *class_oid, HFID *hfid, int max_space_to_process, int *instance_lock_timeout, int *space_to_process, OID *last_processed_oid, int *total_objects, int *failed_objects, int *modified_objects, int *big_objects) |
int | boot_compact_db (THREAD_ENTRY *thread_p, OID *class_oids, int n_classes, int space_to_process, int instance_lock_timeout, int class_lock_timeout, bool delete_old_repr, OID *last_processed_class_oid, OID *last_processed_oid, int *total_objects, int *failed_objects, int *modified_objects, int *big_objects, int *initial_last_repr_id) |
int | boot_heap_compact_pages (THREAD_ENTRY *thread_p, OID *class_oid) |
int | boot_compact_start (THREAD_ENTRY *thread_p) |
int | boot_compact_stop (THREAD_ENTRY *thread_p) |
bool | boot_can_compact (THREAD_ENTRY *thread_p) |
Variables | |
static bool | compact_started = false |
static int | last_tran_index = -1 |
bool boot_can_compact | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 753 of file compactdb_sr.c.
References compact_started, CSECT_COMPACTDB_ONE_INSTANCE, csect_enter, csect_exit, INF_WAIT, last_tran_index, LOG_FIND_THREAD_TRAN_INDEX, and NO_ERROR.
Referenced by boot_compact_db(), boot_heap_compact_pages(), and shf_heap_reclaim_addresses().
int boot_compact_db | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oids, | ||
int | n_classes, | ||
int | space_to_process, | ||
int | instance_lock_timeout, | ||
int | class_lock_timeout, | ||
bool | delete_old_repr, | ||
OID * | last_processed_class_oid, | ||
OID * | last_processed_oid, | ||
int * | total_objects, | ||
int * | failed_objects, | ||
int * | modified_objects, | ||
int * | big_objects, | ||
int * | initial_last_repr_id | ||
) |
Definition at line 516 of file compactdb_sr.c.
References boot_can_compact(), catalog_drop_old_representations(), COMPACTDB_INVALID_CLASS, COMPACTDB_LOCKED_CLASS, COMPACTDB_REPR_DELETED, COMPACTDB_UNPROCESSED_CLASS, COPY_OID, ER_COMPACTDB_ALREADY_STARTED, ER_FAILED, ER_QPROC_INVALID_PARAMETER, heap_get_class_info(), heap_get_class_repr_id(), lc_copyarea_oneobj::hfid, HFID_IS_NULL, i, IX_LOCK, LK_GRANTED, LK_UNCOND_LOCK, lock_object_wait_msecs(), lock_unlock_object(), NO_ERROR, NULL, OID_EQ, OID_ISNULL, oid_Root_class_oid, OID_SET_NULL, process_class(), and X_LOCK.
Referenced by xboot_compact_db().
int boot_compact_start | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 694 of file compactdb_sr.c.
References compact_started, CSECT_COMPACTDB_ONE_INSTANCE, csect_enter, csect_exit, ER_COMPACTDB_ALREADY_STARTED, ER_FAILED, INF_WAIT, last_tran_index, LOG_FIND_THREAD_TRAN_INDEX, and NO_ERROR.
Referenced by xboot_compact_start().
int boot_compact_stop | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 724 of file compactdb_sr.c.
References compact_started, CSECT_COMPACTDB_ONE_INSTANCE, csect_enter, csect_exit, ER_FAILED, INF_WAIT, last_tran_index, LOG_FIND_THREAD_TRAN_INDEX, and NO_ERROR.
Referenced by sboot_compact_db(), sboot_heap_compact(), shf_heap_reclaim_addresses(), and xboot_compact_stop().
int boot_heap_compact_pages | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid | ||
) |
Definition at line 679 of file compactdb_sr.c.
References boot_can_compact(), ER_COMPACTDB_ALREADY_STARTED, and heap_compact_pages().
Referenced by xboot_heap_compact().
|
static |
Definition at line 296 of file compactdb_sr.c.
References ER_FAILED, heap_attrinfo_clear_dbvalues(), heap_attrinfo_read_dbvalues(), NO_ERROR, and NULL.
Referenced by process_class().
Definition at line 67 of file compactdb_sr.c.
References OID_EQ, and oid_Root_class_oid.
Referenced by process_value().
|
static |
Definition at line 332 of file compactdb_sr.c.
References COPY_OID, desc_disk_to_attr_info(), ER_FAILED, heap_attrinfo_end(), heap_attrinfo_start(), heap_scancache_end_modify(), heap_scancache_start_modify(), i, LC_MANYOBJS_PTR_IN_COPYAREA, LC_NEXT_ONEOBJ_PTR_IN_COPYAREA, LC_RECDES_TO_GET_ONEOBJ, LC_START_ONEOBJ_PTR_IN_COPYAREA, lc_copyarea_oneobj::length, locator_free_copy_area(), lock_unlock_object(), logtb_get_mvcc_snapshot(), NO_ERROR, NULL, NULL_LOCK, lc_copyarea_manyobjs::num_objs, lc_copyarea_oneobj::oid, OID_IS_ROOTOID, process_object(), SINGLE_ROW_UPDATE, X_LOCK, and xlocator_lock_and_fetch_all().
Referenced by boot_compact_db().
|
static |
Definition at line 193 of file compactdb_sr.c.
References assert, heap_scancache_node::class_oid, COPY, recdes::data, DB_NOT_PARTITIONED_CLASS, db_private_alloc, db_private_free, er_clear(), er_errid(), ER_HEAP_UNKNOWN_OBJECT, ER_MVCC_NOT_SATISFIED_REEVALUATION, heap_scancache_node::hfid, i, LC_FLUSH_UPDATE, locator_attribute_info_force(), locator_lock_and_get_object(), LOG_WARNING_IF_DELETED, NO_ERROR, heap_scancache::node, NULL, NULL_CHN, process_value(), REPL_INFO_TYPE_RBR_NORMAL, S_DOESNT_EXIST, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, SINGLE_ROW_UPDATE, UPDATE_INPLACE_NONE, and X_LOCK.
Referenced by process_class().
|
static |
Definition at line 156 of file compactdb_sr.c.
References NO_ERROR, NULL, process_value(), set_iterate(), set_iterator_free(), set_iterator_next(), and set_iterator_value().
Referenced by process_value().
|
static |
Definition at line 84 of file compactdb_sr.c.
References ASSERT_ERROR_AND_SET, COMPACTDB_MSG_REFOID, db_get_oid(), db_get_set(), DB_TYPE_MULTISET, DB_TYPE_OID, DB_TYPE_POINTER, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_VALUE_TYPE, heap_get_visible_version(), heap_scancache_end(), heap_scancache_quick_start(), is_class(), logtb_get_mvcc_snapshot(), MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_COMPACTDB, heap_scancache::mvcc_snapshot, NULL, NULL_CHN, OID_ISNULL, OID_SET_NULL, db_identifier::pageid, PEEK, process_set(), S_ERROR, S_SUCCESS, db_identifier::slotid, and db_identifier::volid.
Referenced by process_object(), and process_set().
|
static |
Definition at line 44 of file compactdb_sr.c.
Referenced by boot_can_compact(), boot_compact_start(), and boot_compact_stop().
|
static |
Definition at line 45 of file compactdb_sr.c.
Referenced by boot_can_compact(), boot_compact_start(), and boot_compact_stop().