FSNamesystem.addSafeBlocks can creat deadlock when called in BlockManager.addStoredBlockImmediateTX

Description

FSNamesystem.addSafeBlocks is using the slicer to add the safe blocks to the database. This is done to avoid trying to add too many blocks at once in a transaction as we may add all the block of a data node to safe at once.
The problem is that this function is also called in addStoredBlockImmediateTX which is itself called in a callable object. As both the slicer and the callable calling addStoredBlockImmediateTX are using the same thread pool we may end up with a deadlock where no thread is available to run the slicer.

Status

Assignee

Gautier Berthou

Reporter

Gautier Berthou

Labels

Fix versions

Priority

Highest