| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
tagged logging
Three additions to the fluent tagged logging API in `library/cpp/yt/logging`.
**1. `.WithFormat(key, format, args...)`** composes one tag out of several values, for tags that are not a single formattable value:
```cpp
.WithFormat("Method", "%v.%v", service, method)
```
**2. `TLoggingTagList`** (new `tag.h` / `tag-inl.h`) — an opaque, pre-serialized list of keyed tags holding the tag section of the `TTaggedPayloadWriter` wire format. A component builds its diagnostic tags once, with the same fluent API, and splices them into many events via `.With(tagList)`, so the tags stay structured key/value pairs instead of collapsing into a single string:
```cpp
auto tags = TLoggingTagList()
.With("ConnectionId", id)
.With("Endpoint", endpoint);
...
YT_TLOG_DEBUG("Pollable registered")
.With(tags);
```
**3. A `-Wunused-value` fix.** The fluent macros now end their expansion in `loggingGuard__.Self()` rather than naming the guard. A tag-less `YT_TLOG_INFO("Message");` otherwise expands to a discarded id-expression, and `-Wunused-value` fires on those whenever the call is spelled inside a macro *argument* (e.g. within `BIND(...)`) rather than a macro *body*.
commit_hash:ef3213619e4c47808519906b5a16673bf5e94c45
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:6ab9c84d85a668a8047593f61b5c9e1a7be60377
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:0a10662cb824dede898d600662723224e893c38b
|
| | |
| |
| |
| | |
commit_hash:ebf99d345c17fbfedf78ef06424c615c900689f9
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:c6efe325f5bf64dbd849147c48c7b8678d0ae5cd
|
| | |
| |
| |
| | |
commit_hash:8521bae955ae15bf7265f8bb58ebe126a62841ea
|
| |\| |
|
| | |
| |
| |
| |
| |
| | |
iteration over elements
commit_hash:3cde1a78c5f1af49a50168bbc85c6f9a8f28ad73
|
| | |
| |
| |
| | |
commit_hash:4e76ece0b75ab787ed04b6be5f183cecbf9b8167
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| | |
Python-клиент (обертка над С\+\+ клиентом) UA с fork support виснет в `fork()` (\>50%): `TClientSession::CheckGrpcCallInactivity` (inactivity-watchdog на потоке gRPC completion-queue) брал сессионный лок `with_lock` не проверив что не идет форк. Пока pthread_atfork-обработчик `TClient::PreFork` держит этот лок в `WaitAll()`, поллер застревает на CheckGrpcCallInactivity -\> сессия не закрывается -\> `fork()` не завершается.
Фикс: `CheckGrpcCallInactivity` захватывает лок `TryAcquire` \+ выход по `ForkInProgress` - как уже делает `Poll()`
commit_hash:79b1f727d8ecc9b54e386b586f4f49bf1d6512d8
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:7466cacb2971d86743b7541ddb2fbb6c8850085a
|
| | |
| |
| |
| | |
commit_hash:ff7ca9a2428930638288f8c0e92a303b8f620063
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Move `contrib/ydb/library/yql/providers/dq/{config,local_gateway,service,stats_collector}` and gateway/control implementation to `yt/yql/providers/dq/`
- Move `contrib/ydb/library/yql/tools/dqrun` to `yt/yql/tools/dqrun`
- Clean up `contrib/ydb` provider (slim `yql_dq_gateway.h`, PEERDIR updates) and fix consumers (`scheduler`, `global_worker_manager`, `pq/provider/ut`, benchmarks, solomon tests)
## Test plan
- [x] `./ya make --build debug contrib/ydb/library/yql/providers/dq/provider contrib/ydb/library/yql/providers/dq/provider/exec yt/yql/providers/dq/gateway yt/yql/providers/dq/local_gateway yt/yql/providers/dq/service yt/yql/tools/dqrun`
- [x] `./ya make --build debug -tA yt/yql/providers/dq/provider/ut`
commit_hash:18a321f318f5903167749b88541a79b34ab1c8d7
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Two scenarios addressed:
- Access to ref counters after explicit destructor of an object
- Access to vptr for upcast of an already destroyed object
commit_hash:a8f27500111817f325832d006feb3ce6c3c830f1
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace `TLogEvent::MessageRef` with an opaque `Payload` that carries the message
together with structured key/value tags, deferring tag rendering to the consumer
(logging thread).
- Add the `TTaggedPayloadWriter`/`TTaggedPayloadReader` codec (`NDetail`), with a
per-thread chunk-cached builder so tagged logging does no per-message heap
allocation.
- Model the payload as a typed `TLogEventPayload` — a `std::variant` of the opaque
strong typedefs `TTaggedLogEventPayload` and `TStructuredLogEventPayload` (each
over `TSharedRef`). The active alternative identifies the event kind, so the
separate `ELogMessageKind` enum and `TLogEvent::MessageKind` field are removed;
consumers dispatch via `std::holds_alternative`/`std::get` instead of a tag.
- Add the fluent `YT_TLOG_*` API: `YT_TLOG_INFO("Message").With(key, value)` and
`.With(key, value, "%spec")`; disabled levels skip argument evaluation.
- Add well-known tags: `.With(value)` attaches a value under a statically known
key resolved by ADL (e.g. `.With(error)` for the `Error` tag).
- Teach the plain-text and structured formatters to render tags; add the
`enable_native_tags` knob to emit tags into a nested structured attribute.
- Add producer-side benchmarks. The tagged API is cheaper than `YT_LOG_*` for
tagged calls and on par for tag-free ones:
#|
|| **Producer call** | **`YT_LOG_*`** | **`YT_TLOG_*`** | **Δ** ||
|| no tags | 81 ns | 82 ns | +2% ||
|| 1 tag | 124 ns | 88 ns | -29% ||
|| 2 tags | 140 ns | 101 ns | -28% ||
|| 3 tags | 372 ns | 283 ns | -24% ||
|#
--
#| || **<a href="https://nda.ya.ru/t/p0sVNSOC7ijzFF" target="_blank"> Echo tests</a>** || |#
commit_hash:70efc90e5c2b71e5311415a4e4508db42ff28971
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| | |
Similar to `CacheDestroyed` above in this file.
It is possible that `ThreadMessageTag` is read by the logger during thread shutdown after this thread-local's destruction (e.g. when another thread-local's destructor logs). Added a trivially destructible flag to guard the tag content.
commit_hash:852afe8245de23e9abe69a08bf5d9bfe4b17496b
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
---
Type: fix
Component: library/cpp/yt/error
Problem: TError::Enricher_ and TError::FromExceptionEnricher_ are static class members whose destructors are registered when error.cpp is loaded. However, if any code calls Singleton<>() during static initialization before error.cpp loads, the OnExit handler gets registered in standard atexit() first. Due to LIFO ordering, at program exit the enrichers are destroyed before OnExit() runs, but OnExit() then destroys Singletons whose destructors may create TError objects (e.g., to cancel futures), which invokes Enrich() on the already-destroyed std::function, causing use-after-free. This can lead to intermittent segfaults depending on the link order of translation units.
Solution: Store enrichers in a LeakySingleton<TEnricherStorage> so they are never destroyed, as TError can be created anywhere including during program shutdown.
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1582
commit_hash:a9607f0094b4c60414d00ebca844db6a2ceafeb9
|
| | |
| |
| |
| | |
commit_hash:8ccfa9ed373c83b84c21d12078e06befb05f026c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
### `bit_io.h`
MSB-first bit-stream writer/reader (`TBitWriter` / `TBitReader`) over a caller-owned buffer. The writer flushes whole 32-bit words via the unaligned-store API; the reader assumes a few bytes of over-read slack.
### `interpolative.h`
- **Truncated-binary (minimal) code** — the entropy-optimal integer code for a uniform value in `[0, rangeSize)`.
- **Binary interpolative coding** — `InterpolativeEncode` / `InterpolativeDecode` for sorted, strictly increasing integer sequences over a known range `[lo, hi]`. It recursively codes the median of each subrange, compressing clustered sequences well below a flat `log2` per element with no per-element headers. Length is conveyed out of band (e.g. via the existing `varint`).
commit_hash:8baf84444b8cf8e8a6e32776b4ff48582187ac2b
|
| |\| |
|
| | |
| |
| |
| |
| | |
Use the payload itself as the shared range holder instead of copying the string via TSharedRef::FromString.
commit_hash:b427dbe6e8a8eaf3aa3c46b57f0f9965d57b3a95
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Rationale: all overloads of `TSharedRef::FromString` must remain cheap and don't copy any payload.
Remove the zero-terminated C string overload of `TSharedRef::FromString`. Callers passing a string literal should use `std::string/TString` explicitly.
#| || **<a href="https://nda.ya.ru/t/-VG7qyBv7iD8vm" target="_blank"> Echo tests</a>** || |#
commit_hash:1a6718abcbe4e6a8f58592f55de8c37ceb2b73d3
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:5158390863c48b4ceb69eb344ea1996573220c4b
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds AVX512 VNNI runtime dispatch for signed int8 dot products used by Link HNSW distance calculations, with safe fallback to the existing AVX2/SSE implementations. The signed int8 VNNI path corrects the u8*i8 bias per 64-byte chunk so accumulator semantics stay aligned with the existing int8 DotProduct implementation.
Verification:
- `ya make -tt library/cpp/dot_product/ut`
- `ya make library/cpp/dot_product/bench`
- `ya make -r library/cpp/dot_product/bench`
- `ya make -tt library/cpp/dot_product/ut --sanitize=address`
- `ya make -tt library/cpp/dot_product/ut --sanitize=undefined -F 'TDocProductTestSuite::TestDotProduct8' -F 'TDocProductTestSuite::TestDotProduct8VnniEdges' -F 'TDocProductTestSuite::TestDotProductCharStability'`
- `ya make -tt util/system/ut -F TestCpuId`
commit_hash:5624243c26df2a9e067e631477f6c3603ef45626
|
| | |
| |
| |
| | |
commit_hash:117a004505c534f300d1314155387f3e582b31c9
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The returned value is the element's absolute index in the vector, not an offset within a page, so GetIndex() describes it accurately. This also aligns with LLVM's PagedVector::MaterializedIterator, which exposes getIndex() for the same concept.
- README.md updated to document GetIndex()
- new test for iterator index added
commit_hash:08a8f5f70faf0e7cef26429446886177433afa0f
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:b287a7802acecdc3d13442505be5815167cf4f71
|
| | |
| |
| |
| | |
commit_hash:07da9e448456fc129126a9b96f2fef0c40492aec
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:991ef644d607ef39801bae86415ae0190465084d
|
| | |
| |
| |
| |
| | |
Make the yt and flow sources buildable in the ytsaurus-cpp-sdk export
commit_hash:a733ad0d534a3717117cd80d162f6d527843decd
|
| | |
| |
| |
| |
| |
| | |
- use more effective page implementation that avoid extra level of memory indirection
- it also allows emplace_back() for non-movavable non-copyable types
commit_hash:ef25b1f123742dea29a7d4fdf59a607e18a9850c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Было:** Prometheus decoder ограничивает длину значений меток метрик максимум 256 символами. Попытка передать метрику с более длинным значением метки приводит к исключению `TPrometheusDecodeException`.
**Стало:** Максимальная длина значения метки расширена до 1024 символов. Системы, которые генерируют метрики с более длинными значениями (например, с ID источников данных, URL, или сложных идентификаторов), теперь могут успешно передавать такие метрики в Unified Agent без ошибок.
**Практический эффект:** Улучшение совместимости с внешними системами мониторинга и приложениями, которые требуют передачи длинных меток. Существующие системы с метками < 256 символов продолжают работать без изменений.
---
## С точки зрения разработчика
### Структурные изменения
Расширение требовало изменения способа хранения длины строки в пуле коротких строк:
1. **Prometheus decoder** (library/cpp/monlib):
- `MAX_LABEL_VALUE_LEN`: 256 → 1024
2. **Short string pool** (logbroker/unified_agent/common):
- `MaxLabelSize`: 255 → 1024
- **Ключевое изменение:** Размер строки теперь хранится как `ui16` (2 байта) вместо `unsigned char` (1 байт)
- Было: `*slot->Payload() = static_cast<unsigned char>(s.size())`
- Стало: `memcpy(slot->Payload(), &size, sizeof(ui16))`
- Это позволяет хранить строки до 65535 символов (но логически ограничено на уровне валидации)
### Изменённые файлы
| Файл | Основные изменения |
|------|------------------|
| `prometheus_decoder.cpp` | `MAX_LABEL_VALUE_LEN: 256 → 1024` |
| `prometheus_decoder_ut.cpp` | +2 юнит-теста для новых граничных значений |
| `short_string_pool.h` | `MaxLabelSize: 255 → 1024`, operator[] использует ui16 для чтения размера |
| `short_string_pool.cpp` | Allocation и copy логика адаптирована для ui16 |
### Тестирование
Добавлены два новых юнит-теста:
- **LabelValueAtNewLimitIsAccepted:** Метрика с меткой ровно 1023 символа успешно парсится
```
"m{l=\"" + string(1023, 'a') + "\"} 1\n"
```
- **LabelValueOverNewLimitStillThrows:** Метрика с меткой ≥1024 символов выбрасывает исключение
```
"m{l=\"" + string(1024, 'a') + "\"} 1\n"
// → TPrometheusDecodeException: "trying to parse too long label value, size >= 1024"
```
### Безопасность и совместимость
- ✅ Обратно совместимо: строки < 256 символов работают так же
- ✅ Валидация: лимит 1024 проверяется на уровне Ref() в пуле
- ✅ Граничные случаи: добавлены тесты для 1023 и 1024 символов
- ✅ Выделение памяти: правильно рассчитано с учётом новых 2 байт для размера
- ✅ Я не нашел ситуации когда закодированная строка (длина + строка) улетала куда-то из пула и потом пыталась раскодироваться. Так что считаю, что миграции никакой не надо и все обратно совместимо. НАДЕЮСЬ Я НЕ ОШИБАЮСЬ
commit_hash:b30852954951bd8e65d69777a59ffeb58da76b47
|
| |\| |
|
| | |
| |
| |
| | |
commit_hash:624d9e33790566421f01090a99e63155da5027f8
|
| | |
| |
| |
| | |
commit_hash:95796ec02100ee579a0afedeec45a837f553ae73
|
| | |
| |
| |
| | |
commit_hash:e6e226cb571efc3d4045f3154e7028c6cbbdef3d
|
| | |
| |
| |
| |
| | |
Reverts the library/cpp/yt portion of rXXXXXX.
commit_hash:61c578eb480ea5a760364158808fd1f304773ae7
|