]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/include/rocksdb/types.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / include / rocksdb / types.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5
6 #pragma once
7
8 #include <stdint.h>
9
10 #include "rocksdb/slice.h"
11
12 namespace ROCKSDB_NAMESPACE {
13
14 // Define all public custom types here.
15
16 using ColumnFamilyId = uint32_t;
17
18 // Represents a sequence number in a WAL file.
19 using SequenceNumber = uint64_t;
20
21 const SequenceNumber kMinUnCommittedSeq = 1; // 0 is always committed
22
23 enum class TableFileCreationReason {
24 kFlush,
25 kCompaction,
26 kRecovery,
27 kMisc,
28 };
29
30 enum class BlobFileCreationReason {
31 kFlush,
32 kCompaction,
33 kRecovery,
34 };
35
36 // The types of files RocksDB uses in a DB directory. (Available for
37 // advanced options.)
38 enum FileType {
39 kWalFile,
40 kDBLockFile,
41 kTableFile,
42 kDescriptorFile,
43 kCurrentFile,
44 kTempFile,
45 kInfoLogFile, // Either the current one, or an old one
46 kMetaDatabase,
47 kIdentityFile,
48 kOptionsFile,
49 kBlobFile
50 };
51
52 // User-oriented representation of internal key types.
53 // Ordering of this enum entries should not change.
54 enum EntryType {
55 kEntryPut,
56 kEntryDelete,
57 kEntrySingleDelete,
58 kEntryMerge,
59 kEntryRangeDeletion,
60 kEntryBlobIndex,
61 kEntryDeleteWithTimestamp,
62 kEntryWideColumnEntity,
63 kEntryOther,
64 };
65
66 } // namespace ROCKSDB_NAMESPACE