Skip to content

Commit

Permalink
pool: ensure that nfs mover completion takes place
Browse files Browse the repository at this point in the history
Motivation:
if for whatever reasons MoverChannel#close thows an unchecked exception, then NFS
mover will be left in 'CANCELED' state.

Modification:
Ensure that completed or failed of mover completion is called.

Result:
reduce possibility of stacked movers in "CANCELED" state.

Acked-by: Paul Millar
Target: master, 9.0, 8.2
Require-book: no
Require-notes: yes
  • Loading branch information
kofemann committed Mar 21, 2023
1 parent ec1ab13 commit c4c31e9
Showing 1 changed file with 7 additions and 6 deletions.
@@ -1,6 +1,6 @@
/* dCache - http://www.dcache.org/
*
* Copyright (C) 2013 - 2021 Deutsches Elektronen-Synchrotron
* Copyright (C) 2013 - 2023 Deutsches Elektronen-Synchrotron
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -112,11 +112,12 @@ void disable(Throwable error) {
getMoverChannel().close();
} catch (IOException e) {
_log.error("failed to close RAF {}", e.toString());
}
if (error == null) {
_completionHandler.completed(null, null);
} else {
_completionHandler.failed(error, null);
} finally {
if (error == null) {
_completionHandler.completed(null, null);
} else {
_completionHandler.failed(error, null);
}
}
}

Expand Down

0 comments on commit c4c31e9

Please sign in to comment.