Repository navigation
Zig 0.17 - #1
Closed
filipnyquist wants to merge 6 commits into
Closed
Zig 0.17#1filipnyquist wants to merge 6 commits into
filipnyquist wants to merge 6 commits into
Conversation
- build.zig: run_smoke.addPassthruArgs() replaces b.args - Replace removed array-repeat (**) with @Splat / comptime fill - zig fmt: @intFromEnum/@enumFromInt -> @backingInt/@fromBackingInt - TcpTransport: Io.VTable.netRead/netWrite are gone; socket I/O now goes through Io.Operation (net_read/net_write). Read/write timeouts use Io.Batch.awaitConcurrent instead of racing two concurrent tasks per I/O call, and always cancel the batch so evented backends never keep a pending op pointing at a dead stack frame. - Bump .zigversion, build.zig.zon, VERSION and CI to Zig 0.17 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Breaking API change: the ?*const std.atomic.Value(bool) cancel token is removed from Client.connectTcp/fromTransport/ping/sendQuery/query/insert and Pool.acquire. Cancellation is now std.Io cancellation (Future.cancel, Group.cancel) and surfaces as error.Canceled (was error.Cancelled). - Map error.Canceled recorded by the transport back to Canceled instead of ConnectionFailed. - When a query is canceled while waiting for the next server packet (or via the new ResultStream.cancel()), send the protocol Cancel packet and drain to EndOfStream/Exception with cancellation blocked and a Config.cancel_drain_timeout_ms budget, so the connection stays usable and the server stops the query. Mid-packet cancels still mark the connection broken. - Check for a pending cancel before writing a query/ping so a task canceled before it started leaves the connection intact. - Pool.acquire waits and locks cancelably (no slot leak on cancel). - Export QueryError; add Event.query_cancel_sent. - tests/smoke_async.zig + zig build smoke-async: cancel-query, stream-cancel, cancel-race, pool-cancel, fanout. - Example 04 rewritten around io.concurrent + Future.cancel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- examples/06_concurrent_queries.zig: Pool + Io.Group fan-out and a query deadline via io.concurrent + Future.cancel - CI runs zig build smoke-async and example 06 against ClickHouse - README/docs: Zig 0.17, async + cancellation semantics table, cancel_drain_timeout_ms, Io.Evented networking gap in Zig 0.17.1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pre-0.11 @Frame-based async client and other legacy prototypes were not built or referenced anywhere; async now lives in the main client via std.Io. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The native protocol is request/response with small trailing packets (Data terminators, Ping, Cancel), which Nagle can hold back waiting for a delayed ACK. Matches what the reference ClickHouse clients do. Opt out with Config.tcp_no_delay = false (TcpOptions.no_delay). Best effort: skipped on Windows/WASI where std.posix.setsockopt is unavailable. Also tighten the cancel-race smoke scenario to 250us steps so it keeps covering both the mid-query and the already-finished outcomes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- bench/bench.zig (zig build bench -Doptimize=ReleaseFast): read throughput (UInt64/String, with and without LZ4), INSERT into a Null table (none/LZ4/ZSTD), ping latency, and concurrent query scaling over a Pool with Io.Group workers - bench/reference_clickhouse_client.sh: clickhouse-client reference timings for the same workloads - bench/collect.py merges runs (medians) into bench/results.json; bench/plot.py renders assets/benchmarks.svg (light/dark aware) - README: benchmarks section with the chart, a table of the same numbers, and reproduction steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.