Skip to content

Minor findings from the stability review #86

Description

@lukashes

Small defects collected during the pre-GA review; none affects data safety, batching them to avoid issue noise.

  • validator.zig prints user-facing status via std.debug.print instead of the stdout path used by main.zig (src/source/postgres/validator.zig:2,56,91,107,126).
  • Stale comment in source.zig:231: says "batch wait time (~6 sec)", actual BATCH_WAIT_MS is 100ms.
  • main.zig has no errdefer for source/producer between their creation and the handoff to Processor (src/main.zig:104-113) — on a wiring error the Postgres connection is not closed (the process exits anyway, so cosmetic).
  • getPartitionKey swallows all errors including OOM via else |_| {} (src/processor/processor.zig:185).
  • producer.zig getOrCreateTopic: topic_conf leaks when rd_kafka_topic_new fails.
  • Observability.noop() leaves allocator undefined while respondMetrics reads it unconditionally (observability.zig, http.zig); unreachable with the current wiring since serve only starts when observability is configured, but fragile.
  • relation_registry.zig register: column name strings leak when the final relations.put hits OOM (OOM-only path).
  • Identifiers are interpolated into SQL strings in validator.zig (checkTableExists) and replication_protocol.zig (publication/slot checks). Injection is blocked by config validation upstream, but the guard lives far from the query; escape at the call site as hardening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions