xuxueli / xxl-conf

A lightweight distributed configuration management platform. (分布式配置管理平台XXL-CONF)
http://www.xuxueli.com/xxl-conf/
GNU General Public License v3.0
666 stars 371 forks source link

请问为什么在set配置的时候中断线程呢 #70

Open ciphermagic opened 5 years ago

ciphermagic commented 5 years ago

https://github.com/xuxueli/xxl-conf/blob/2b4310e49809b7c9e27c57fd7493c2013d562e5f/xxl-conf-core/src/main/java/com/xxl/conf/core/core/XxlConfLocalCacheConf.java#L184

你好,请问为什么在set配置的时候中断线程呢?

chgang commented 5 years ago

xxl-conf/xxl-conf-core/src/main/java/com/xxl/conf/core/core/XxlConfLocalCacheConf.java

Line 184 in 2b4310e

refreshThread.interrupt(); 你好,请问为什么在set配置的时候中断线程呢? 你好,你有答案了吗,不会只是为了少刷新一次配置这么简单吧

ciphermagic commented 5 years ago

xxl-conf/xxl-conf-core/src/main/java/com/xxl/conf/core/core/XxlConfLocalCacheConf.java Line 184 in 2b4310e refreshThread.interrupt(); 你好,请问为什么在set配置的时候中断线程呢? 你好,你有答案了吗,不会只是为了少刷新一次配置这么简单吧

没有答案。。。

xuxueli commented 5 years ago

你好,refreshThread 内部通过minitor实时监听配置变更,但是只会监听LocalCache中存在的key列表。 当出现 SET 操作时,说明LocalCache中出现的新配置,但是该新配置key并没有纳入monitor实时监听,因此需要中断线程,从而重新monitor全量的key列表。

chgang commented 5 years ago

你好,refreshThread 内部通过minitor实时监听配置变更,但是只会监听LocalCache中存在的key列表。 当出现 SET 操作时,说明LocalCache中出现的新配置,但是该新配置key并没有纳入monitor实时监听,因此需要中断线程,从而重新monitor全量的key列表。

雪里,你好,那应该是在33秒之内不会监控,下次监控应该会监控到吧?

ciphermagic commented 5 years ago

你好,refreshThread 内部通过minitor实时监听配置变更,但是只会监听LocalCache中存在的key列表。 当出现 SET 操作时,说明LocalCache中出现的新配置,但是该新配置key并没有纳入monitor实时监听,因此需要中断线程,从而重新monitor全量的key列表。

refreshThread中断后,还会再次发起minitor么?refreshCacheAndMirror就是在refreshThread里头的

mars-men commented 4 years ago

你好,refreshThread 内部通过minitor实时监听配置变更,但是只会监听LocalCache中存在的key列表。 当出现 SET 操作时,说明LocalCache中出现的新配置,但是该新配置key并没有纳入monitor实时监听,因此需要中断线程,从而重新monitor全量的key列表。

refreshThread中断后,还会再次发起minitor么?refreshCacheAndMirror就是在refreshThread里头的

并没有看到重新发起monitor全量key的地方