-
Notifications
You must be signed in to change notification settings - Fork 300
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
Redis standalone #822
base: develop
Are you sure you want to change the base?
Redis standalone #822
Conversation
std::vector<SentinelCommand> waiting_commands; | ||
|
||
{ | ||
const std::lock_guard<std::mutex> lock(command_mutex_); |
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.
@apolukhin А это тот код редиса, который на стандартных потоках, и тут нельзя использовать юсерверные мьютексы?
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.
да
@ae-ignatiev Hi! Could you please give some motivation for this changes, so it would be easier for (some of) us to understand what and why?
|
@v-for-vandal , hi
And yes, we can use Russian if it is ok here) |
I think it is better to implement not an SentinelImplBase derivative class but make some There is usage of ClusterTopologyHolder. |
This reverts commit 822ebc2.
@VyacheslavVanin , hi! Could you please take a look at updates? Is that approach you've mentioned? There is a doubt regarding method implementation SetConnectionInfo. As I understood calling this method and changing the connection params causes updating the nodes set and topology. Do not know whether it is applicable for a single node configuration or not. With empty method SetConnectionInfo implementation is easier but nodes configuration is completely static and can't be changed in runtime. |
std::tie(conn_to_create_.host, conn_to_create_.port) = new_conn.HostPort(); | ||
conn_to_create_.connection_security = new_conn.GetConnectionSecurity(); | ||
conn_to_create_.read_only = new_conn.IsReadOnly(); | ||
// conn_to_create_.password = ??? |
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.
Can we change type of conn_to_create_ to ConnectionInfoInt and just copy new_conn there?
It seems like there will be less conversions.
We will update password later. Let it be as is
@ae-ignatiev, hi! This method is called when secdist updates. And secdist contains hosts, ports and password, so it is applicable. I think we can leave password unchanged in SetConnectionInfo. We will fix this later |
Redis standalone implementation.
sharding_strategy
RedisStandalone
StandaloneImpl
of interfaceSentinelImplBase
. Based on cluster topology implementation without nodes discovery and singleClusterShard
shard instance only.redis_standalone
to run single redis instance. Plugin use the same approach and configs as in ya testsuite plugins to run redis and redis cluster: https://github.com/yandex/yandex-taxi-testsuite/tree/develop/testsuite/databases/redispubsub
integration_tests
that was not used. Use testcase there to run standalone version. Tests for cluster fail there, marked them as failing cases for now.Note: by creating a PR or an issue you automatically agree to the CLA. See CONTRIBUTING.md. Feel free to remove this note, the agreement holds.