CUBRID Engine  latest
boot_sr.h File Reference
#include "config.h"
#include <time.h>
#include "boot.h"
#include "error_manager.h"
#include "storage_common.h"
#include "oid.h"
#include "disk_manager.h"
#include "log_comm.h"
#include "log_lsa.hpp"
#include "file_io.h"
#include "tde.h"
Include dependency graph for boot_sr.h:

Go to the source code of this file.

Classes

struct  check_args
 
struct  bo_restart_arg
 

Macros

#define BO_IS_SERVER_RESTARTED()
 

Typedefs

typedef enum boot_server_status BOOT_SERVER_STATUS
 
typedef enum boot_server_shutdown_mode BOOT_SERVER_SHUTDOWN_MODE
 
typedef struct check_args CHECK_ARGS
 
typedef struct bo_restart_arg BO_RESTART_ARG
 

Enumerations

enum  boot_server_status { BOOT_SERVER_UP = 1, BOOT_SERVER_DOWN, BOOT_SERVER_MAINTENANCE }
 
enum  boot_server_shutdown_mode { BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, BOOT_SHUTDOWN_ALL_MODULES }
 

Functions

void boot_server_status (BOOT_SERVER_STATUS status)
 
const char * boot_db_name (void)
 
const char * boot_db_full_name (void)
 
const char * boot_get_lob_path (void)
 
int boot_find_root_heap (HFID *root_hfid_p)
 
VOLID boot_find_next_permanent_volid (THREAD_ENTRY *thread_p)
 
int boot_reset_db_parm (THREAD_ENTRY *thread_p)
 
int boot_restart_server (THREAD_ENTRY *thread_p, bool print_restart, const char *db_name, bool from_backup, CHECK_ARGS *check_coll_and_timezone, BO_RESTART_ARG *r_args, bool skip_vacuum)
 
int xboot_restart_from_backup (THREAD_ENTRY *thread_p, int print_restart, const char *db_name, BO_RESTART_ARG *r_args)
 
int boot_reset_mk_after_restart_from_backup (THREAD_ENTRY *thread_p, BO_RESTART_ARG *r_args)
 
bool xboot_shutdown_server (REFPTR(THREAD_ENTRY, thread_p), ER_FINAL_CODE is_er_final)
 
int xboot_copy (REFPTR(THREAD_ENTRY, thread_p), const char *from_dbname, const char *new_db_name, const char *new_db_path, const char *new_log_path, const char *new_lob_path, const char *new_db_server_host, const char *new_volext_path, const char *fileof_vols_and_copypaths, bool new_db_overwrite)
 
int xboot_soft_rename (THREAD_ENTRY *thread_p, const char *old_db_name, const char *new_db_name, const char *new_db_path, const char *new_log_path, const char *new_db_server_host, const char *new_volext_path, const char *fileof_vols_and_renamepaths, bool new_db_overwrite, bool extern_rename, bool force_delete)
 
int xboot_delete (const char *db_name, bool force_delete, BOOT_SERVER_SHUTDOWN_MODE shutdown_common_modules)
 
int xboot_emergency_patch (const char *db_name, bool recreate_log, DKNPAGES log_npages, const char *db_locale, FILE *out_fp)
 
void boot_server_all_finalize (THREAD_ENTRY *thread_p, ER_FINAL_CODE is_er_final, BOOT_SERVER_SHUTDOWN_MODE shutdown_common_modules)
 
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)
 
bool boot_set_skip_check_ct_classes (bool val)
 
const char * boot_client_type_to_string (BOOT_CLIENT_TYPE type)
 
int boot_get_new_volume_name_and_id (THREAD_ENTRY *thread_p, DB_VOLTYPE voltype, const char *given_path, const char *given_name, char *fullname_newvol_out, VOLID *volid_newvol_out)
 
int boot_dbparm_save_volume (THREAD_ENTRY *thread_p, DB_VOLTYPE voltype, VOLID volid)
 

Variables

BOOT_SERVER_STATUS boot_Server_status
 

Macro Definition Documentation

