Skip to content

Commit

Permalink
nfs: use noitify instead of blocking sendAndWait when
Browse files Browse the repository at this point in the history
         sending pin/unpin messages via touch ".(get)(<file_name>)(pin)"
         command

    Motivation:

    A call to pin a file, which in may result in triggering stage of file from
    tape should not block nfs client.

    Modification:

    Replace  sendAndWait() call with notify() calls in DCacheAwareJdbcFs
    when sending pin/unpin messages to PinManager

    Result:

    client call :

	touch ".(get)(<file_name>)(pin)"

    is non-blocking

    Target: trunk
    Request: 2.14
    Request: 2.13
    Request: 2.12
    Acked-by: Albert Rossi <arossi@fnal.gov>
    Acked-by: Gerd Behrmann <behrmann@gmail.com>
    Patch: https://rb.dcache.org/r/8987/
  • Loading branch information
DmitryLitvintsev committed Feb 4, 2016
1 parent 7b69b49 commit 3eab402
Showing 1 changed file with 2 additions and 10 deletions.
Expand Up @@ -139,11 +139,7 @@ public void pin(String pnfsid, long lifetime) throws ChimeraFsException {
PinManagerPinMessage message
= new PinManagerPinMessage(attributes, protocolInfo, null, lifetime);

try {
pinManagerStub.sendAndWait(message);
} catch (CacheException | InterruptedException t) {
throw new ChimeraFsException("pin", t);
}
pinManagerStub.notify(message);
}

/**
Expand All @@ -155,11 +151,7 @@ public void unpin(String pnfsid) throws ChimeraFsException {
PinManagerUnpinMessage message
= new PinManagerUnpinMessage(new PnfsId(pnfsid));

try {
pinManagerStub.sendAndWait(message);
} catch (CacheException | InterruptedException t) {
throw new ChimeraFsException("unpin", t);
}
pinManagerStub.notify(message);
}

/**
Expand Down

0 comments on commit 3eab402

Please sign in to comment.