Repository navigation
rgw: pull up beast submodule and update frontend - #17923
Conversation
There was a problem hiding this comment.
Do we need to have the discard_buffer as a part of the Connection's state? Are we interested in its content?
There was a problem hiding this comment.
we never read its content, no. the only requirement is that the buffer stays alive between discard_unread_message() and the on_discard_unread() callback. keeping it in the connection avoids the need to allocate/free
There was a problem hiding this comment.
I see. Maybe we could have it as a static in discard_unread_message()? What do you think?
There was a problem hiding this comment.
good idea! updated, with a comment explaining that it's okay for multiple clients to share the static discard_buffer
3986bf2 to
682d9cb
Compare
|
teuthology results show no test failures, but some new valgrind leaks coming from rgw Options |
|
tested in teuthology with #17977 as the suite-branch |
There was a problem hiding this comment.
If you don't set the reason explicitly, Beast will fill in an appropriate string for you during serialization
There was a problem hiding this comment.
So this means that your incoming HTTP message bodies cannot be larger than the buffer size?
There was a problem hiding this comment.
our request handlers will call this read_data(char* buf, size_t max) function repeatedly to read the body in pieces. as i understand it, by breaking on need_buffer here and returning successfully, we indicate to the caller that it needs to provide another buffer
There was a problem hiding this comment.
but the code also breaks on connection_reset, is the intention to treat connection_reset the same as need_buffer?
There was a problem hiding this comment.
agreed, connection_reset doesn't belong here. it was only working because the request handler's loop terminates on a zero-length read. after removing that check for connection_reset, i found that we have one s3test case, test_atomic_dual_conditional_write_1mb, that exercises that error path and logs failed to read body: Connection reset by peer
pr updated - thanks again!
There was a problem hiding this comment.
If you are using parser::header_limit you can just default construct this flat buffer.
682d9cb to
a3f97cd
Compare
|
@vinniefalco incorporated your feedback. your review is much appreciated, thank you! |
a3f97cd to
cac0b64
Compare
There was a problem hiding this comment.
oops..this isn't right. The Connection field is a comma-separated list of tokens. And the "keep-alive" property depends not only on the value in the field but also the HTTP version. Fortunately, beast::http::message provides a member function to do the dirty work for you:
http://www.boost.org/doc/libs/master/libs/beast/doc/html/beast/ref/boost__beast__http__message/keep_alive/overload1.html
If keep_alive() returns true then the connection has keep-alive semantics. Otherwise, it has close semantics. You only need to track one bool instead of two.
There was a problem hiding this comment.
Consider using parser_type = beast::http::request_parser<beast::http::buffer_body> instead
cac0b64 to
bdc1425
Compare
|
@rzarzynski mind taking another look? passes all teuthology tests except for multisite (due to a defect with dynamic reconfiguration fixed separately in #18402) |
There was a problem hiding this comment.
You're bringing in websocket and zlib headers too, this could slow down your build by a tiny bit. You could instead write
#include <boost/beast/http.hpp>
Up to you
bdc1425 to
a555cc1
Compare
a555cc1 to
24055ab
Compare
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
the beast frontend no longer uses stackful coroutines, so these dependencies aren't necessary Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
24055ab to
5d7f154
Compare
|
Heads up: Version 125 and later of Beast will require Boost 1.66.0 (or the tip of the Boost master branch). Which means it will probably break your project until you upgrade to the 1.66.0. I have created a tag, v124 so you can pin your submodule to the latest version that doesn't require the newest Boost: |
|
thanks @vinniefalco! i'll take a look at pulling in v124 |
|
looks great! |
updates the Beast submodule to point at v116, which is the current master branch of https://github.com/boostorg/beast. our fork at https://github.com/ceph/beast/ has been updated to match
after updating the beast frontend, swift and s3tests are still passing