Skip to content

Conversation

@xemul
Copy link
Contributor

@xemul xemul commented Dec 19, 2025

When server socket sleeps in .accept() method, it should be possible to abort the waiting. The accept() should then resolve into exception of known type and error code.

refs #578

When server socket sleeps in .accept() method, it should be possible
to abort the waiting. The accept() should then resolve into exception
of known type and error code.

refs scylladb#578

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
@xemul xemul requested a review from nyh December 22, 2025 11:18
auto f = ss.accept().then([] (auto ar) {
BOOST_FAIL("Accept didn't resolve into exception");
}).handle_exception_type([&too_late] (std::system_error e) {
BOOST_REQUIRE(!too_late);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to a coroutine or thread, they're so much more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too late, @nyh already merged it. I created #3177 to address that comment

Copy link
Contributor

@nyh nyh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there's something I don't understand: #578, which you "refs", claimed there is a bug in this area. Are you saying that your test proves there is no such bug, and the issue was invalid (you closed it as "completed" but I guess you meant "wontfix"?)?

@xemul
Copy link
Contributor Author

xemul commented Dec 24, 2025

Looks good, but there's something I don't understand: #578, which you "refs", claimed there is a bug in this area. Are you saying that your test proves there is no such bug, and the issue was invalid (you closed it as "completed" but I guess you meant "wontfix"?)?

Yes, I ran this test with all 3 backends and it all passed.

We cannot yet make this check run all the time, as test.py runs tests with "most suitable" backend once, and individual tests can request for some specific backend (like socket_test explicitly asks for linux-aio backend). But that's yet to be improved

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.

3 participants