CUBRID Engine
latest
Main Page
Namespaces
Classes
Files
File List
File Members
log_common_impl.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 implementation common part to server/client modules.
21
*/
22
23
#ifndef _LOG_COMMON_IMPL_H_
24
#define _LOG_COMMON_IMPL_H_
25
26
#include "
file_io.h
"
27
#include "
log_comm.h
"
28
#include "
log_lsa.hpp
"
29
#include "
log_record.hpp
"
30
#include "
recovery.h
"
31
#include "
release_string.h
"
32
#include "
storage_common.h
"
33
#include "system.h"
34
35
/************************************************************************/
36
/* Section shared with client... TODO: remove any code accessing log */
37
/* module on client. Most are used by log_writer.c and log_applier.c */
38
/************************************************************************/
39
40
/* Uses 0xff to fills up the page, before writing in it. This helps recovery to detect the end of the log in
41
* case of log page corruption, caused by partial page flush. Thus, at recovery analysis, we can easily
42
* detect the last valid log record - the log record having NULL_LSA (0xff) in its forward address field.
43
* If we do not use 0xff, a corrupted log record will be considered valid at recovery, thus affecting
44
* the database consistency.
45
*/
46
#define LOG_PAGE_INIT_VALUE 0xff
47
48
#define NUM_NORMAL_TRANS (prm_get_integer_value (PRM_ID_CSS_MAX_CLIENTS))
49
#define NUM_SYSTEM_TRANS 1
50
#define NUM_NON_SYSTEM_TRANS (css_get_max_conn ())
51
#define MAX_NTRANS \
52
(NUM_NON_SYSTEM_TRANS + NUM_SYSTEM_TRANS)
53
54
#define VACUUM_NULL_LOG_BLOCKID -1
55
56
enum
LOG_HA_FILESTAT
57
{
58
LOG_HA_FILESTAT_CLEAR
= 0,
59
LOG_HA_FILESTAT_ARCHIVED
= 1,
60
LOG_HA_FILESTAT_SYNCHRONIZED
= 2
61
};
62
63
#if !defined (NDEBUG) && !defined (WINDOWS)
64
extern
int
logtb_collect_local_clients
(
int
**local_client_pids);
65
#endif
/* !defined (NDEBUG) && !defined (WINDOWS) */
66
67
/************************************************************************/
68
/* End of part shared with client. */
69
/************************************************************************/
70
71
#endif // _LOG_COMMON_IMPL_H_
storage_common.h
LOG_HA_FILESTAT_CLEAR
Definition:
log_common_impl.h:58
file_io.h
LOG_HA_FILESTAT_ARCHIVED
Definition:
log_common_impl.h:59
LOG_HA_FILESTAT
LOG_HA_FILESTAT
Definition:
log_common_impl.h:56
LOG_HA_FILESTAT_SYNCHRONIZED
Definition:
log_common_impl.h:60
log_comm.h
logtb_collect_local_clients
int logtb_collect_local_clients(int **local_client_pids)
Definition:
log_tran_table.c:5135
recovery.h
log_lsa.hpp
release_string.h
log_record.hpp
src
transaction
log_common_impl.h
Generated by
1.8.11