#include <jf/jf_config.h>
#include <jf/jf_journal_cold_recovery.h>
#include <jf/jf_utils.h>
#include <jf_file.h>
Go to the source code of this file.
Defines | |
#define | JF_TRACE_MODULE JF_TRACE_MOD_LIB_JOURNAL_COLD_RECOVERY |
Functions | |
int | jf_journal_cold_recovery (jf_journal_t *journal, const struct jf_journal_opts_s *options, int simulation, FILE *out_stream) |
int | jf_journal_cold_recovery_analyze (const char *path, int force_mode, FILE *out_stream, uint32_t analyze_flags) |
int | jf_journal_cold_recovery_patch (jf_journal_t *journal, const jf_recind_pool_t *rip, int simulation, FILE *out_stream, uint32_t analyze_flags) |
int | jf_journal_cold_recovery_patch_record (jf_journal_t *journal, jf_offset_t rec_off, int redo, struct jf_journal_record_s *jr, int simulation, FILE *out_stream, uint32_t analyze_flags) |
int | jf_journal_cold_recovery_patch_seq (jf_journal_t *journal, jf_word_t id, const jf_recind_seq_t *ris, int simulation, FILE *out_stream, uint32_t analyze_flags) |
int | jf_journal_cold_recovery_prep_pool (jf_journal_t *journal, jf_recind_pool_t *rip, const struct jf_journal_opts_s *options, int simulation, FILE *out_stream) |
int | jf_journal_cold_recovery_update_lists (jf_journal_t *journal, jf_offset_t rec_off, const struct jf_journal_ctrl_code_s *jcc, jf_recind_pool_t *rip, jf_recind_list_t *ril) |
int | jf_journal_fetch_ctrl_code (const jf_journal_t *journal, struct jf_journal_ctrl_code_s *jcc) |
|
Definition at line 34 of file jf_journal_cold_recovery.c. |
|
|
Analyze a journal and print a report with the operation will be performed if a cold recovery are performed
References CATCH, jf_journal_t::file_table, fseeko, JF_JOURNAL_ANALYZE_TRACE, jf_journal_cold_recovery(), jf_journal_file_get_last_pos(), jf_journal_file_tab_get_jfile(), jf_journal_get_real_path(), jf_journal_init(), JF_JOURNAL_JOURNAL_FILE_ID, jf_journal_load(), JF_OFFSET_T_FORMAT, JF_RC_FOPEN_ERROR, JF_RC_FSEEK_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_set_default_journal_opts(), JF_TRACE, jf_journal_opts_s::recovery_analyze_flags, jf_journal_opts_s::recovery_damaged_journal, THROW, and TRUE. Referenced by main(). |
|
Patch journaled files using record index pool instruction
References CATCH, jf_journal_t::file_table, jf_file_open(), JF_JOURNAL_ANALYZE_TRACE, jf_journal_cold_recovery_patch_seq(), jf_journal_file_get_last_pos(), jf_journal_file_get_last_size(), jf_journal_file_get_path(), jf_journal_file_get_stream(), jf_journal_file_set_last_pos(), jf_journal_file_tab_get_jfile(), jf_offset_t, JF_OFFSET_T_FORMAT, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_recind_pool_get_seq(), jf_recind_pool_get_size(), jf_recind_seq_get_size(), JF_TRACE, jf_word_t, and THROW. Referenced by jf_journal_cold_recovery(). |
|
Patch a journaled file with record specified by journal
References CATCH, fseeko, JF_JOURNAL_ANALYZE_TRACE, jf_journal_apply_changes(), jf_journal_fetch_record(), jf_journal_get_stream(), jf_journal_remove_changes(), jf_journal_trace_record(), jf_offset_t, JF_RC_FSEEK_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, THROW, and TRUE. Referenced by jf_journal_cold_recovery_patch_seq(). |
|
Patch a journaled file using record index sequence instruction
References CATCH, FALSE, jf_journal_t::file_table, JF_JOURNAL_ANALYZE_TRACE, jf_journal_cold_recovery_patch_record(), jf_journal_file_get_last_size(), jf_journal_file_get_last_uc_size(), jf_journal_file_set_last_size(), jf_journal_file_tab_get_jfile(), jf_journal_record_destroy(), jf_journal_record_reset(), jf_offset_t, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_recind_list_get_elem(), jf_recind_list_get_size(), jf_recind_list_get_uow_type(), JF_RECIND_OPER_MUST_COMMIT, JF_RECIND_OPER_MUST_ROLLBACK, jf_recind_seq_get_elem(), jf_recind_seq_get_size(), JF_TRACE, jf_word_t, THROW, and TRUE. Referenced by jf_journal_cold_recovery_patch(). |
|
Prepare the Record Index Pool associated to journal
References CATCH, FALSE, jf_journal_t::file_id_mask, jf_journal_t::file_id_mask_shift, jf_journal_t::file_table, fseeko, ftello, JF_JOURNAL_ANALYZE_TRACE, jf_journal_cold_recovery_update_lists(), jf_journal_fetch_ctrl_code(), jf_journal_file_tab_get_number_of_files(), jf_journal_get_stream(), JF_JOURNAL_GLOBAL_FILE_ID, JF_JOURNAL_OP_CODE_ROLLBACK, jf_offset_t, JF_RC_DAMAGED_JOURNAL, JF_RC_EOF, JF_RC_FREAD_ERROR, JF_RC_FSEEK_ERROR, JF_RC_FTELL_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_INVALID_CTRL_CODE, JF_RC_MALLOC_ERROR, JF_RC_OK, jf_recind_list_create(), jf_recind_pool_create(), jf_recind_pool_destroy(), jf_stream_truncate(), JF_TRACE, jf_word_t, jf_journal_opts_s::recovery_analyze_flags, jf_journal_opts_s::recovery_damaged_journal, jf_journal_ctrl_code_s::redo_code, THROW, TRUE, and jf_journal_ctrl_code_s::undo_code. Referenced by jf_journal_cold_recovery(). |
|
A sync point (commit/rollback) has been reached and the list must me "closed" (added to pool if not empty)
References CATCH, jf_journal_t::file_id_mask, jf_journal_t::file_id_mask_shift, jf_journal_t::file_table, jf_journal_file_tab_get_number_of_files(), JF_JOURNAL_FIRST_FILE_ID, JF_JOURNAL_GLOBAL_FILE_ID, JF_JOURNAL_OP_CODE_COMMIT, JF_JOURNAL_OP_CODE_ROLLBACK, JF_JOURNAL_OP_MASK, jf_offset_t, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_recind_list_add(), jf_recind_list_create(), jf_recind_list_get_size(), jf_recind_list_set_uow_type(), JF_RECIND_OPER_MUST_COMMIT, JF_RECIND_OPER_MUST_ROLLBACK, jf_recind_pool_get_seq(), jf_recind_seq_add(), JF_TRACE, jf_word_t, jf_journal_ctrl_code_s::redo_code, and THROW. Referenced by jf_journal_cold_recovery_prep_pool(). |
|
Fetch next control code record from journal file; note: this function does NOT fetch redo/undo data associated to control code, use jf_journal_fetch_record instead
References CATCH, fseeko, ftello, jf_journal_describe_code(), jf_journal_get_stream(), JF_JOURNAL_OP_CODE_APPEND, JF_JOURNAL_OP_CODE_MASK, JF_JOURNAL_OP_CODE_NULL, JF_JOURNAL_OP_CODE_SYNC, JF_JOURNAL_OP_CODE_UPDATE, JF_JOURNAL_OP_DO, JF_JOURNAL_OP_MASK, jf_offset_t, JF_OFFSET_T_FORMAT, JF_RC_EOF, JF_RC_FREAD_ERROR, JF_RC_FSEEK_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_INVALID_CTRL_CODE, JF_RC_OK, JF_TRACE, jf_word_t, jf_journal_ctrl_code_s::redo_code, jf_journal_t::size_mask, jf_journal_t::size_mask_shift, THROW, and jf_journal_ctrl_code_s::undo_code. Referenced by jf_journal_cold_recovery_prep_pool(). |