Implemented read-write separation based on JedisSentineled
Implemented read-write separation based on JedisSentineled
@ggivo OK, I modified the submitted code, please review it again
@ggivo The majority opinion has been revised, but there are some situations regarding sdown/odown events that may need to remain as is.
@ggivo The majority opinion has been revised, but there are some situations regarding sdown/odown events that may need to remain as is.
Sorry for the late reply. I will take a look at it until the end of the week.
Hi @koleter I know you put a lot of effort in this PR, but we doing some internal improvements that affect your work. See https://github.com/redis/jedis/pull/4332/commits/acb6cfde74bb5f9fcfeb763e4eb605e8e78f6272 for more details.
@uglide @ggivo Should I keep the existing logic or use CommandFlag?
Should I keep the existing logic or use CommandFlag?
IMO, using CommandFlags for distinguishing the read-only commands makes sense, but probably we need to come up with a solution for how to handle also sub-command flags. @koleter @uglide thoughts/suggestions?
@ggivo Perhaps I could start with CommandFlags and, like Lettuce, provide a user-configurable function hook for distinguishing read-only commands. The way subcommand flags are handled can be extended later on top of CommandFlags.
@koleter We have just updated the CommandFlags to support also sub-commands, you can take a look and let me know if this works for your use case also.
like Lettuce, provide a user-configurable function hook for distinguishing read-only commands.
I was also thinking it might be beneficial to have a user defined hook. Similar to Lettuce we can use CommandFlags as source of info for readonly commands for default isReadOnly check, but users can provide their own. If you mean the same.
@ggivo Running the test cases is taking too long. Could you please check if the current modifications are feasible?
@koleter Hey, thanks for moving this forward. We are a bit stretched currently, wrapping up some work 8.4 release, will do my best to provide feedback early next week