From 97183fb9da2c6f374d79472ba4d44e5d52fd9dda Mon Sep 17 00:00:00 2001 From: Gareth Andrew Lloyd Date: Mon, 21 Aug 2023 12:16:02 +0100 Subject: [PATCH] Fix FLAGS_delta_chain_cache_threshold typo (#1181) --- src/storage/v2/inmemory/indices_utils.hpp | 2 +- src/storage/v2/vertex_accessor.cpp | 18 +++++++++--------- src/storage/v2/vertex_info_cache.cpp | 2 +- src/storage/v2/vertex_info_cache.hpp | 2 +- tests/e2e/configuration/default_config.py | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/storage/v2/inmemory/indices_utils.hpp b/src/storage/v2/inmemory/indices_utils.hpp index 5aadf34ec..9914e6ac5 100644 --- a/src/storage/v2/inmemory/indices_utils.hpp +++ b/src/storage/v2/inmemory/indices_utils.hpp @@ -202,7 +202,7 @@ inline bool CurrentVersionHasLabelProperty(const Vertex &vertex, LabelId label, // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction->manyDeltasCache; cache.StoreExists(view, &vertex, exists); cache.StoreDeleted(view, &vertex, deleted); diff --git a/src/storage/v2/vertex_accessor.cpp b/src/storage/v2/vertex_accessor.cpp index c5b249066..3d604b6eb 100644 --- a/src/storage/v2/vertex_accessor.cpp +++ b/src/storage/v2/vertex_accessor.cpp @@ -63,7 +63,7 @@ std::pair IsVisible(Vertex const *vertex, Transaction const *transac // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction->manyDeltasCache; cache.StoreExists(view, vertex, exists); cache.StoreDeleted(view, vertex, deleted); @@ -163,7 +163,7 @@ Result VertexAccessor::HasLabel(LabelId label, View view) const { // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -210,7 +210,7 @@ Result> VertexAccessor::Labels(View view) const { // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -340,7 +340,7 @@ Result VertexAccessor::GetProperty(PropertyId property, View view // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -388,7 +388,7 @@ Result> VertexAccessor::Properties(View view // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -465,7 +465,7 @@ Result> VertexAccessor::InEdges(View view, const std:: // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -539,7 +539,7 @@ Result> VertexAccessor::OutEdges(View view, const std: // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -587,7 +587,7 @@ Result VertexAccessor::InDegree(View view) const { // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); @@ -635,7 +635,7 @@ Result VertexAccessor::OutDegree(View view) const { // clang-format on }); - if (useCache && n_processed >= FLAGS_delta_chain_cache_threashold) { + if (useCache && n_processed >= FLAGS_delta_chain_cache_threshold) { auto &cache = transaction_->manyDeltasCache; cache.StoreExists(view, vertex_, exists); cache.StoreDeleted(view, vertex_, deleted); diff --git a/src/storage/v2/vertex_info_cache.cpp b/src/storage/v2/vertex_info_cache.cpp index 04f379383..c0fc2b11b 100644 --- a/src/storage/v2/vertex_info_cache.cpp +++ b/src/storage/v2/vertex_info_cache.cpp @@ -16,7 +16,7 @@ #include "utils/flag_validation.hpp" // NOLINTNEXTLINE (cppcoreguidelines-avoid-non-const-global-variables) -DEFINE_VALIDATED_uint64(delta_chain_cache_threashold, 128, +DEFINE_VALIDATED_uint64(delta_chain_cache_threshold, 128, "The threshold for when to cache long delta chains. This is used for heavy read + write " "workloads where repeated processing of delta chains can become costly.", { return value > 0; }); diff --git a/src/storage/v2/vertex_info_cache.hpp b/src/storage/v2/vertex_info_cache.hpp index ed19f474e..725e2f378 100644 --- a/src/storage/v2/vertex_info_cache.hpp +++ b/src/storage/v2/vertex_info_cache.hpp @@ -20,7 +20,7 @@ #include #include -DECLARE_uint64(delta_chain_cache_threashold); +DECLARE_uint64(delta_chain_cache_threshold); namespace memgraph::storage { diff --git a/tests/e2e/configuration/default_config.py b/tests/e2e/configuration/default_config.py index b3b73d14a..093bd0dca 100644 --- a/tests/e2e/configuration/default_config.py +++ b/tests/e2e/configuration/default_config.py @@ -202,7 +202,7 @@ startup_config_dict = { "", "The path to mappings that describes aliases to callables in cypher queries in the form of key-value pairs in a json file. With this option query module procedures that do not exist in memgraph can be mapped to ones that exist.", ), - "delta_chain_cache_threashold": ( + "delta_chain_cache_threshold": ( "128", "128", "The threshold for when to cache long delta chains. This is used for heavy read + write workloads where repeated processing of delta chains can become costly.",