Skip to content

Rename allocator params to alloc; drop batch/arena prefixes where not needed #147

Description

@lukashes

The codebase spells every allocator parameter as allocator: std.mem.Allocator in full. PR #146 review raised shortening this to alloc to save horizontal space in signatures that already carry several params (e.g. processChangesToKafka, produceEvent). Kept allocator there for now to stay consistent with the rest of the codebase rather than introduce a one-off name; this issue is to do the rename project-wide instead.

Several call sites also prefix the name with batch_ or pass an arena's .allocator() into a var already called batch_alloc/batch_allocator, even where the allocator isn't meaningfully scoped to a batch from the callee's point of view (src/processor/processor.zig, src/source/postgres/source.zig, src/source/postgres/snapshot.zig). Keep the batch_/arena qualifier only where it documents a real constraint (e.g. "freed at the end of this batch/FETCH, don't hold references past it"); drop it where it's just restating the caller's local variable name.

Ask: rename allocator params to alloc across src/, and audit batch_allocator/batch_alloc/arena-derived allocator names, keeping the qualifier only where the scoping is non-obvious from context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size/SRelative effort: small

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions