MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
ob_lsm_options.h
1/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2miniob is licensed under Mulan PSL v2.
3You can use this software according to the terms and conditions of the Mulan PSL v2.
4You may obtain a copy of Mulan PSL v2 at:
5 http://license.coscl.org.cn/MulanPSL2
6THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9See the Mulan PSL v2 for more details. */
10
11#pragma once
12
13#include <cstddef>
14#include "oblsm/ob_lsm_define.h"
15
16namespace oceanbase {
17
22{
23 ObLsmOptions(){};
24
25 // TODO: all params are used for test, need to reset to appropriate values.
26 size_t memtable_size = 8 * 1024;
27 // sstable size
28 size_t table_size = 16 * 1024;
29
30 // leveled compaction
31 size_t default_levels = 7;
32 size_t default_l1_level_size = 128 * 1024;
33 size_t default_level_ratio = 10;
34 size_t default_l0_file_num = 3;
35
36 // tired compaction
37 size_t default_run_num = 7;
38
39 // default compaction type
40 CompactionType type = CompactionType::LEVELED;
41
42 // it is used to control whether the WAL is forced to be written to the disk every time a new key is written.
43 bool force_sync_new_log = true;
44};
45
46// TODO: UNIMPLEMENTED
48{
50
51 int64_t seq = -1;
52};
53
54} // namespace oceanbase
Configuration options for the LSM-Tree implementation.
Definition: ob_lsm_options.h:22
Definition: ob_lsm_options.h:48