Repository navigation
Convert asserts to chasserts - #105256
Convert asserts to chasserts#105256
Conversation
|
Workflow [PR], commit [a91de4a] Summary: ✅
AI ReviewSummaryThis PR broadly converts project Findings
Final VerdictStatus: Minimum required action: preserve a supported debug-only assertion path for heavy checks, and remove |
test_storage_kafka/test_batch_fast.py::test_kafka_protobuf_no_delimiter fails in debug mode because of the assert
eec60e5 to
56e789f
Compare
|
It would be nice to add the rule to the stylecheck. |
Yes, I am planning to do that also, but first I want to see how easy to make this work. The style-check is somewhat independent from this, because even if I cannot convert all of these asserts, I can still add a stylecheck, that is only for the new code. |
|
@Algunenano I found even more assert and added the style-check. Please check the new changes. |
cb51920 to
a24f314
Compare
|
Stress test fix: #105410 (or cherry-pick it here) |
|
I think I will merge this as is and your PR can be merged separately. |
…s test
`FunctionsStressTestThread::run` calls `context->setCurrentQueryId("")`
on every iteration but never refreshes `ThreadStatus::query_id`. When
the destructor's `(no ctx && empty id) || (ctx && id matches)` check
became a `chassert` (PR ClickHouse#105256), every worker tripped it.
Detach from the thread group right before `thread_status.reset()` so
the destructor sees the cleared state.
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105256&sha=a24f314f927ad5c12e928028e20be8d32d10b302&name_0=PR&name_1=Unit%20tests%20%28tsan%2C%20function_prop_fuzzer%29
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
In case the metadata is stored in keeper, we need a component guard
Reasoning: ProtobufListInputFormat::resetParser now calls serializer->resetState, but ProtobufSerializerEnvelope::resetState only resets envelope-level flags and does not clear ProtobufSerializerMessage::FieldInfo::field_read. If readRow throws after at least one field was already marked as read, the catch path rolls back columns but leaves field_read dirty. On the next row, stale field_read can suppress default insertion for absent fields, producing incorrect row values or column-size divergence.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 1813/2051 (88.40%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 61 line(s) · Uncovered code |
…s test
`FunctionsStressTestThread::run` calls `context->setCurrentQueryId("")`
on every iteration but never refreshes `ThreadStatus::query_id`. When
the destructor's `(no ctx && empty id) || (ctx && id matches)` check
became a `chassert` (PR ClickHouse#105256), every worker tripped it.
Detach from the thread group right before `thread_status.reset()` so
the destructor sees the cleared state.
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105256&sha=a24f314f927ad5c12e928028e20be8d32d10b302&name_0=PR&name_1=Unit%20tests%20%28tsan%2C%20function_prop_fuzzer%29
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Changelog category (leave one):
Some tests might fail in debug builds because of existing asserts. I converted all asserts in our code base (only
srcdirectory) tochassertso their check is actually enforced in our CI.