Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate CustomFieldTags for the unity build #6513

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions db/blob_file_addition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@

namespace ROCKSDB_NAMESPACE {

namespace {

// Tags for custom fields. Note that these get persisted in the manifest,
// so existing tags should not be modified.
enum CustomFieldTags : uint32_t {
enum BlobFileAddition::CustomFieldTags : uint32_t {
kEndMarker,

// Add forward compatible fields here
Expand All @@ -32,8 +30,6 @@ enum CustomFieldTags : uint32_t {
// Add forward incompatible fields here
};

} // anonymous namespace

void BlobFileAddition::EncodeTo(std::string* output) const {
PutVarint64(output, blob_file_number_);
PutVarint64(output, total_blob_count_);
Expand Down
2 changes: 2 additions & 0 deletions db/blob_file_addition.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class BlobFileAddition {
std::string DebugJSON() const;

private:
enum CustomFieldTags : uint32_t;

uint64_t blob_file_number_ = kInvalidBlobFileNumber;
uint64_t total_blob_count_ = 0;
uint64_t total_blob_bytes_ = 0;
Expand Down
6 changes: 1 addition & 5 deletions db/blob_file_garbage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@

namespace ROCKSDB_NAMESPACE {

namespace {

// Tags for custom fields. Note that these get persisted in the manifest,
// so existing tags should not be modified.
enum CustomFieldTags : uint32_t {
enum BlobFileGarbage::CustomFieldTags : uint32_t {
kEndMarker,

// Add forward compatible fields here
Expand All @@ -32,8 +30,6 @@ enum CustomFieldTags : uint32_t {
// Add forward incompatible fields here
};

} // anonymous namespace

void BlobFileGarbage::EncodeTo(std::string* output) const {
PutVarint64(output, blob_file_number_);
PutVarint64(output, garbage_blob_count_);
Expand Down
2 changes: 2 additions & 0 deletions db/blob_file_garbage.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class BlobFileGarbage {
std::string DebugJSON() const;

private:
enum CustomFieldTags : uint32_t;

uint64_t blob_file_number_ = kInvalidBlobFileNumber;
uint64_t garbage_blob_count_ = 0;
uint64_t garbage_blob_bytes_ = 0;
Expand Down