d6aa8c49f8
Summary: 1. Extend FlushJobInfo and CompactionJobInfo with information about the blob files generated by flush/compaction jobs. This PR add two structures BlobFileInfo and BlobFileGarbageInfo that contains the required information of blob files. 2. Notify the creation and deletion of blob files through OnBlobFileCreationStarted, OnBlobFileCreated, and OnBlobFileDeleted. 3. Test OnFile*Finish operations notifications with Blob Files. 4. Log the blob file creation/deletion events through EventLogger in Log file. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8675 Test Plan: Add new unit tests in listener_test Reviewed By: ltamasi Differential Revision: D30412613 Pulled By: akankshamahajan15 fbshipit-source-id: ca51b63c6e8c8d0485a38c503572bc5a82bd5d07
65 lines
1.4 KiB
C++
65 lines
1.4 KiB
C++
// 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,
|
|
kEntryOther,
|
|
};
|
|
|
|
} // namespace ROCKSDB_NAMESPACE
|