-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathtypes.h
94 lines (77 loc) · 2.07 KB
/
types.h
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
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include <stdint.h>
#include "rocksdb/slice.h"
namespace ROCKSDB_NAMESPACE {
// Define all public custom types here.
using ColumnFamilyId = uint32_t;
// Represents a sequence number in a WAL file.
using SequenceNumber = uint64_t;
const SequenceNumber kMinUnCommittedSeq = 1; // 0 is always committed
enum class TableFileCreationReason {
kFlush,
kCompaction,
kRecovery,
kMisc,
};
enum class BlobFileCreationReason {
kFlush,
kCompaction,
kRecovery,
};
// The types of files RocksDB uses in a DB directory. (Available for
// advanced options.)
enum FileType {
kWalFile,
kDBLockFile,
kTableFile,
kDescriptorFile,
kCurrentFile,
kTempFile,
kInfoLogFile, // Either the current one, or an old one
kMetaDatabase,
kIdentityFile,
kOptionsFile,
kBlobFile
};
// User-oriented representation of internal key types.
// Ordering of this enum entries should not change.
enum EntryType {
kEntryPut,
kEntryDelete,
kEntrySingleDelete,
kEntryMerge,
kEntryRangeDeletion,
kEntryBlobIndex,
kEntryDeleteWithTimestamp,
kEntryWideColumnEntity,
kEntryOther,
};
enum class WriteStallCause {
// Beginning of CF-scope write stall causes
//
// Always keep `kMemtableLimit` as the first stat in this section
kMemtableLimit,
kL0FileCountLimit,
kPendingCompactionBytes,
kCFScopeWriteStallCauseEnumMax,
// End of CF-scope write stall causes
// Beginning of DB-scope write stall causes
//
// Always keep `kWriteBufferManagerLimit` as the first stat in this section
kWriteBufferManagerLimit,
kDBScopeWriteStallCauseEnumMax,
// End of DB-scope write stall causes
// Always add new WriteStallCause before `kNone`
kNone,
};
enum class WriteStallCondition {
kDelayed,
kStopped,
// Always add new WriteStallCondition before `kNormal`
kNormal,
};
} // namespace ROCKSDB_NAMESPACE