HBASE-28567 Race condition causes MetaRegionLocationCache to never se…#5874
HBASE-28567 Race condition causes MetaRegionLocationCache to never se…#5874Apache9 merged 1 commit intoapache:masterfrom
Conversation
|
I think we should change the logic in MetaRegionLocationCache instead of in ZKWatcher? |
|
Sure but right now the problem is
So seems like we might need to change |
|
I agree, we will need to change ZKWatcher one way or another, and currently this is the only caller |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
It is just a bit strange that in ZKUtil we eat the NoNodeException while at the upper layer we create a new NoNodeException and throw it... Better just return null in ZKWatcher, and in MetaRegionLocationCache, we do not break the loop if the return value is null. WDYT? Thanks. |
We need to retry in the case of race condition, that's the main difference from |
|
Oh, I see you are talking about breaking this loop: Yeah that might also work. |
I think the original author of But happy to change |
|
Btw just in case if we end up updating |
|
I am in favor of keeping patch like this, so that we don't have to keep calling listChildren until |
I need to figure out that what we have fixed here is that we should keep calling listChildren util |
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java
Show resolved
Hide resolved
|
Let me attempt to summarize the cases:
|
…t watcher to populate meta location
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
…t watcher to populate meta location (apache#5874) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…t watcher to populate meta location