-
Notifications
You must be signed in to change notification settings - Fork 43
Adds custom setup requests #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds custom setup requests #303
Conversation
|
Some notes
|
|
Thanks. We could perhaps also remove this that sets priority conditionally only if is a HELLO command. Looks like an unnecessary complication. |
We already have |
Removing the check breaks everything because the priority flag defaults to true in the constructor. Changing it to false is technically a breaking change. In the next PR I will deprecate the priority functions and remove all this in a subsequent release. |
I don't know to which extent these O(n) and O(nlogn) are comparable.
On the other hand, sorting price gets paid once per added request, rather than once per write. So there's a factor that this analysis is not considering. I think the multiplexer can be modified to use linked lists instead of a vector, and that would yield better efficiency. But I'd need to write the code and benchmark it to be sure, so I haven't done anything yet. In any case, I wouldn't pay this price, at least until some user asks for it. |
|
I think I've addressed all your comments. I've also done a general renaming removing "hello" and "handshake" in favor of "setup request". |
| namespace boost::redis::detail { | ||
|
|
||
| void setup_hello_request(config const& cfg, request& req) | ||
| void setup_hello_request(config& cfg, request& req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be renamed to set_request_priority.
|
Thanks. |
Adds config::setup and config::use_setup, to run arbitrary Redis commands on connection establishment
Improves docs for config::{username, password, clientname, database_index}
Splits all connection establishment tests into test_conn_hello
close #302