Add text indices to storage info
This commit is contained in:
parent
cdf7b53aa7
commit
d5d101e7dc
@ -303,7 +303,7 @@ class DbmsHandler {
|
||||
stats.triggers += info.triggers;
|
||||
stats.streams += info.streams;
|
||||
++stats.num_databases;
|
||||
stats.indices += storage_info.label_indices + storage_info.label_property_indices;
|
||||
stats.indices += storage_info.label_indices + storage_info.label_property_indices + storage_info.text_indices;
|
||||
stats.constraints += storage_info.existence_constraints + storage_info.unique_constraints;
|
||||
++stats.storage_modes[(int)storage_info.storage_mode];
|
||||
++stats.isolation_levels[(int)storage_info.isolation_level];
|
||||
@ -677,7 +677,7 @@ class DbmsHandler {
|
||||
storage::Config default_config_; //!< Storage configuration used when creating new databases
|
||||
DatabaseHandler db_handler_; //!< multi-tenancy storage handler
|
||||
std::unique_ptr<kvstore::KVStore> durability_; //!< list of active dbs (pointer so we can postpone its creation)
|
||||
coordination::CoordinatorState coordinator_state_; //!< Replication coordinator
|
||||
coordination::CoordinatorState coordinator_state_; //!< Replication coordinator
|
||||
#endif
|
||||
// TODO: Make an api
|
||||
public:
|
||||
|
@ -846,6 +846,7 @@ StorageInfo DiskStorage::GetInfo(bool force_dir,
|
||||
const auto &lbl = access->ListAllIndices();
|
||||
info.label_indices = lbl.label.size();
|
||||
info.label_property_indices = lbl.label_property.size();
|
||||
info.text_indices = lbl.text.size();
|
||||
const auto &con = access->ListAllConstraints();
|
||||
info.existence_constraints = con.existence.size();
|
||||
info.unique_constraints = con.unique.size();
|
||||
|
@ -176,9 +176,9 @@ InMemoryStorage::~InMemoryStorage() {
|
||||
committed_transactions_.WithLock([](auto &transactions) { transactions.clear(); });
|
||||
}
|
||||
|
||||
InMemoryStorage::InMemoryAccessor::InMemoryAccessor(auto tag, InMemoryStorage *storage, IsolationLevel isolation_level,
|
||||
StorageMode storage_mode,
|
||||
memgraph::replication_coordination_glue::ReplicationRole replication_role)
|
||||
InMemoryStorage::InMemoryAccessor::InMemoryAccessor(
|
||||
auto tag, InMemoryStorage *storage, IsolationLevel isolation_level, StorageMode storage_mode,
|
||||
memgraph::replication_coordination_glue::ReplicationRole replication_role)
|
||||
: Accessor(tag, storage, isolation_level, storage_mode, replication_role),
|
||||
config_(storage->config_.salient.items) {}
|
||||
InMemoryStorage::InMemoryAccessor::InMemoryAccessor(InMemoryAccessor &&other) noexcept
|
||||
@ -1693,6 +1693,7 @@ StorageInfo InMemoryStorage::GetInfo(bool force_directory,
|
||||
const auto &lbl = access->ListAllIndices();
|
||||
info.label_indices = lbl.label.size();
|
||||
info.label_property_indices = lbl.label_property.size();
|
||||
info.text_indices = lbl.text.size();
|
||||
const auto &con = access->ListAllConstraints();
|
||||
info.existence_constraints = con.existence.size();
|
||||
info.unique_constraints = con.unique.size();
|
||||
|
@ -77,6 +77,7 @@ struct StorageInfo {
|
||||
uint64_t disk_usage;
|
||||
uint64_t label_indices;
|
||||
uint64_t label_property_indices;
|
||||
uint64_t text_indices;
|
||||
uint64_t existence_constraints;
|
||||
uint64_t unique_constraints;
|
||||
StorageMode storage_mode;
|
||||
@ -94,6 +95,7 @@ static inline nlohmann::json ToJson(const StorageInfo &info) {
|
||||
res["disk"] = info.disk_usage;
|
||||
res["label_indices"] = info.label_indices;
|
||||
res["label_prop_indices"] = info.label_property_indices;
|
||||
res["text_indices"] = info.text_indices;
|
||||
res["existence_constraints"] = info.existence_constraints;
|
||||
res["unique_constraints"] = info.unique_constraints;
|
||||
res["storage_mode"] = storage::StorageModeToString(info.storage_mode);
|
||||
|
Loading…
Reference in New Issue
Block a user