<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/threading, branch CLI_2.28.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.28.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.28.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2025-12-18T03:25:18Z</updated>
<entry>
<title>Intermediate changes</title>
<updated>2025-12-18T03:25:18Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2025-12-18T03:04:47Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=755bf3aa4c57d54436af9691fdbbf0a6b9cb6dc6'/>
<id>urn:sha1:755bf3aa4c57d54436af9691fdbbf0a6b9cb6dc6</id>
<content type='text'>
commit_hash:c4281bc281cdaef6bf0188500e82848c582cc5ad
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2025-12-17T17:49:43Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2025-12-17T17:38:49Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=86bd733ab3b7b99852186e3f8a58f6ab71799b27'/>
<id>urn:sha1:86bd733ab3b7b99852186e3f8a58f6ab71799b27</id>
<content type='text'>
commit_hash:b8e5120d089fefb3429f136699614ed9ea813c21
</content>
</entry>
<entry>
<title>Use generic thread-local value for kernel/groupattrs, crash context and eventlog scope</title>
<updated>2025-11-27T21:47:44Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-27T21:32:45Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=909e306757b2da405daed2e0838e11b65e033c1a'/>
<id>urn:sha1:909e306757b2da405daed2e0838e11b65e033c1a</id>
<content type='text'>
- fix StdThreadLocalImpl -- make static state refcounted, there is no guarantee that static fields will outlive threads or TThreadLocalValues;
- replace thread local values to generic local storage value in some places;
- call runtime Init and replace local values factory;
- don't disable NCurrentThreadEventlog for ytxx runtime, it should now work;
- ensure generic local storage values are allocated after runtime init;
- use function-scope static variables to prevent issues with order of construction and destruction;
- basesearch now almost works with coroutines (with NProfile disabled).
commit_hash:7fde81591b0dbc3a53b8d1cb11bb96930a2e9a80
</content>
</entry>
<entry>
<title>Switch generic tls to thread_local-based impl</title>
<updated>2025-11-25T23:53:30Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-25T23:23:33Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=61867eee332aed34a56b71e57a40a6c52e712d36'/>
<id>urn:sha1:61867eee332aed34a56b71e57a40a6c52e712d36</id>
<content type='text'>
After this, it becomes possible to zerodiff replace thread\_local variables with generic local values. Replace default TThreadLocal with generic will lead to it's destruction on thread exit, but it seems to be more correct behavior (e.g., avoid leaks on thread pool restart).
commit_hash:6e5a0908ca239c1bac3ce6ba47de9e53290d6211
</content>
</entry>
<entry>
<title>TThreadLocalValue over standard thread_locals</title>
<updated>2025-11-24T22:25:22Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-24T22:07:59Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f688bd5f5a6b127269d329a997ff5945cbcd5d87'/>
<id>urn:sha1:f688bd5f5a6b127269d329a997ff5945cbcd5d87</id>
<content type='text'>
Current TThreadLocal implementation doesn't destroy objects on thread exit (so we can't replace thread\_local tls value with it, and with TGenericLocalValue too), standard thread\_local values can't be class members. So try to reimplement TThreadLocalValue:

- instead of adressing by thread id, address objects by uniq object id in thread\_local deque of all objects of current type;
- use hashmap of all existing perthread deques to destroy objects with their TThreadLocal;
- try to make object ids flat;
- no complex lookup inside and no contention between tls.Get calls;
- ShortLivedThreads ut now works;
- some fixes in Trace ut, make threads outlive tls value;
- benchmark results &lt;https://nda.ya.ru/t/agWa9PW67NYAAK&gt;, looks better than all others;
- probably should switch to this implementation by default and remove old.
commit_hash:262ce4d363751f577373a452a0c2c84d1fe5b79c
</content>
</entry>
<entry>
<title>Generic thread (yt fiber, etc) local storage</title>
<updated>2025-11-18T13:08:27Z</updated>
<author>
<name>kulikov</name>
<email>kulikov@yandex-team.com</email>
</author>
<published>2025-11-18T12:48:30Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=7b6a73defecf54640a9de7e0d9da969b2273295d'/>
<id>urn:sha1:7b6a73defecf54640a9de7e0d9da969b2273295d</id>
<content type='text'>
commit_hash:cc357d273b7ce5c911d194dd51fae5668877693c
</content>
</entry>
<entry>
<title>Better comment</title>
<updated>2025-11-07T00:13:12Z</updated>
<author>
<name>thegeorg</name>
<email>thegeorg@yandex-team.com</email>
</author>
<published>2025-11-06T23:30:58Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f7a975a3f1f50fdd5364aebf9f8cfb3e13b751b5'/>
<id>urn:sha1:f7a975a3f1f50fdd5364aebf9f8cfb3e13b751b5</id>
<content type='text'>
commit_hash:27b70d710c76793e58a4ed81dcd053907e389d85
</content>
</entry>
<entry>
<title>Try to prevent slicing in `co_return ex;`</title>
<updated>2025-11-06T14:43:28Z</updated>
<author>
<name>thegeorg</name>
<email>thegeorg@yandex-team.com</email>
</author>
<published>2025-11-06T14:13:27Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=b64824d81555d01eeb83574daaaef7bb670461f4'/>
<id>urn:sha1:b64824d81555d01eeb83574daaaef7bb670461f4</id>
<content type='text'>
commit_hash:348f2fb14a4a93cfa3c8504419d021c1f41e4b8f
</content>
</entry>
<entry>
<title>ysize -&gt; size.</title>
<updated>2025-10-11T10:48:11Z</updated>
<author>
<name>akhropov</name>
<email>akhropov@yandex-team.com</email>
</author>
<published>2025-10-11T10:30:28Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=31c19b13025472f6ce0023b390930e292a670181'/>
<id>urn:sha1:31c19b13025472f6ce0023b390930e292a670181</id>
<content type='text'>
commit_hash:5be5816fa0d06087b51636b3acfaf53350e750da
</content>
</entry>
<entry>
<title>Fix a potential memory leak</title>
<updated>2025-10-11T00:59:39Z</updated>
<author>
<name>akhropov</name>
<email>akhropov@yandex-team.com</email>
</author>
<published>2025-10-11T00:42:55Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8540915fec03da7728762e86b134048a4201e4c6'/>
<id>urn:sha1:8540915fec03da7728762e86b134048a4201e4c6</id>
<content type='text'>
commit_hash:17b4088b80f1a7446525ed8eebf0566b3e3a7888
</content>
</entry>
</feed>
