From f4562d19a188b22c764d3e86589786ae0d73d9a8 Mon Sep 17 00:00:00 2001 From: kssenii Date: Sat, 12 Aug 2023 15:00:32 +0400 Subject: [PATCH] Fix --- src/Interpreters/Cache/Metadata.cpp | 4 ++-- src/Interpreters/Cache/Metadata.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/Cache/Metadata.cpp b/src/Interpreters/Cache/Metadata.cpp index 4d7daeef76b..0dd5a7c4b1b 100644 --- a/src/Interpreters/Cache/Metadata.cpp +++ b/src/Interpreters/Cache/Metadata.cpp @@ -283,7 +283,7 @@ void CacheMetadata::removeKey(const Key & key, bool if_exists, bool if_releasabl if (if_exists) return; else - throw Exception(ErrorCodes::LOGICAL_ERROR, "No such key: {}", key); + throw Exception(ErrorCodes::BAD_ARGUMENTS, "No such key: {}", key); } auto locked_key = it->second->lockNoStateCheck(); @@ -293,7 +293,7 @@ void CacheMetadata::removeKey(const Key & key, bool if_exists, bool if_releasabl if (if_exists) return; else - throw Exception(ErrorCodes::LOGICAL_ERROR, "No such key: {} (state: {})", key, magic_enum::enum_name(state)); + throw Exception(ErrorCodes::BAD_ARGUMENTS, "No such key: {} (state: {})", key, magic_enum::enum_name(state)); } bool removed_all = locked_key->removeAllFileSegments(if_releasable); diff --git a/src/Interpreters/Cache/Metadata.h b/src/Interpreters/Cache/Metadata.h index 9b2f2617f52..e6d360c3027 100644 --- a/src/Interpreters/Cache/Metadata.h +++ b/src/Interpreters/Cache/Metadata.h @@ -121,8 +121,8 @@ public: KeyNotFoundPolicy key_not_found_policy, bool is_initial_load = false); - void removeKey(const Key & key, bool if_exists, bool is_releasable); - void removeAllKeys(bool is_releasable); + void removeKey(const Key & key, bool if_exists, bool if_releasable); + void removeAllKeys(bool if_releasable); void cancelCleanup();