Typedef Documentation

Definition at line 91 of file boot_sr.h.

Definition at line 74 of file boot_sr.h.

Definition at line 69 of file boot_sr.h.

typedef struct check_args CHECK_ARGS

Definition at line 76 of file boot_sr.h.

Enumeration Type Documentation

Enumerator
BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES 
BOOT_SHUTDOWN_ALL_MODULES 

Definition at line 72 of file boot_sr.h.

Enumerator
BOOT_SERVER_UP 
BOOT_SERVER_DOWN 
BOOT_SERVER_MAINTENANCE 

Definition at line 67 of file boot_sr.h.

Function Documentation

bool boot_can_compact ( THREAD_ENTRY thread_p)
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_compact_start ( THREAD_ENTRY thread_p)
int boot_compact_stop ( THREAD_ENTRY thread_p)
const char* boot_db_name ( void  )

Definition at line 459 of file boot_sr.c.

References boot_Db_full_name, and fileio_get_base_file_name().

Referenced by css_register_server_timeout_fn(), er_file_backup(), jsp_server_port(), logpb_backup(), logpb_restore(), and sboot_change_ha_mode().

Here is the caller graph for this function:

VOLID boot_find_next_permanent_volid ( THREAD_ENTRY thread_p)

Definition at line 425 of file boot_sr.c.

References disk_lock_extend(), disk_unlock_extend(), and boot_dbparm::last_volid.

Referenced by log_recovery_notpartof_volumes().

Here is the caller graph for this function:

const char* boot_get_lob_path ( void  )

Definition at line 479 of file boot_sr.c.

References boot_Lob_path.

Referenced by catcls_vclass_install(), copydb(), spacedb(), and xboot_soft_rename().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

int boot_reset_db_parm ( THREAD_ENTRY thread_p)

Definition at line 447 of file boot_sr.c.

References boot_get_db_parm().

Referenced by log_recovery().

Here is the caller graph for this function:

int boot_restart_server ( THREAD_ENTRY thread_p,
bool  print_restart,
const char *  db_name,
bool  from_backup,
CHECK_ARGS check_coll_and_timezone,
BO_RESTART_ARG r_args,
bool  skip_vacuum 
)

Definition at line 2046 of file boot_sr.c.

