http/client: make abort_source passed to connection_factory::make() optional#2428
Closed
tchaikov wants to merge 1 commit intoscylladb:masterfrom
Closed
http/client: make abort_source passed to connection_factory::make() optional#2428tchaikov wants to merge 1 commit intoscylladb:masterfrom
abort_source passed to connection_factory::make() optional#2428tchaikov wants to merge 1 commit intoscylladb:masterfrom
Conversation
… optional in 35badf5, we added abortable `make_request()` API. and added an `abort_source` pointer to `connection_factory::make()`, but this broke the build of existing classes which inherit from `connection_factory`. as they don't implement a `make()` with this parameter: ``` In file included from /home/kefu/dev/scylladb/tools/scylla-nodetool.cc:52: /home/kefu/dev/scylladb/utils/http.hh:67:38: error: 'make' marked 'override' but does not override any member functions 67 | virtual future<connected_socket> make() override { | ^ In file included from /home/kefu/dev/scylladb/tools/scylla-nodetool.cc:11: In file included from /usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/chrono:49: In file included from /usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/shared_ptr.h:53: In file included from /usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/shared_ptr_base.h:59: /usr/lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/bits/unique_ptr.h:1076:34: error: allocating an object of abstract class type 'utils::http::dns_connection_factory' 1076 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } | ^ /home/kefu/dev/scylladb/tools/scylla-nodetool.cc:185:28: note: in instantiation of function template specialization 'std::make_unique<utils::http::dns_connection_factory, seastar::basic_sstring<char, unsigned int, 15> &, unsigned short &, bool, seastar::logger &>' requested here 185 | , _api_client(std::make_unique<utils::http::dns_connection_factory>(_host, _port, false, nlog), 1) | ^ /home/kefu/dev/scylladb/seastar/include/seastar/http/client.hh:155:38: note: unimplemented pure virtual method 'make' in 'dns_connection_factory' 155 | virtual future<connected_socket> make(abort_source*) = 0; | ^ ``` in this change, in order to fix the build, let's make this parameter optional. Refs 35badf5 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Contributor
Author
|
nah, this does address the problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in 35badf5, we added abortable
make_request()API. and added anabort_sourcepointer toconnection_factory::make(), but this broke the build of existing classes which inherit fromconnection_factory. as they don't implement amake()with this parameter:in this change, in order to fix the build, let's make this parameter optional.
Refs 35badf5
Signed-off-by: Kefu Chai kefu.chai@scylladb.com