From 693274b40b1a9ebdf2da02f2e87fbc8502105738 Mon Sep 17 00:00:00 2001 From: ermolovd Date: Tue, 28 Apr 2026 10:36:20 +0300 Subject: YT-27827: TPingerTransaction use BlockingGet instead of WaitFor in destructor commit_hash:90bbe36635e0d48c81c153567dcedf28f103efbe --- yt/cpp/mapreduce/interface/common.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'yt/cpp/mapreduce/interface/common.cpp') diff --git a/yt/cpp/mapreduce/interface/common.cpp b/yt/cpp/mapreduce/interface/common.cpp index fdb3e66b191..7c54fd65d09 100644 --- a/yt/cpp/mapreduce/interface/common.cpp +++ b/yt/cpp/mapreduce/interface/common.cpp @@ -13,6 +13,10 @@ #include +#include + +#include + namespace NYT { using ::google::protobuf::Descriptor; @@ -762,6 +766,21 @@ TString ToString(EValueType type) ythrow yexception() << "Invalid value type " << static_cast(type); } +TMutationId GenerateMutationId() +{ + TGUID guid; + + // Some users use `fork()' with yt wrapper + // (actually they use python + multiprocessing) + // and CreateGuid is not resistant to `fork()', so spice it a little bit. + // + // Check IGNIETFERRO-610 + CreateGuid(&guid); + guid.dw[2] = GetPID() ^ MicroSeconds(); + + return guid; +} + //////////////////////////////////////////////////////////////////////////////// } // namespace NDetail -- cgit v1.3