<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/yt/misc/ya.make, branch CLI_2.32.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.32.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.32.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2026-06-06T21:16:49Z</updated>
<entry>
<title>Cache process/thread id getters and use them in TError origin capture</title>
<updated>2026-06-06T21:16:49Z</updated>
<author>
<name>babenko</name>
<email>babenko@yandex-team.com</email>
</author>
<published>2026-06-06T20:52:00Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f10c7206fb31af8057446bceef9707aabaa9456e'/>
<id>urn:sha1:f10c7206fb31af8057446bceef9707aabaa9456e</id>
<content type='text'>
## Motivation
Profiling the YT master Automaton thread showed TOriginAttributes::Capture (run on every non-OK TError) spending ~60% of its time in a getpid() syscall — uncached on glibc &gt;= 2.25. NYT::GetCurrentThreadId() (gettid) feeds hot thread-affinity / log-manager checks on the same thread.

## Changes
- New library/cpp/yt/system/process_id.* with cached GetProcessId(); GetSystemThreadId() now caches the kernel tid in TLS. Both caches reset in the child after fork.
- Moved thread_name.{h,cpp} from misc to system.
- Removed GetCurrentProcessId/GetCurrentThreadId shims from yt/yt/core/misc/proc.{h,cpp}; migrated all callers to NYT::GetProcessId / NYT::GetSystemThreadId.
- TOriginAttributes::Capture uses the cached getters; recorded Tid is now the real kernel tid (matches perf/ps).
- Added microbenchmarks (library/cpp/yt/system/benchmarks, yt/yt/core/benchmarks/error.cpp).

## Microbenchmarks (release)
| | before | after |
|---|---|---|
| getpid | 101 ns | 0.33 ns |
| gettid | 102 ns | 1.64 ns |
| Capture | 161 ns | 50 ns |
| failed TError | 221 ns | 74 ns |
commit_hash:ee37ae57d61a5a2dd33daee935270f4bb93b7ff9
</content>
</entry>
<entry>
<title>remove cpp/yt/misc no longer depends on cpp/yt/string</title>
<updated>2024-09-18T08:22:03Z</updated>
<author>
<name>arkady-e1ppa</name>
<email>arkady-e1ppa@yandex-team.com</email>
</author>
<published>2024-09-18T08:07:37Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f4885374131a18b9906b7400d1d3e9485ae1f0aa'/>
<id>urn:sha1:f4885374131a18b9906b7400d1d3e9485ae1f0aa</id>
<content type='text'>
commit_hash:429a843ed1a0e0fe3a5bc7d237f586b6671b8997
</content>
</entry>
<entry>
<title>[library/cpp/yt] fix peerdir</title>
<updated>2024-01-30T12:42:35Z</updated>
<author>
<name>tldr</name>
<email>tldr@yandex-team.com</email>
</author>
<published>2024-01-30T12:18:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=9f73e972687d13df63dc168cf12d88ca8e1591ff'/>
<id>urn:sha1:9f73e972687d13df63dc168cf12d88ca8e1591ff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add ymake export to ydb</title>
<updated>2023-06-13T08:05:01Z</updated>
<author>
<name>alexv-smirnov</name>
<email>alex@ydb.tech</email>
</author>
<published>2023-06-13T08:05:01Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0'/>
<id>urn:sha1:bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert ymake build from ydb oss export</title>
<updated>2023-03-28T19:25:04Z</updated>
<author>
<name>alexv-smirnov</name>
<email>alex@ydb.tech</email>
</author>
<published>2023-03-28T19:25:04Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=b8a17f9b1c166d2e9a26b99348a4c29d972caf55'/>
<id>urn:sha1:b8a17f9b1c166d2e9a26b99348a4c29d972caf55</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add library/cpp/actors, ymake build to ydb oss export</title>
<updated>2023-03-15T16:59:12Z</updated>
<author>
<name>alexv-smirnov</name>
<email>alex@ydb.tech</email>
</author>
<published>2023-03-15T16:59:12Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11'/>
<id>urn:sha1:056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>intermediate changes</title>
<updated>2022-03-15T10:35:56Z</updated>
<author>
<name>arcadia-devtools</name>
<email>arcadia-devtools@yandex-team.ru</email>
</author>
<published>2022-03-15T10:35:56Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=094638589de6a6c9f91fad0005843fc1c1adc957'/>
<id>urn:sha1:094638589de6a6c9f91fad0005843fc1c1adc957</id>
<content type='text'>
ref:ca7a95e8c9a9d780f96497136a152091d54e61b5
</content>
</entry>
<entry>
<title>intermediate changes</title>
<updated>2022-02-25T08:28:36Z</updated>
<author>
<name>arcadia-devtools</name>
<email>arcadia-devtools@yandex-team.ru</email>
</author>
<published>2022-02-25T08:28:36Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=840813e444ead1827cba829e6ec0fb9739e03c4a'/>
<id>urn:sha1:840813e444ead1827cba829e6ec0fb9739e03c4a</id>
<content type='text'>
ref:e3f00ef4e6dea6578b7e9ead4e6c020e1e259495
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;babenko@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:49:19Z</updated>
<author>
<name>babenko</name>
<email>babenko@yandex-team.ru</email>
</author>
<published>2022-02-10T13:49:19Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f31097c96270919a1f49360bdaaa69ea4f3fefab'/>
<id>urn:sha1:f31097c96270919a1f49360bdaaa69ea4f3fefab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;babenko@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:49:19Z</updated>
<author>
<name>babenko</name>
<email>babenko@yandex-team.ru</email>
</author>
<published>2022-02-10T13:49:19Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=cec37806d8847aa3db53bafc9e251d4aaf325c12'/>
<id>urn:sha1:cec37806d8847aa3db53bafc9e251d4aaf325c12</id>
<content type='text'>
</content>
</entry>
</feed>