References area_init(), ARG_FILE_LINE, assert, ASSERT_ERROR, assert_release, boot_after_copydb(), boot_Db_full_name, boot_find_rest_volumes(), BOOT_FORMAT_MAX_LENGTH, boot_get_db_charset_from_header(), boot_get_db_parm(), boot_Host_name, boot_Lob_path, boot_make_session_server_key(), boot_mount(), boot_remove_all_temp_volumes(), boot_server_all_finalize(), BOOT_SERVER_DOWN, boot_Server_status, boot_server_status(), BOOT_SERVER_UP, BOOT_SHUTDOWN_EXCEPT_COMMON_MODULES, boot_volume_info_log_path(), catalog_initialize(), catcls_compile_catalog_classes(), catcls_Enable, catcls_find_and_set_cached_class_oid(), catcls_get_db_collation(), catcls_get_server_compat_info(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), check_args::check_db_coll, check_args::check_timezone, check_timezone_compat(), tz_data::checksum, COMPOSE_FULL_NAME(), css_change_ha_server_state(), css_final_conn_list(), css_ha_mode_string(), css_init_conn_list(), css_set_accessible_ip_info(), css_set_ha_num_of_hosts(), boot_dbparm::ctid, CUB_MAXHOSTNAMELEN, DATABASES_FILENAME, db_private_free, disk_get_boot_hfid(), disk_manager_init(), boot_dbparm::dropped_files_vfid, dwb_load_and_recover_pages(), ER_BO_CANNOT_ACCESS_MESSAGE_CATALOG, ER_BO_CANT_LOAD_SYSPRM, ER_BO_MISSING_OR_INVALID_CATALOG, ER_BO_UNABLE_TO_RESTART_SERVER, ER_BO_UNKNOWN_DATABASE, ER_CFG_NO_FILE, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_ES_NO_LOB_PATH, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_init(), ER_IO_MOUNT_LOCKED, ER_LOC_INIT, er_msg(), ER_PRM_CONFLICT_EXISTS_ON_MULTIPLE_SECTIONS, er_set(), er_stack_pop(), er_stack_push(), ER_TDE_CIPHER_LOAD_FAIL, ER_THREAD_FINAL, ER_TZ_LOAD_ERROR, ER_WARNING_SEVERITY, ERR_MSG_SIZE, error(), es_init(), event_log_init(), FILE_HEAP, file_tracker_load(), fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), cubthread::finalize(), fpcache_finalize(), fpcache_initialize(), free_and_init, GETHOSTNAME, HA_CHANGE_MODE_IMMEDIATELY, HA_DISABLED, HA_GET_MODE, heap_cache_class_info(), heap_manager_initialize(), boot_dbparm::hfid, cubthread::initialize(), cubthread::initialize_thread_entries(), INTL_CODESET_LAST, INTL_CODESET_NONE, bo_restart_arg::is_restore_from_backup, jsp_start_server(), bo_restart_arg::keys_file_path, lang_charset_cubrid_name(), lang_check_coll_compat(), lang_init(), LANG_MAX_LANGNAME, lang_set_charset(), lang_set_language(), database_info::lobpath, locator_initialize(), locator_initialize_areas(), LOG_DBFIRST_VOLID, LOG_DBTXT_VOLID, log_final(), log_get_io_page_size(), log_initialize(), log_set_db_restore_time(), log_set_ha_promotion_time(), database_info::logpath, logpb_remove_all_in_log_path(), logpb_restore(), logtb_assign_tran_index(), logtb_define_trantable(), logtb_disable_update(), logtb_finalize_global_unique_stats_table(), logtb_free_tran_index(), logtb_initialize_global_unique_stats_table(), logtb_set_to_system_tran_index(), MAX_NTRANS, tf_meta_class::mc_n_variable, MSGCAT_CATALOG_CUBRID, msgcat_final(), MSGCAT_GENERAL_DATABASE_INIT, msgcat_init(), msgcat_message(), MSGCAT_SET_GENERAL, NO_ERROR, NULL, NULL_TRAN_INDEX, NULL_TRANID, NULL_VOLDES, database_info::num_hosts, oid_set_root(), partition_cache_init(), database_info::pathname, perfmon_initialize(), pr_area_init(), pr_Enable_string_compression, prm_get_bool_value(), prm_get_integer_value(), prm_get_name(), prm_get_string_value(), PRM_ID_ACCESS_IP_CONTROL, PRM_ID_DISABLE_VACUUM, PRM_ID_ENABLE_STRING_COMPRESSION, PRM_ID_ER_EXIT_ASK, PRM_ID_ER_LOG_FILE, PRM_ID_HA_MODE, PRM_ID_HA_SERVER_STATE, PRM_ID_JAVA_STORED_PROCEDURE, PRM_ID_JAVA_STORED_PROCEDURE_PORT, PRM_ID_READ_ONLY_MODE, qfile_finalize_list_cache(), qfile_initialize_list_cache(), qmgr_initialize(), rel_bit_platform(), rel_build_number(), rel_build_type(), rel_name(), REMOVE_TEMP_VOL_DEFAULT_ACTION, bo_restart_arg::restore_slave, boot_dbparm::rootclass_hfid, boot_dbparm::rootclass_name, boot_dbparm::rootclass_oid, serial_initialize_cache_pool(), session_states_finalize(), session_states_init(), set_area_init(), skip_to_check_ct_classes_for_rebuild, spage_boot(), strdup(), strlcpy(), strncpy_size, SYSPRM_LOAD_ALL, sysprm_load_and_init(), tde_cipher_initialize(), boot_dbparm::tde_keyinfo_hfid, tf_compile_meta_classes(), tf_Metaclass_class, thread_get_thread_entry_info(), tp_init(), TRAN_ACTIVE, TRAN_DEFAULT_ISOLATION_LEVEL, TRAN_LOCK_INFINITE_WAIT, TRAN_UNACTIVE_COMMITTED, boot_dbparm::trk_vfid, tsc_init(), tz_get_data(), tz_load(), vacuum_boot(), boot_dbparm::vacuum_data_vfid, vacuum_initialize(), boot_dbparm::vacuum_log_block_npages, vacuum_stop_master(), vacuum_stop_workers(), xcache_finalize(), xcache_initialize(), xtran_server_commit(), and xvacuum().

