aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-12-18 17:25:55 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-12-18 17:38:07 +0300
commitda0030f3cb73ddbbfc27f8dc404ba382b32bd60d (patch)
treedaaecef414b0fdbd0f5c1b4dfdbfcb8a63761d7a
parentaf6ca3f406d2c0f9ed882c612548df29df8e2502 (diff)
downloadydb-da0030f3cb73ddbbfc27f8dc404ba382b32bd60d.tar.gz
Intermediate changes
commit_hash:89bb530887e010d71ffb7cc8b494bfc19cb05fb6
-rw-r--r--contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch19
-rw-r--r--yt/yt/core/test_framework/framework.cpp11
-rw-r--r--yt/yt/core/test_framework/framework.h7
3 files changed, 32 insertions, 5 deletions
diff --git a/contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch b/contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch
index dd20656ee7..ed8e1558ef 100644
--- a/contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch
+++ b/contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch
@@ -1,3 +1,22 @@
+From 3f9daeb25fd471e85d584a2743f83a1abfe5fb3d Mon Sep 17 00:00:00 2001
+From: emkornfield <emkornfield@gmail.com>
+Date: Wed, 2 Feb 2022 12:26:12 +0100
+Subject: [PATCH] ARROW-15511: [Python][C++] Remove reference management in
+ numpy indexer
+
+It appears all usages don't escape the scope of methods so a strong reference should already be in place.
+This is necessary because Ndarray1DIndexer can be used without the GIL held.
+
+Closes #12314 from emkornfield/ARROW-15511
+
+Authored-by: emkornfield <emkornfield@gmail.com>
+Signed-off-by: Antoine Pitrou <antoine@python.org>
+---
+ cpp/src/arrow/python/numpy_internal.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/cpp/src/arrow/python/numpy_internal.h b/cpp/src/arrow/python/numpy_internal.h
+index 973f577cb1320..50d1a0fcb75d4 100644
--- a/cpp/src/arrow/python/numpy_internal.h
+++ b/cpp/src/arrow/python/numpy_internal.h
@@ -43,12 +43,11 @@ class Ndarray1DIndexer {
diff --git a/yt/yt/core/test_framework/framework.cpp b/yt/yt/core/test_framework/framework.cpp
index 4c1c4ea563..15df3840cb 100644
--- a/yt/yt/core/test_framework/framework.cpp
+++ b/yt/yt/core/test_framework/framework.cpp
@@ -59,30 +59,35 @@ void WaitForPredicate(
}
}
}
- THROW_ERROR_EXCEPTION("Wait failed: %s", options.Message);
+ THROW_ERROR_EXCEPTION("Wait failed: %s", options.Message)
+ << TErrorAttribute("location", NYT::ToString(options.SourceLocation));
}
void WaitForPredicate(
std::function<bool()> predicate,
- const TString& message)
+ const TString& message,
+ TSourceLocation location)
{
WaitForPredicate(
std::move(predicate),
TWaitForPredicateOptions{
.Message = message,
+ .SourceLocation = location,
});
}
void WaitForPredicate(
std::function<bool()> predicate,
int iterationCount,
- TDuration period)
+ TDuration period,
+ TSourceLocation location)
{
WaitForPredicate(
std::move(predicate),
TWaitForPredicateOptions{
.IterationCount = iterationCount,
.Period = period,
+ .SourceLocation = location,
});
}
diff --git a/yt/yt/core/test_framework/framework.h b/yt/yt/core/test_framework/framework.h
index 30f11c1efa..9a01a6deae 100644
--- a/yt/yt/core/test_framework/framework.h
+++ b/yt/yt/core/test_framework/framework.h
@@ -52,6 +52,7 @@ struct TWaitForPredicateOptions
TDuration Period = TDuration::MilliSeconds(100);
bool IgnoreExceptions = false;
TString Message = "<no-message>";
+ TSourceLocation SourceLocation = YT_CURRENT_SOURCE_LOCATION;
};
void WaitForPredicate(
@@ -60,12 +61,14 @@ void WaitForPredicate(
void WaitForPredicate(
std::function<bool()> predicate,
- const TString& message);
+ const TString& message,
+ TSourceLocation = YT_CURRENT_SOURCE_LOCATION);
void WaitForPredicate(
std::function<bool()> predicate,
int iterationCount = 300,
- TDuration period = TDuration::MilliSeconds(100));
+ TDuration period = TDuration::MilliSeconds(100),
+ TSourceLocation = YT_CURRENT_SOURCE_LOCATION);
////////////////////////////////////////////////////////////////////////////////