[BUG]ClusterNode Map clear problem.
Issue Description
bug report
Describe what happened (or what feature you want)
When I made CommonFilter support http method and test the function, I found the test case fail at:
After I have gone through the test code, I found the reason laid in here:
The code "ClusterBuilderSlot.getClusterNodeMap().clear()" clear all the cluster node in the global map of ClusterBuilderSlot class, but the specific cluster node hold by one ClusterBuilderSlot instance can not be clean. You can see the relationship here:
When the client try to access resource of the same name after clearing the cluster node map, the statistics can be accumulated but the node can not be added to the cluster node map any more because the cluster node is not null in the "IF" JUDGEMENT. So when get cluster node from map and assert is not null, that should fail.
Describe what you expected to happen
When the cluster node map got clean, the specific cluster node in one ClusterBuilderSlot should be clean either. One way to do this is add a volatile flag in cluster node to denote whether it should be clean or rebuild, and add the flag judge in ClusterBuilderSlot. However this makes cluster node more complex and hard to understand.