Referenced by net_server_start(), xboot_copy(), xboot_register_client(), and xboot_restart_from_backup().

Here is the caller graph for this function:

bool boot_set_skip_check_ct_classes ( bool  val)

Definition at line 5902 of file boot_sr.c.

References skip_to_check_ct_classes_for_rebuild.

int xboot_copy ( REFPTR(THREAD_ENTRY, thread_p)  ,
const char *  from_dbname,
const char *  new_db_name,
const char *  new_db_path,
const char *  new_log_path,
const char *  new_lob_path,
const char *  new_db_server_host,
const char *  new_volext_path,
const char *  fileof_vols_and_copypaths,
bool  new_db_overwrite 
)
int xboot_emergency_patch ( const char *  db_name,
bool  recreate_log,
DKNPAGES  log_npages,
const char *  db_locale,
FILE *  out_fp 
)

Definition at line 5335 of file boot_sr.c.

References ARG_FILE_LINE, ASSERT_ERROR, boot_Db_full_name, boot_find_rest_volumes(), boot_get_db_charset_from_header(), boot_get_db_parm(), boot_mount(), boot_server_all_finalize(), boot_server_status(), BOOT_SERVER_UP, BOOT_SHUTDOWN_ALL_MODULES, boot_volume_info_log_path(), catalog_initialize(), catcls_get_server_compat_info(), cfg_find_db_list(), cfg_free_directory(), cfg_maycreate_get_directory_filename(), cfg_read_directory(), cfg_read_directory_ex(), COMPOSE_FULL_NAME(), boot_dbparm::ctid, DATABASES_FILENAME, db_set_page_size(), disk_get_boot_hfid(), disk_manager_init(), boot_dbparm::dropped_files_vfid, ER_ALL_FINAL, ER_BO_CANT_LOAD_SYSPRM, ER_BO_UNKNOWN_DATABASE, ER_CFG_NO_FILE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_LOC_INIT, er_msg(), er_set(), ER_THREAD_FINAL, ERR_MSG_SIZE, file_tracker_load(), fileio_dismount(), fileio_get_base_file_name(), fileio_mount(), heap_manager_initialize(), boot_dbparm::hfid, cubthread::initialize(), cubthread::initialize_thread_entries(), INTL_CODESET_ERROR, INTL_CODESET_LAST, INTL_CODESET_NONE, IO_DEFAULT_PAGE_SIZE, lang_charset(), lang_charset_cubrid_name(), lang_init(), LANG_MAX_LANGNAME, lang_set_charset(), lang_set_charset_lang(), locator_initialize(), LOG_DBFIRST_VOLID, LOG_DBTXT_VOLID, log_get_io_page_size(), log_recreate(), log_restart_emergency(), database_info::logpath, logtb_define_trantable(), logtb_initialize_global_unique_stats_table(), msgcat_init(), NO_ERROR, NULL, NULL_VOLDES, oid_set_root(), database_info::pathname, prm_get_bool_value(), PRM_ID_DISABLE_VACUUM, boot_dbparm::rootclass_oid, spage_boot(), SYSPRM_LOAD_ALL, sysprm_load_and_init(), tp_init(), boot_dbparm::trk_vfid, tsc_init(), boot_dbparm::vacuum_data_vfid, vacuum_initialize(), boot_dbparm::vacuum_log_block_npages, xboot_shutdown_server(), xdisk_get_total_numpages(), and xtran_server_commit().

Referenced by boot_emergency_patch().

Here is the caller graph for this function:

Variable Documentation