forked from lotusdblabs/lotusdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.go
More file actions
37 lines (30 loc) · 1.41 KB
/
Copy pathoptions.go
File metadata and controls
37 lines (30 loc) · 1.41 KB
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
package lotusdb
type Options struct {
// DirPath specifies the directory path where all the database files will be stored.
DirPath string
// MemtableSize represents the maximum size in bytes for a memtable.
// It means that each memtable will occupy so much memory.
// Default value is 64MB.
MemtableSize uint32
// MemtableNums represents maximum number of memtables to keep in memory before flushing.
// Default value is 5.
MemtableNums int
// BlockCache specifies the size of the block cache in number of bytes.
// A block cache is used to store recently accessed data blocks, improving read performance.
// If BlockCache is set to 0, no block cache will be used.
BlockCache uint32
// Sync is whether to synchronize writes through os buffer cache and down onto the actual disk.
// Setting sync is required for durability of a single write operation, but also results in slower writes.
//
// If false, and the machine crashes, then some recent writes may be lost.
// Note that if it is just the process that crashes (machine does not) then no writes will be lost.
//
// In other words, Sync being false has the same semantics as a write
// system call. Sync being true means write followed by fsync.
Sync bool
// BytesPerSync specifies the number of bytes to write before calling fsync.
BytesPerSync uint32
// ValueLogFileSize size of a single value log file.
// Default value is 1GB.
ValueLogFileSize int64
}