Skip to content

Commit

Permalink
dcap: restart pool selection on OUT-OF-DATE error
Browse files Browse the repository at this point in the history
Motivation:
As pool selection is a probabilistic, two write transfers might hit the
same pool. If there are no sufficient space, pool will reject to start a
mover with OUT-OF-DATE error. Though, this is a transient error and a new
pool can be selected, dcap door propagates error to the client application.

Modification:
Threat OUT-OF-DATE as a transient error and restart pool selection.

Result:
dcap door can handle out-of-date errors

Acked-by: Marina Sahakyan
Target: master, 6.0, 5.2, 5.1, 4.2
Require-book: no
Require-notes: yes
(cherry picked from commit 87ae552)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann committed Oct 1, 2019
1 parent 291213c commit 2807958
Showing 1 changed file with 18 additions and 16 deletions.
Expand Up @@ -2194,24 +2194,26 @@ private void storeChecksumInPnfs( PnfsId pnfsId , String checksumString){
poolIoFileArrived( PoolIoFileMessage reply ){

_log.debug("poolIoFileArrived : {}", reply);
if( reply.getReturnCode() != 0 ){
// bad entry in cacheInfo and pool Manager did not check it ( for performance reason )
// try again
if (reply.getReturnCode() == CacheException.FILE_NOT_IN_REPOSITORY) {
switch (reply.getReturnCode()) {
case 0:
_moverId = reply.getMoverId();
//
// nothing to do here ( we are still waiting for
// doorTransferFinished )
//
setStatus("WaitingForDoorTransferOk");
break;
case CacheException.FILE_NOT_IN_REPOSITORY:
// fallthrough
case CacheException.OUT_OF_DATE:
// transient errors
_log.warn("Retry on transient error: {}", reply.getReturnCode());
again(true);
return;
}

sendReply("poolIoFileArrived", reply);
removeUs();
return;
break;
default:
sendReply("poolIoFileArrived", reply);
removeUs();
}
_moverId = reply.getMoverId();
//
// nothing to do here ( we are still waiting for
// doorTransferFinished )
//
setStatus( "WaitingForDoorTransferOk" ) ;
}

public void poolPassiveIoFileMessage( PoolPassiveIoFileMessage<byte[]> reply) {
Expand Down

0 comments on commit 2807958

Please sign in to comment.