Skip to content

Consolidate NNTP Listening Transport in Common - #258

Merged
enteriaza merged 6 commits into
masterfrom
common-nntpd
Oct 30, 2026
Merged

enteriaza merged 6 commits into
masterfrom
common-nntpd

Conversation

@enteriaza

Copy link
Copy Markdown
Collaborator

Summary

Extract the high-performance socket listener and pipeline-based connection transport into VectorNNTPD.Common, providing a shared implementation for ReaderService, TransitService, StorageService, and BackFillerService.

This removes duplicated listening-transport implementations while preserving service-specific protocol handling and session logic.

Changes

  • Shared transport: Centralize socket acceptance, connection management, pipeline transport, TLS handling, and related networking components in Common.
  • ReaderService and TransitService: Migrate listeners to the shared implementation and remove private transport copies.
  • StorageService and BackFillerService: Adopt the shared listener and connection transport while retaining their service-specific protocol and storage behavior.
  • Stream correctness: Fix partial-read handling, pipe advancement, write/flush behavior, and cancellation edge cases.
  • QUIT logging: Use explicit expected-connection-completion state to avoid incorrectly reporting normal QUIT teardown as a failure, while preserving genuine failure and STARTTLS handshake error logging.
  • Regression coverage: Add tests for transport stream behavior, cancellation, connection completion, and command logging.
  • Documentation: Update transport documentation and PERFORMANCE.md with the current benchmark baseline and historical comparison limitations.
  • Fixture integrity: Preserve byte-sensitive INN fixtures through the appropriate .gitattributes configuration.

Validation

  • Release x64 solution build completed with 0 warnings and 0 errors.
  • Common: 1,204 tests passed.
  • BackFiller: 1,732 tests passed.
  • Storage: 520 tests passed.
  • Reader: 3,743 tests passed; 118 skipped.
  • Transit: 3,014 tests passed; 18 skipped.

Performance

The shared pipeline transport has a measured post-migration loopback benchmark baseline. Historical BENCHIT results are retained in PERFORMANCE.md, but the workloads are not directly comparable. Consequently, this PR makes no quantitative before-and-after performance improvement claim.

Scope

Service-specific NNTP protocol and session logic remain in their respective services. The change centralizes the listening transport without introducing a separate legacy NNTP server implementation.

- Extract shared high-performance pipeline listener and connection transport into Common
- Migrate Reader, Transit, Storage, and BackFiller listeners to the shared implementation
- Fix pipeline stream read, write, and cancellation handling
- Improve QUIT completion and command failure logging
- Add transport regression tests and update performance documentation
- Preserve byte-sensitive INN test fixtures
@enteriaza enteriaza self-assigned this Oct 29, 2026
@enteriaza enteriaza added the enhancement New feature or request label Oct 29, 2026
@enteriaza
enteriaza merged commit b28001e into master Oct 30, 2026
7 of 8 checks passed
@enteriaza
enteriaza deleted the common-nntpd branch October 30, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants