Skip to content

fix(point): continue encoding after skipping oversized points - #213

Merged
coanor merged 1 commit into
mainfrom
fix/point-encoder-skip-boundary
Oct 29, 2026
Merged

coanor merged 1 commit into
mainfrom
fix/point-encoder-skip-boundary

Conversation

@leecha

@leecha leecha commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

A point can fit the initial size check but exceed the buffer after Protobuf framing. Trimming that point previously returned end-of-iteration and silently discarded the remaining input. For example, one oversized point followed by 200 normal points produced zero output while reporting only one skipped point.

Continue encoding after a skipped point using an in-function retry, and accept payloads that exactly fill the buffer. Truly oversized points remain skipped without affecting subsequent points. Update the existing exhaustion assertion and add regression coverage for exact-fit payloads, oversized points at each position, 4,096 consecutive oversized points, nil input, output ordering, and error propagation in both size modes.

Validation:

  • New regressions reproduced the failures before the fix and pass with -race after it.
  • Related TestV2Encode, TestEncTrim, and TestSkipLargePoint tests pass with -race.
  • Changed-code lint passes with zero issues; formatting and git diff --check pass.
  • Full make test encountered unrelated diskcache /tmp exhaustion and an HTTP rate-limit assertion failure. The existing million-iteration TestPoolKVResuable was stopped after more than five minutes; the full point suite is not claimed as passed.
  • Full lint with local golangci-lint 2.11.4 reports existing findings. CI's 2.4.0 binary cannot analyze the installed Go 1.26 toolchain. Full copyright checking reports 73 existing violations; all three changed files pass.

Tested on Linux/arm64 with CGO enabled and vendor dependencies.

@coanor
coanor merged commit 97d6a83 into main Oct 29, 2026
1 check passed
@coanor
coanor deleted the fix/point-encoder-skip-boundary branch October 29, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants