CUBRID Engine  latest
log_applier.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * log_applier.h - DECLARATIONS FOR LOG APPLIER (AT CLIENT & SERVER)
21  */
22 
23 #ifndef _LOG_APPLIER_HEADER_
24 #define _LOG_APPLIER_HEADER_
25 
26 #ident "$Id$"
27 
28 #if defined (CS_MODE)
29 #include "log_common_impl.h"
30 #include "log_lsa.hpp"
31 #include "log_storage.hpp"
32 #endif /* CS_MODE */
33 
34 #define LA_RETRY_ON_ERROR(error) \
35  ((error == ER_LK_UNILATERALLY_ABORTED) || \
36  (error == ER_LK_OBJECT_TIMEOUT_SIMPLE_MSG) || \
37  (error == ER_LK_OBJECT_TIMEOUT_CLASS_MSG) || \
38  (error == ER_LK_OBJECT_TIMEOUT_CLASSOF_MSG) || \
39  (error == ER_LK_PAGE_TIMEOUT) || \
40  (error == ER_PAGE_LATCH_TIMEDOUT) || \
41  (error == ER_PAGE_LATCH_ABORTED) || \
42  (error == ER_LK_OBJECT_DL_TIMEOUT_SIMPLE_MSG) || \
43  (error == ER_LK_OBJECT_DL_TIMEOUT_CLASS_MSG) || \
44  (error == ER_LK_OBJECT_DL_TIMEOUT_CLASSOF_MSG) || \
45  (error == ER_TDE_CIPHER_IS_NOT_LOADED) || \
46  (error == ER_LK_DEADLOCK_CYCLE_DETECTED))
47 
48 typedef enum
49 {
54 
55 #if defined (CS_MODE)
56 int la_log_page_check (const char *database_name, const char *log_path, INT64 page_num, bool check_applied_info,
57  bool check_copied_info, bool check_replica_info, bool verbose, LOG_LSA * copied_eof_lsa,
58  LOG_LSA * copied_append_lsa, LOG_LSA * applied_final_lsa);
59 int la_apply_log_file (const char *database_name, const char *log_path, const int max_mem_size);
60 void la_print_log_header (const char *database_name, LOG_HEADER * hdr, bool verbose);
61 void la_print_log_arv_header (const char *database_name, LOG_ARV_HEADER * hdr, bool verbose);
62 void la_print_delay_info (LOG_LSA working_lsa, LOG_LSA target_lsa, float process_rate);
63 #ifdef UNSTABLE_TDE_FOR_REPLICATION_LOG
64 extern int la_start_dk_sharing ();
65 #endif /* UNSTABLE_TDE_FOR_REPLICATION_LOG */
66 
67 extern bool la_force_shutdown (void);
68 #endif /* CS_MODE */
69 
70 #endif /* _LOG_APPLIER_HEADER_ */
bool la_force_shutdown(void)
Definition: log_applier.c:591
int la_log_page_check(const char *database_name, const char *log_path, INT64 page_num, bool check_applied_info, bool check_copied_info, bool check_replica_info, bool verbose, LOG_LSA *copied_eof_lsa, LOG_LSA *copied_append_lsa, LOG_LSA *applied_final_lsa)
Definition: log_applier.c:7046
int la_apply_log_file(const char *database_name, const char *log_path, const int max_mem_size)
Definition: log_applier.c:7810
REPL_FILTER_TYPE
Definition: log_applier.h:48
static char database_name[MAX_HA_DBINFO_LENGTH]
Definition: cas_execute.c:387
void la_print_log_arv_header(const char *database_name, LOG_ARV_HEADER *hdr, bool verbose)
Definition: log_applier.c:7018
void la_print_log_header(const char *database_name, LOG_HEADER *hdr, bool verbose)
Definition: log_applier.c:6960
void la_print_delay_info(LOG_LSA working_lsa, LOG_LSA target_lsa, float process_rate)
Definition: log_applier.c:7269