Skip to content

Enforce write interest registration state - #1072

Open
sainadh777 wants to merge 1 commit into
apache:mainfrom
sainadh777:fix/write-interest-registration
Open

sainadh777 wants to merge 1 commit into
apache:mainfrom
sainadh777:fix/write-interest-registration

Conversation

@sainadh777

Copy link
Copy Markdown
Contributor

Summary

  • Complete TODO 17.1 by rejecting duplicate write-interest registration with a localized IllegalStateException until the pending callback begins.
  • Clear the registration when OPEN_WRITE processing starts, or when blocking and vectored write continuations consume poller readiness.
  • Add focused state-transition tests, update the Coyote changelog, and remove the completed TODO.

Validation

  • ant validate
  • ant test -Dtest.entry=org.apache.tomcat.util.net.TestSocketWrapperBase (2 tests)
  • ant test -Dtest.entry=org.apache.catalina.nonblocking.TestNonBlockingAPI -Dtest.entry.methods=testNonBlockingWrite,testNonBlockingWriteWithKeepAlive (2 tests)
  • ant clean && ant
  • Full unfiltered ant test: 656 suites, 41,398 tests, 0 failures, 0 errors, 328 skips
  • Built distribution smoke: HTTP 200 from /, clean shutdown and no remaining listeners

Draft for maintainer review.

@sainadh777

Copy link
Copy Markdown
Contributor Author

@markt-asf @rmaucher Could you review the write-interest state transition and the poller callback clearing points when convenient? This implements TODO 17.1; the full suite and runtime smoke are green. Thank you.

@sainadh777
sainadh777 marked this pull request as ready for review September 19, 2026 21:46
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