diff options
| author | ermolovd <[email protected]> | 2026-04-28 10:36:20 +0300 |
|---|---|---|
| committer | ermolovd <[email protected]> | 2026-04-28 11:34:34 +0300 |
| commit | 693274b40b1a9ebdf2da02f2e87fbc8502105738 (patch) | |
| tree | 229c575c802e7ae1f9290502efce9b5879fbfea3 /yt/cpp/mapreduce/interface/common.cpp | |
| parent | 10edf8d9197e9c45458d73cb57a601e0827d159c (diff) | |
YT-27827: TPingerTransaction use BlockingGet instead of WaitFor in destructor
commit_hash:90bbe36635e0d48c81c153567dcedf28f103efbe
Diffstat (limited to 'yt/cpp/mapreduce/interface/common.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/interface/common.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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 <util/generic/xrange.h> +#include <util/datetime/base.h> + +#include <util/system/getpid.h> + namespace NYT { using ::google::protobuf::Descriptor; @@ -762,6 +766,21 @@ TString ToString(EValueType type) ythrow yexception() << "Invalid value type " << static_cast<int>(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 |
