Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
BlockManagerWorker is accessed by multiple Task executor threads.
Map<String, CompletableFuture<ControlMessage.Message>> pendingBlockLocationRequest
is used to cache block location query requests.
pendingBlockLocationRequest.computeIfAbsent
is used to 'reuse' requests.
Although the code probably works correctly, it is not deterministic in the sense that one thread waiting for a reply from the master doesn't stop other threads from sending the same request.
Instead, we may want to use Guava cache to ensure that multiple threads are 100% blocked on the same request.