Skip to content

Commit

Permalink
srmspacemanager: catch and ignore SQL exception on error handling pa…
Browse files Browse the repository at this point in the history
…th when processing PoolMgrSelectWritePool on reply from PoolManager

    In the previous version of selectPool the srmspace file has always been
    defined (even if it had no pnfsid associdated). Recent changes introduced
    better separation of handling messages to PoolManager and from PoolManager.
    In case of reply only error handling part is needed (nullify pnfsid of
    srmspacefile record).

    This patch basically implements this: "If file does not have pnfsid, there is no need to nullify it"

    Ticket: 8087
    Patch: https://rb.dcache.org/r/6210
    Acked-by: Gerd Behrmann
    Target: trunk
    Request: 2.7
    Require-book: no
    Require-notes: no
  • Loading branch information
DmitryLitvintsev committed Nov 6, 2013
1 parent 71514a4 commit 5190748
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -4641,7 +4641,12 @@ public void selectPool(CellMessage envelope,
*
*/
if (selectWritePool.getReturnCode()!=0) {
file = getFile(pnfsId);
try {
file = getFile(pnfsId);
} catch(SQLException ignored) {
logger.trace(ignored.getMessage());
return;
}
Connection connection = null;
try {
connection = connection_pool.getConnection();
Expand All @@ -4652,7 +4657,7 @@ public void selectPool(CellMessage envelope,
connection = null;
}
catch(SQLException sqle) {
logger.error("failed to remove file {}: {}",
logger.error("Failed to nullify pnfsid of file {}: {}",
file, sqle.getMessage());
if (connection!=null) {
try {
Expand All @@ -4672,7 +4677,6 @@ public void selectPool(CellMessage envelope,
}
}


private void forwardToPoolManager(CellMessage cellMessage)
{
logger.trace("just forwarding the message to {}", poolManagerStub.getDestinationPath());
Expand Down

0 comments on commit 5190748

Please sign in to comment.