-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-27093 AsyncNonMetaRegionLocator:put Complete CompletableFuture … #4496
Conversation
…outside lock block
Mind provide some deadlock scenarios? |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Thank you for attention. @Apache9
In getResult(), the order of lock is lock.lock() -> tableCache.lock(). But when the regionLocation response have exception, future.completeExceptionally(err) will trigger this future's handle action, and the order of lock is tableCache.lock() -> lock.lock(). So it will cause deadlock. Of course we can solve this problem by isolating threads, using handleAsync(xxxx, executor), but I think we can also avoid this in HBase client. |
OK, typical usage, sound reasonable. |
…outside lock block (#4496) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 176c43c)
…outside lock block (#4496) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 176c43c)
…outside lock block (#4496) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 176c43c)
…outside lock block (apache#4496) Signed-off-by: Duo Zhang <[email protected]>
…eFuture outside lock block (apache#4496)" This reverts commit 1e5147a.
…outside lock block (apache#4496) Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 176c43c) Change-Id: I4998fe348c86c6b0401f99bfe27bdaeb7ca21698
…outside lock block