[08/02/21 10:21:37:185 CST] main INFO consumer.Consumer: [DUBBO] ROUND=1, result=Hello world, response from provider: 192.168.3.41:20881, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:38:194 CST] main INFO monitor.OopsMonitor: [DUBBO] Oops~collect:ROUND=2, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:38:194 CST] main INFO consumer.Consumer: [DUBBO] ROUND=2, result=Hello world, response from provider: 192.168.3.41:20881, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:39:201 CST] main INFO monitor.OopsMonitor: [DUBBO] Oops~collect:ROUND=3, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:39:201 CST] main INFO consumer.Consumer: [DUBBO] ROUND=3, result=Hello world, response from provider: 192.168.3.41:20881, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:40:208 CST] main INFO monitor.OopsMonitor: [DUBBO] Oops~collect:ROUND=4, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:40:208 CST] main INFO consumer.Consumer: [DUBBO] ROUND=4, result=Hello world, response from provider: 192.168.3.41:20881, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:41:212 CST] main INFO monitor.OopsMonitor: [DUBBO] Oops~collect:ROUND=5, dubbo version: 2.7.8, current host: 192.168.3.41
[08/02/21 10:21:41:212 CST] main INFO consumer.Consumer: [DUBBO] ROUND=5, result=Hello world, response from provider: 192.168.3.41:20881, dubbo version: 2.7.8, current host: 192.168.3.41
Environment
Steps to reproduce this issue
Reproduce this issue:
https://github.com/zhangyz-hd/dubbo-issues/tree/main/7181
Reason:
AbstractMonitorFactory#createMonitor() is executed asynchronously, so AbstractMonitorFactory#getMonitor() always return null for the first time.
Consumer Log: