CUBRID Engine  latest
log_archives.hpp
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 archives management
21 //
22 
23 #ifndef _LOG_ARCHIVES_HPP_
24 #define _LOG_ARCHIVES_HPP_
25 
26 #include "file_io.h"
27 #include "log_storage.hpp"
28 #include "storage_common.h"
29 
30 typedef struct log_archives LOG_ARCHIVES;
32 {
33  int vdes; /* Last archived accessed */
34  LOG_ARV_HEADER hdr; /* The log archive header */
35  int max_unav; /* Max size of unavailable array */
36  int next_unav; /* Last unavailable entry */
37  int *unav_archives; /* Unavailable archives */
38 
40  : vdes (NULL_VOLDES)
41  , hdr ()
42  , max_unav (0)
43  , next_unav (0)
44  , unav_archives (NULL)
45  {
46  }
47 };
48 
49 //
50 // background archiving
51 //
54 {
58  int vdes;
59 
61  : start_page_id (NULL_PAGEID)
62  , current_page_id (NULL_PAGEID)
63  , last_sync_pageid (NULL_PAGEID)
64  , vdes (NULL_VOLDES)
65  {
66  }
67 };
68 
69 // todo - move from log_impl.h
70 
71 #endif // !_LOG_ARCHIVES_HPP_
#define NULL_VOLDES
Definition: file_io.h:44
#define NULL_PAGEID
LOG_ARV_HEADER hdr
int * unav_archives
INT64 LOG_PAGEID
#define NULL
Definition: freelistheap.h:34