-
Notifications
You must be signed in to change notification settings - Fork 139
/
engine_option.go
97 lines (76 loc) · 2.66 KB
/
engine_option.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package netstorage
import (
"time"
"github.com/influxdata/influxdb/pkg/limiter"
)
const (
tsspVersion = "1.0.0"
)
type EngineOptions struct {
Version string
// Limits the concurrent number of TSM files that can be loaded at once.
OpenLimiter limiter.Fixed
ImmTableMaxMemoryPercentage int
// WriteColdDuration is the length of time at which the engine will snapshot the mutable
WriteColdDuration time.Duration
// ShardMutableSizeLimit is the maximum size a shard's cache can reach before it starts rejecting writes.
ShardMutableSizeLimit int64
// NodeMutableSizeLimit is the maximum size a node's cache can reach before it starts rejecting writes.
NodeMutableSizeLimit int64
// MaxWriteHangTime is the maximum time to hang for data write to store if node mem of mem is not enough
MaxWriteHangTime time.Duration
// Enable read from mem data, include mutable and snapshot table, default value is true
MemDataReadEnabled bool
FullCompactColdDuration time.Duration
MaxConcurrentCompactions int
MaxFullCompactions int
CompactThroughput int64
CompactThroughputBurst int64
CompactRecovery bool
CsCompactionEnabled bool
CsDetachedFlushEnabled bool
SnapshotThroughput int64
SnapshotThroughputBurst int64
SnapshotTblNum int
FragmentsNumPerFlush int
BackgroundReadThroughput int
// WalSyncInterval is the interval of wal file sync
WalEnabled bool
WalSyncInterval time.Duration
WalReplayParallel bool
WalReplayAsync bool
WalReplayBatchSize int
// Immutable config
ReadPageSize string
ReadMetaCacheLimit uint64
ReadDataCacheLimit uint64
CacheDataBlock bool
CacheMetaBlock bool
EnableMmapRead bool
CompactionMethod int // 0:auto, 1:stream, 2: non-stream
OpenShardLimit int
// lazy load shards
LazyLoadShardEnable bool
ThermalShardStartDuration time.Duration
ThermalShardEndDuration time.Duration
DownSampleWriteDrop bool
MaxDownSampleTaskConcurrency int
MaxSeriesPerDatabase int
}
func NewEngineOptions() EngineOptions {
return EngineOptions{
Version: tsspVersion,
}
}