Improper use of onReadable in HTTPServer within fdbrpc
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
I see in the documentation for conn->onReadable() that a prior conn->read() which returns 0 is required before calling conn->onReadable(). Does this imply that the HTTP server implementation in fdbrpc is incorrect?
https://github.com/apple/foundationdb/blob/e1300053109c984b27070817792534725daea603/flow/include/flow/IConnection.h#L58-L60
There is no conn->read() call before conn->onReadable in the connectionHandler implementation.
https://github.com/apple/foundationdb/blob/e1300053109c984b27070817792534725daea603/fdbrpc/HTTPServer.actor.cpp#L89-L91
Contributor guide
Research direction
Read the onReadable contract in flow/include/flow/IConnection.h at lines 58-60, then inspect connectionHandler in fdbrpc/HTTPServer.actor.cpp at lines 89-91. Determine whether the HTTP server satisfies the documented precondition; done means resolving the discrepancy by correcting the implementation or clarifying the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100