[
https://issues.apache.org/jira/browse/HDDS-13448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-13448:
----------------------------------
Labels: pull-request-available (was: )
> DeleteBlocksCommandHandler thread stop for normal exception
> -----------------------------------------------------------
>
> Key: HDDS-13448
> URL: https://issues.apache.org/jira/browse/HDDS-13448
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Sumit Agrawal
> Assignee: Sumit Agrawal
> Priority: Major
> Labels: pull-request-available
>
> In DeleteBlocksCommandHandler which handling result,
> * if db update have some exception, its converted to interrupt the thread
> running, so its not able to process any further delete block operation.
> {code:java}
> public void handleTasksResults(
> List<Future<DeleteBlockTransactionExecutionResult>> futures,
> Consumer<DeleteBlockTransactionExecutionResult> handler) {
> futures.forEach(f -> {
> try {
> DeleteBlockTransactionExecutionResult result = f.get();
> handler.accept(result);
> } catch (InterruptedException | ExecutionException e) {
> LOG.error("task failed.", e);
> Thread.currentThread().interrupt();
> }
> });
> } {code}
> As fix, need catch InterruptedException and ExecutionException separately.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]