Skip to content

README Configuration docs: zero MaxItems/MaxTime semantics and clamp rules still misdocumented #84

Description

@MasterOfBinary

Post-#80 (and pending #67), the godoc on Config.Get is accurate, but README's Configuration section still misleads (validated @ 58cee73):

  1. "MaxTime: Maximum time to wait before processing a batch" — never states that zero means disabled: with MaxTime/MaxItems unset there is no flush trigger at all, so a MinItems: 50-only config waits indefinitely until EOF. A real latency foot-gun that no user-facing doc discloses.
  2. "If MinItems > MaxItems, MinItems will be set to MaxItems" (and the MinTime/MaxTime twin) — wrong for the default case: fixConfig (batch/batch.go:457-468) clamps only when the max is non-zero. With MinItems: 10, MaxItems: 0, MinItems stays 10; the doc's literal reading says it becomes 0→1.

Fix: qualify both clamp bullets with the non-zero-max condition and add one line stating zero max = no maximum/trigger, mirroring the merged Config.Get wording.

Sequencing: do this after PRs #67 and #68 land — both touch adjacent docs (#67 adds the ConfigValues field docs; #68 edits README elsewhere) and doing it now would conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions