-
Notifications
You must be signed in to change notification settings - Fork 82
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
是否支持slave宕机转向Master呢? #32
Comments
控制线程结束略麻烦. 反正已经 ctrl-c 了, 挂了就挂了吧 ╮(╯▽╰)╭ |
(⊙o⊙) |
当read_slave yes时,如果slave宕机,会转向master吗?转向master一小段时间后,slave恢复了,能再转回来吗? |
会啊, 但是 slave 重新上线了不会再自动转回来. 可以手动发一个 |
嗯。当一个Node宕机时,会创建n个SlotsMapUpdator连接,都发cluster nodes命令重新获取槽分配,这种策略是必须这样还是为了方便起见呢?因为感觉只要连上一个发cluster nodes就行,干嘛要连这么多个,毕竟连了之后又会很快析构掉 |
只选一个 updater 的话, 有可能恰好这个节点挂了或者这个节点从集群里退出了. |
如果proxy thread数目较大,则一旦有node宕机,就会造成每个proxy线程都在做update操作,感觉有点耗资源呢。如果把Update slot功能放到一个单独的线程或临时的进程里,而proxy线程共享一static SlotMap,这样是否会好些呢?可能增加了锁的开销,不过好像也只需在发生failover时才加锁,其他时候各线程都是在读 |
gdb 日志:
个人认为由cerb_global::all_threads是全局变量所致,ctrl+c导致exit被调用, vector调用析构,而此时线程并未结束。建议将all_threads存储ListenThread指针而非ListenThread对象,当然也可去掉捕获SIGINT信号以消除此dump. 作者以为如何?
The text was updated successfully, but these errors were encountered: