summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/threading/unittests
Commit message (Collapse)AuthorAgeFilesLines
* YT_DECLARE_SPIN_LOCK whack-a-mole 2: electric boogaloo, Theatrical Cutdann2392026-04-293-12/+12
| | | | commit_hash:946123c814d23e070516ef5f7d339cf6025547b6
* Intermediate changesrobot-piglet2025-09-301-1/+1
| | | | commit_hash:d932ec0ffc0aaea61db064d99b47b64653cd406e
* Track RWSpinLock acquires per thread to ensure no reentrant usages are presentpavook2025-09-302-5/+54
| | | | commit_hash:daa3d76bfd4283d7cda9ffd741c8ed10457a5c84
* YT-26288: Revert fork lock to writer starving spinlockpavook2025-09-261-0/+3
| | | | | `TForkAwareSpinLock` implementation takes `ForkLock_` reader, which can (and does) violate the non-reentrancy. commit_hash:6eb1092777ac21dd8303b938f855d0cd61276641
* YT-18571: Refactor traced (fomerly tracked) spin locks and add unittestsbabenko2025-08-182-0/+69
| | | | commit_hash:2476930524e6179b49fbf312f907bd03413cd8b8
* Intermediate changesrobot-piglet2025-08-175-24/+10
| | | | commit_hash:ca1f7319b759adc9a144adc5d01ae005c364e806
* YT-24537: Prioritize writers in TReaderWriterSpinLock, rename old version to ↵pavook2025-04-173-0/+221
| | | | | | | | | | | | | | | | | | | | | TWriterStarvingRWLock Previously, it was possible that `TReaderWriterSpinLock` wouldn't let the writer through if there's a steady flow of readers. This change addresses that by: 1. Prioritizing writers inside the spinlock by adding an additional `WriterReady` flag that writers set on arrival. This flag doesn't allow any readers to come through. 2. Adding the proper tests to verify this functionality, as well as spinlock's behaviour under forks. 3. Clarifying the documentation about spinlock guarantees 4. Adding a TLA+ model, formally specifying and verifying the guarantees of the new spinlock. 5. Renaming the old lock to `TWriterStarvingRWSpinLock`, and replacing all usages inside YT with the new version (renaming all usages outside of YT to the WriterStarving version). This is a second attempt of REVIEW: 8233768, the first one was rolled back as it lead to deadlocks in user code with reentrant reader locks: the case of `AcquireReader(thread0) -> AcquireWriter(thread1) -> AcquireReader(thread0)` is a deadlock, as `thread0` will not be able to acquire the lock (for the second time) before `thread1` frees writer lock, and `thread1` will not be able to acquire writer lock before the reader lock will be released by `thread0`, which won't happen until `thread0` acquires the lock for the second time. See/for more context and a real example of such situation. Analogous problem can happen with fibers: this is why you shouldn't allow context switches under the lock. Wondering why this ugly name `WriterStarvingRWSpinLock` appeared in your beautiful code? No worries, if you are **sure** that you don't use reentrant locks or fiber switches under the lock, you can freely replace your usage with the new `ReaderWriterSpinLock`. The replacement is drop-in. [nodiff:caesar] commit_hash:97683f854defca00cc283f5a2a10a1730b3c9174
* Revert commit rXXXXXX, YT-24537: Prioritize writers in TReaderWriterSpinLockpavook2025-04-153-221/+0
| | | | | It turns out, RWSpinLock previously accidentally supported recursive AcquireReaders, and this property was broken with the change. commit_hash:f996e7b52ef8b3d37118034530a094af0efbe435
* YT-24537: Prioritize writers in TReaderWriterSpinLockpavook2025-04-103-0/+221
| | | | commit_hash:94fee5363799655628bd7e2c144a7869a9d89002
* YT-19210: expose YQL shared library for YT.max422023-07-294-0/+231
| | | | After this, a new target libyqlplugin.so appears. in open-source cmake build. Diff in open-source YDB repo looks like the following: https://paste.yandex-team.ru/f302bdb4-7ef2-4362-91c7-6ca45f329264
* revert rXXXXXX (see discusstion in pr), will commit again more pci-dss ↵kulikov2023-07-274-231/+0
| | | | friendly way
* try to get rid of locks and allocations for elastic queue thread poolkulikov2023-07-214-0/+231
| | | | | | | | | In case of heavy load and high rps current thread pool implementation seems to have problems at least with contention on lock inside condvar (long futex wait calls from http server listener thread), so try to implement something more efficient: - replace condvar with TEventCounter implementation without internal lock (pthread condvar maintains waiters wakeup order, thread pool doesn't need it); - introduce well-known bounded mpmc queue over ring buffer; - get rid of TDecrementingWrapper; - add options to turn on new pool in library/cpp/http/server and search/daemons (will remove after adoption); - make elastic queue ut check both versions; - workaround problems with android/arm build targets.
* Revert "YT-19324: move YT provider to ydb/library/yql"max422023-06-304-231/+0
| | | | This reverts commit ca272f12fdd0e8d5c3e957fc87939148f1caaf72, reversing changes made to 49f8acfc8b0b5c0071b804423bcf53fda26c7c12.
* YT-19324: move YT provider to ydb/library/yqlmax422023-06-304-0/+231
| | | | | | | | | | | | | | This commit is formed by the following script: https://paste.yandex-team.ru/6f92e4b8-efc5-4d34-948b-15ee2accd7e7/text. This commit has zero effect on all projects that depend on YQL. The summary of changes: - `yql/providers/yt -> ydb/library/yql/providers/yt `- the whole implementation of YT provider is moved into YDB code base for further export as a part of YT YQL plugin shared library; - `yql/providers/stat/{expr_nodes,uploader} -> ydb/library/yql/providers/stat/{expr_nodes,uploader}` - a small interface without implementation and the description of stat expr nodes; - `yql/core/extract_predicate/ut -> ydb/library/yql/core/extract_predicate/ut`; - `yql/core/{ut,ut_common} -> ydb/library/yql/core/{ut,ut_common}`; - `yql/core` is gone; - `yql/library/url_preprocessing -> ydb/library/yql/core/url_preprocessing`. **NB**: all new targets inside `ydb/` are under `IF (NOT CMAKE_EXPORT)` clause which disables them from open-source cmake generation and ya make build. They will be enabled in the subsequent commits.
* remove kikimr/driver DEPENDSqrort2022-12-022-136/+0
|
* validate canons without yatest_commonqrort2022-11-302-0/+136