|
|
@ -11,6 +11,7 @@ |
|
|
|
#include <inttypes.h> |
|
|
|
#include <inttypes.h> |
|
|
|
#include <vector> |
|
|
|
#include <vector> |
|
|
|
#include "db/column_family.h" |
|
|
|
#include "db/column_family.h" |
|
|
|
|
|
|
|
#include "db/db_impl.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace rocksdb { |
|
|
|
namespace rocksdb { |
|
|
|
|
|
|
|
|
|
|
@ -133,6 +134,8 @@ DBPropertyType GetPropertyType(const Slice& property, bool* is_int_property, |
|
|
|
} else if (in == "estimate-table-readers-mem") { |
|
|
|
} else if (in == "estimate-table-readers-mem") { |
|
|
|
*need_out_of_mutex = true; |
|
|
|
*need_out_of_mutex = true; |
|
|
|
return kEstimatedUsageByTableReaders; |
|
|
|
return kEstimatedUsageByTableReaders; |
|
|
|
|
|
|
|
} else if (in == "is-file-deletions-enabled") { |
|
|
|
|
|
|
|
return kIsFileDeletionEnabled; |
|
|
|
} |
|
|
|
} |
|
|
|
return kUnknown; |
|
|
|
return kUnknown; |
|
|
|
} |
|
|
|
} |
|
|
@ -215,7 +218,7 @@ bool InternalStats::GetStringProperty(DBPropertyType property_type, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool InternalStats::GetIntProperty(DBPropertyType property_type, |
|
|
|
bool InternalStats::GetIntProperty(DBPropertyType property_type, |
|
|
|
uint64_t* value) const { |
|
|
|
uint64_t* value, DBImpl* db) const { |
|
|
|
Version* current = cfd_->current(); |
|
|
|
Version* current = cfd_->current(); |
|
|
|
|
|
|
|
|
|
|
|
switch (property_type) { |
|
|
|
switch (property_type) { |
|
|
@ -254,6 +257,9 @@ bool InternalStats::GetIntProperty(DBPropertyType property_type, |
|
|
|
cfd_->imm()->current()->GetTotalNumEntries() + |
|
|
|
cfd_->imm()->current()->GetTotalNumEntries() + |
|
|
|
current->GetEstimatedActiveKeys(); |
|
|
|
current->GetEstimatedActiveKeys(); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
case kIsFileDeletionEnabled: |
|
|
|
|
|
|
|
*value = db->IsFileDeletionsEnabled(); |
|
|
|
|
|
|
|
return true; |
|
|
|
default: |
|
|
|
default: |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|