summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc
Commit message (Collapse)AuthorAgeFilesLines
* YT-19137: Make full_read a first class citizencoteeq2025-08-183-1/+37
| | | | commit_hash:dac730c0d9dc052edce7dd7873c51687ea19082e
* YT-18571: Cosmetics for YT_DEFINE_STRONG_TYPEDEFh0pless2025-08-111-0/+1
| | | | commit_hash:48c6dc49d8c0ffb3bbb5fa773dc38bdee243f3c3
* Add Save/Load methods for TStrongTypedefyurial2025-06-132-0/+19
| | | | commit_hash:7bda0c36d13d3a9c586f65b48d6f23f854c0e088
* yt: Use well-known macros to test if we are building with SSE4.2thegeorg2025-05-161-5/+0
| | | | | | | | | | | ``` (dflt) thegeorg@jakku:~/arcadia@trunk$ ya tool c++ -E -dM - -msse4.2 < /dev/null | grep SSE4 #define __SSE4_1__ 1 #define __SSE4_2__ 1 ``` On Windows, this macros is defined by the means of ymake.core.conf. commit_hash:ec670bbe09b73580df6c7acf4760fedce7597676
* Make some methods of smart enum being constexprhiddenpath2025-03-252-13/+14
| | | | commit_hash:c29f08fc16d8bd974d4ce516af499de848607ab8
* YT: Allow serializing and deserializing plain enums to uint64dgolear2025-03-062-5/+24
| | | | commit_hash:abf11126ef1a914939d506a79dd7c4f11df177f2
* YT-21910: Master compact table schemacherepashka2025-03-061-0/+13
| | | | | | | | | - Changelog entry Type: feature Component: master Introduce TCompactTableSchema, that holds wire protobuf schema representation and lighter than TTableSchema commit_hash:21801854b37fc25c5004ee01e5b79a3b3b6ea983
* YT-22593: More trivial TString->std::string migrationsbabenko2025-02-223-4/+4
| | | | | [nodiff:runtime] commit_hash:1ba799aed1703ab7c6304b6da7090b3337f768dd
* Fix unaligned load/store UB in bus and zstd compressionnadya732025-02-102-54/+0
| | | | commit_hash:55e574599005f5286f646ebba93d5550325708bc
* Babenkoed: Shadow Warssabdenovch2025-01-161-0/+17
| | | | commit_hash:deadebefdfd81b6c737b9464435356b8f652e296
* Intermediate changesrobot-piglet2024-12-246-0/+134
| | | | commit_hash:41c16027e2f796197b98307419a63da9fa3f1a88
* Introduce (any use) YT_STATIC_INITIALIZERbabenko2024-12-141-0/+19
| | | | commit_hash:7d3055f901a21e63f7860f443252a86e9895fd08
* Fix various issuespogorelov2024-12-065-231/+1
| | | | commit_hash:50f729d3716d8b1f5b852cfc008e228172fb79c4
* YT-22885: Handle unknown values in (Try)CheckedEnumCastbabenko2024-11-163-3/+61
| | | | commit_hash:5ce8019253cdb971d1af36350e3efa3a4ec8545c
* Intermediate changesrobot-piglet2024-11-082-2/+4
| | | | commit_hash:17dbd6d7e5fc440afa2d816e245a73e25135bfb5
* YT-21233: Rewrite ConvertTo CPO using TagInvokearkady-e1ppa2024-11-085-0/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plan: 1) Remove `IAttributedDictionary` type from the public API. \+ 2) Remove `Set` method from public API in favor of `operator<<=`. \+ 3) Adopt `ConvertTo<T>` (or other name) CPO with proper extension into `NYT::NYson::ConvertTo` from `yt/core`. 4) Use CPO from (3) to eliminate direct dependency on `yt/core` of `Get/Find` methods from attributes API. 5) Adopt `ConvertToYsonString` (or other name) CPO with proper extension into `yt/core` customisations. 6) Use CPO from (5) to eliminate direct dependency on `yt/core` of `TErrorAttribute` ctor. 7) Swap attributes implementation to the one which doesn’t use `IAttributeDictionary`. 8) At this point `stripped_error*` can be moved to library/cpp/yt and so can recursively dependant on THROW macro methods `Get/Find/…`. 9) Adjust CPO’s to work with `std::string` instead of `TYsonString` assuming text format to be used (maybe `TString` for now). 10) Remove dep of `library/cpp/yt/error` on `yson` entirely. This pr addresses 3-4 steps of plan. Below is a brief explanation of design decisions. We want to have a concept which detects if there is a `ConvertTo` method and if true, try calling it. Templates can only perform unqualified name lookup and if we allow non-ADL overloads to be found, we would have dependency on inclusion order (if `ConvertTo` is included prior to our code, everything works fine, but if the order is reverse, templated dispatch would fail, but direct call would work just fine). That is why we adopt niebloids which first disable ADL lookup of the name `ConvertTo` by directing it to niebloid implemented via `TagInvoke` mechanism. TagInvoke design <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf> . TL;DR: we want to have behavior which is consistent with inclusion order. Key difference now is that `ConvertTo` works consistently in both manual calls and template function body calls and is no longer visible for ADL part of the unqualified name lookup commit_hash:32af641bd0af559bfe670c2ceb36721fb4afc2dd
* NaN-safe comparison and hashingbabenko2024-11-069-2/+294
| | | | commit_hash:46d59ab3acbd313753d3e46f3a6f10a8ebc424d8
* YT-22885: Refactor checked castsbabenko2024-11-038-51/+122
| | | | commit_hash:7f7600d332c3ddb5c8372e921bcba3b4fbed68f8
* Add GetAllSetValue and IsKnownValuebabenko2024-10-273-5/+72
| | | | commit_hash:cbc39112d8384b8c4bcd2410f0a203466b400c10
* YT-22885: DEFINE_ENUM_UNKNOWN_VALUE, string-related conversionsbabenko2024-10-263-15/+49
| | | | commit_hash:14c7e42422af750383f04855b4a7ea6b267b92d2
* YT: Support plain enum deserializationdgolear2024-10-103-10/+33
| | | | | (HIDDEN_URL commit_hash:d9358ac48da1ab4a4ef9ccdbf7eb77a100cf3897
* Add an option to disable refcounted trackingnastprol2024-09-251-3/+5
| | | | commit_hash:ceb575c0377d4a48c0507590d878e690e92f5c63
* remove cpp/yt/misc no longer depends on cpp/yt/stringarkady-e1ppa2024-09-186-124/+0
| | | | commit_hash:429a843ed1a0e0fe3a5bc7d237f586b6671b8997
* Intermediate changesrobot-piglet2024-09-181-11/+13
| | | | commit_hash:3ef81205ed4cf9360829f834baa07c2fbf69b999
* fisco -> fiascoMaxim Akhmedov2024-09-051-1/+1
| | | | | | | | | No description --- b181413931eab2909c605b373dc858657e8bcb14 Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/816
* Intermediate changesrobot-piglet2024-09-034-0/+228
|
* YT-22642: Fix unaligned access UBbabenko2024-08-312-0/+54
| | | | 378099ca41e7698fba0ceda68b8d2b554e61b6ea
* Revert "YT-21306: Add EnumHasDefaultValue"dtorilov2024-08-202-18/+0
| | | | | | This reverts commit d9b67f1778da2d15dd94f7285afe4e3490a233ab, reversing changes made to 461a09e0c18bd14cef7df8060e7f9537e3ad74b5. 92cdaf4185661b7058f6a30d5a532ad40b725345
* YT-21306: Add EnumHasDefaultValuedtorilov2024-08-082-0/+18
| | | | d9b67f1778da2d15dd94f7285afe4e3490a233ab
* YTORM-1042 Fix casts for floating pointdeep2024-07-091-2/+2
| | | | | https://en.cppreference.com/w/cpp/types/numeric_limits/lowest 349097f620987be824e9db00f76af89746741c75
* YT-20614: Change cross-cell copy format (in preparation for Sequoia)h0pless2024-07-081-0/+17
| | | | | | | | | | | | The new format is better optimized for VectorizedRead, which is needed in Sequoia. Previously, the output for the BeginCopy verb was a serialized subtree plus the list of opaque children. In a non-Sequoia world, that is useful and easy to work with. However, in Sequoia, a subtree might not be contained on the same cell, which makes it difficult to use the old data transfer format. Now it's a vector of nodes with clear separation between them. This change makes it easier to work with VectorizedRead since the conversion between BeginCopy return and VectorizedRead(BeginCopy) return is very straight-forward. Additionally, this change helps with copying from Cypress to Sequoia, since now it's much easier to process each node individually (which is needed for Sequoia to work and not clog up one cell). In the next PR, I'm planning on: 1. Making BeginCopy a read-request (removing snapshot locks). So the verb will only return meta-information about the requested nodes. 2. Adding a verb, executed before BeginCopy, where the locks would be taken and the general structure of the tree is returned. 017ec9971e8e0a611a7286ed748b6071cfc89048
* Fix issuespogorelov2024-07-051-0/+19
| | | | 089f70efa4e50032e1c73e5c556363fa355eb4dc
* YT-18571: Polish TSourceLocationbabenko2024-07-023-27/+38
| | | | 81b1c42ea62adf4f2a7e2e7ba3601ca9687e29ed
* Enable empty init list in YT_DEFINE_GLOBALbabenko2024-06-221-1/+1
| | | | e52d229afddf7db640499d3856bc55f2b7360bb4
* Track source locations of propagating storagelukyan2024-06-182-2/+31
| | | | a27af83d265ebf4e7f4bf273eb41f69850817b05
* YT-21868: Delete unneeded ToString methodsarkady-e1ppa2024-06-127-32/+4
| | | | e856aa45df227b86e8b121852d3774bb2504193b
* YT-21868: Refactor NYT::Formatarkady-e1ppa2024-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | NYT::Format had several problems: 1. There are too many ways to enable printing of T. Not all are equally good. You could specialize TValueFormatter, you could write an overload of FormatValue, you could write an overload of ToString, you could write an overload of operator << for special stream or you could specialize the Out function. 2. If you attempt to print T which cannot be printed, you get a linker error without a proper source location which is very frustrating to work with. 3. There is no static analysis of format string performed even when it is possible. 4. If you write FormatValue overload, you still have to write ToString overload if you want to use this function (and people tend to use it quite a bit, since it is defined for util types and enums. This pr addresses these issues to some extent. Relevant changes: 1. The only way to support NYT::Format is to define the FormatValue overload. Otherwise, you get a compile-time error. 2. Format overloads have changed: Now you have two options for general use: ``` TString Format(TStaticFormat<TArgs...> fmt, TArgs&&... args); TString Format(TRuntimeFormat fmt, TArgs&&... args); ``` Either overload checks if TArg has a FormatValue overload. TStaticFormat performs a compile-time check of flags and the argument count. It binds to any string literal and constexpr string/string_view (and TStringBuf). TRuntimeFormat has to be mentioned explicitly. Otherwise, you will get a compile-time error for using runtime variable as a format. 3(!!!). Types which name begins with NYT:: have a specialization of ToString function which uses FormatValue. Thus, if you write class in namespace NYT and define FormatValue, you get ToString automatically. If your type is not from namespace enclosing NYT, you can just call NYT::ToString for the same effect. This limitation was caused by the fact, that we cannot review all of the external projects code which might inherit from stl classes or adopt some other questionable code practises which may completely break the dispatching mechanism of ToString due to the specialization (there were such cases). Proper documentation of this library will be added soon, so that this interaction is made known. This limitation might be lifted later 77beb68082e10aaf48be1842aad8aba63f26c1bd
* YT: Add FormatValue for std::source_locationdgolear2024-05-212-0/+44
| | | | | YTORM-1057 0aa4ceb80d984a15c92a69f242ecf517b3c7a07c
* Introduce YT_DEFINE_GLOBAL to help avoiding initialization order fiasco; ↵babenko2024-05-141-0/+13
| | | | | | apply to global loggers in yt/yt/core 787f98549edf6e8d46ac63cdb8db0609ccde42da
* YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-081-0/+16
| | | | | | TYsonStruct implementation (now with a fixed bug) 94a777c1510546c0a8a7ef3e3b327add7dfc3813
* Revert YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-081-16/+0
| | | | | | | | | TYsonStruct implementation Revert "YT-21310: Introduce CYsonStructSource to remove code duplication in TYsonStruct implementation" This reverts commit b5dbf4de1df8156e23176662e15b167361fddb19, reversing changes made to 5ab2a4add3801f5d310e76bf9ba496342d2b765a. 1f84c055d6e4df384230688c946a45dd6351a386
* Bunch of issues from babenko-issues tagarkady-e1ppa2024-05-071-2/+2
| | | | 4a6fd6fb52fcb4d43f76651d645dc2e1affe3dd0
* YT-21310: Introduce CYsonStructSource to remove code duplication in ↵arkady-e1ppa2024-05-071-0/+16
| | | | | | | TYsonStruct implementation done b5dbf4de1df8156e23176662e15b167361fddb19
* YT-21566: Access thread local variables via noinline functionslukyan2024-04-263-40/+17
| | | | 970c33b44a7bd166b2716d86d3d2053dcaf05d7d
* Move NO_UNIQUE_ADDRESS macro to library/cpp/yt/misc/port.harkady-e1ppa2024-04-231-0/+6
| | | | 8b95cb159efca3d611ef0361a6f53a20b2fb5b37
* Move concepts to library/cpp/yt/misc/concepts.harkady-e1ppa2024-04-211-0/+49
| | | | | Done b2c0a25fcacbb46fcf6294ce86b1a27ad2adac50
* Move FunctionView to library/cpp/yt/memory and add unit testsarkady-e1ppa2024-04-152-210/+0
| | | | 0f22987a2824410add2233f4434e26c9e1903da1
* YT-19731: Whitelist now prevents dropping inner errors with whitelisted ↵arkady-e1ppa2024-04-111-0/+40
| | | | | | | attributes No tests for now 9e6aa6815b8d892d1e76281e95f5d044196801e1
* YT-21402: Fibers Refactoring pt.1: Introduce FunctionView to use it as ↵arkady-e1ppa2024-04-052-0/+210
| | | | | | | | | | | | | | | | | | | AfterSwitch and improved registry algorithm 1) Added FunctionView -- non-owning type-erasure container. If we know that lambda lifetime is long enough, we can save up allocation by using this instead of TCallback. 2) Used FunctionView as AfterSwitch inside FiberSchedulerThread. We saved up a bunch of allocations (e.g. net worst-case allocations per suspend changed from 4 (x2 after switch + fiber allocation + enqueue to idle pool lf stack) to 2 (fiber allocation + enqueue to idle pool lf stack). 3) Fiber is not longer RefCounted. Its lifetime is managed via contract with TFiberRegistry. 4) TFiberRegistry is now lock-free for fiber insertion and deletion. For introspector it is still blocking. 5) "Introduced" SimpleIntrusiveList and IntrusiveMPSCStack to work be used in aforementioned TFiberRegistry. 6) elsedef branch of YT_REUSE_FIBERS was broken for about 3 years cause of double SetAfterSwitch. Now fixed. 7) (3), (4) and (5) caused some changes in yt_fiber_printers because some stuff was hardcoded there. Compat is in place. d6cf2ae5801c87813a21ca3e7243e1b2baa09f35
* YT-21233: Remove TSimpleException and teach TCompositeException storing ↵arkady-e1ppa2024-03-282-2/+2
| | | | | | | simple attributes Expand the CompositeException 9a10ec65bfc1df854e03bb3a4d8d0a0c0e4a3a5d