Skip to content

fix(segmentation): preserve finality across process-exit teardown - #142

Merged
CodingInAVan merged 1 commit into
mainfrom
fix/segment-finalization-sampler-lease
Jul 30, 2026
Merged

fix(segmentation): preserve finality across process-exit teardown#142
CodingInAVan merged 1 commit into
mainfrom
fix/segment-finalization-sampler-lease

Conversation

@CodingInAVan

Copy link
Copy Markdown
Contributor

Repair and salvage final segment windows without losing immutable metadata, track writer ownership on drain timeouts, and prevent the Windows sampler thread from leaking a per-iteration segment lease when ExitProcess terminates it without stack unwinding. Preserve synthetic lifecycle provenance and add regression coverage for final-window recovery, segment writers, and sampler lease reuse.

Description

  • Preserve immutable window metadata when repairing final segment artifacts.
  • Track active segment-writer ownership for actionable drain-timeout diagnostics.
  • Prevent Windows ExitProcess teardown from leaking the sampler’s per-iteration writer lease.
  • Use a read-only segment snapshot for change detection while retaining one batch writer lease.
  • Preserve synthetic lifecycle provenance during launcher repair.

Type of Change

  • Bug fix
  • New feature
  • Documentation update

Testing

  • Client suite: 515 passed, 7 skipped.
  • Reproduction before the sampler fix: 2 of 6 runs timed out.
  • After the fix: 0 of 10 runs timed out.
  • Localhost E2E produced two complete, non-synthetic segments.
  • Agent ACK cleanup retained metadata/tombstones with no loss markers or .tmp files.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Repair and salvage final segment windows without losing immutable metadata, track writer ownership on drain timeouts, and prevent the Windows sampler thread from leaking a per-iteration segment lease when ExitProcess terminates it without stack unwinding. Preserve synthetic lifecycle provenance and add regression coverage for final-window recovery, segment writers, and sampler lease reuse.
@CodingInAVan
CodingInAVan merged commit 93e5387 into main Jul 30, 2026
4 checks passed
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.

1 participant