summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-05-12 15:06:44 +0300
committerrobot-piglet <[email protected]>2025-05-12 15:18:16 +0300
commitffd84d616eae3a7208a7fb5db7aac50a18428c6a (patch)
treeca612e9b924625b3df90a8116f7c5c53cace65e4
parent093ac05b488b3aaf5ef5ea648e6fe76611bee8af (diff)
Intermediate changes
commit_hash:5fe1ef25f8ddc098a82ee48c8f39ac413905f659
-rw-r--r--yql/essentials/sql/v1/complete/name/object/simple/schema.cpp8
-rw-r--r--yql/essentials/sql/v1/complete/name/object/simple/static/schema.cpp4
-rw-r--r--yt/yt/core/misc/async_slru_cache-inl.h1
-rw-r--r--yt/yt/core/misc/unittests/async_slru_cache_ut.cpp2
4 files changed, 7 insertions, 8 deletions
diff --git a/yql/essentials/sql/v1/complete/name/object/simple/schema.cpp b/yql/essentials/sql/v1/complete/name/object/simple/schema.cpp
index c7b62946f64..390a64174f9 100644
--- a/yql/essentials/sql/v1/complete/name/object/simple/schema.cpp
+++ b/yql/essentials/sql/v1/complete/name/object/simple/schema.cpp
@@ -54,13 +54,7 @@ namespace NSQLComplete {
NThreading::TFuture<TListResponse> List(const TListRequest& request) const override {
auto [path, name] = Simple_->Split(request.Path);
-
- TString pathStr(path);
- if (!pathStr.StartsWith('/')) {
- pathStr.prepend('/');
- }
-
- return Simple_->List(std::move(pathStr))
+ return Simple_->List(TString(path))
.Apply(FilterByName(TString(name)))
.Apply(FilterByTypes(std::move(request.Filter.Types)))
.Apply(Crop(request.Limit))
diff --git a/yql/essentials/sql/v1/complete/name/object/simple/static/schema.cpp b/yql/essentials/sql/v1/complete/name/object/simple/static/schema.cpp
index 0af3ff0ef96..99d946a0d26 100644
--- a/yql/essentials/sql/v1/complete/name/object/simple/static/schema.cpp
+++ b/yql/essentials/sql/v1/complete/name/object/simple/static/schema.cpp
@@ -27,6 +27,10 @@ namespace NSQLComplete {
}
NThreading::TFuture<TVector<TFolderEntry>> List(TString folder) const override {
+ if (!folder.StartsWith('/')) {
+ folder.prepend('/');
+ }
+
TVector<TFolderEntry> entries;
if (const auto* data = Data_.FindPtr(folder)) {
entries = *data;
diff --git a/yt/yt/core/misc/async_slru_cache-inl.h b/yt/yt/core/misc/async_slru_cache-inl.h
index 49247cae60d..0a5b6a32563 100644
--- a/yt/yt/core/misc/async_slru_cache-inl.h
+++ b/yt/yt/core/misc/async_slru_cache-inl.h
@@ -773,6 +773,7 @@ void TAsyncSlruCacheBase<TKey, TValue, THash>::EndInsert(const TInsertCookie& in
{
YT_VERIFY(value);
const auto& key = value->GetKey();
+ YT_ASSERT(insertCookie.GetKey() == key);
auto* shard = GetShardByKey(key);
diff --git a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
index 15a7924030e..5ebb8c0da4c 100644
--- a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
+++ b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp
@@ -529,7 +529,7 @@ TEST(TAsyncSlruCacheTest, AddRemoveStressTest)
cookies.emplace_back(std::move(cookie));
}
- for (int i = 0; i < valueCount; ++i) {
+ for (int i = valueCount - 1; i >= 0; --i) {
cookies.back().EndInsert(values[i]);
cookies.pop_back();
}