From 6a0fc40794bf37c0052f17ae2a9564af4cf638af Mon Sep 17 00:00:00 2001 From: Gerd Behrmann Date: Mon, 11 Nov 2013 11:26:23 +0100 Subject: [PATCH] spacemanager: Fix S2 usecase.CheckGarbageSpaceCollector regression S2 insists that a space expires immediately as soon as its lifetime has passed. This conflicts with the lazy expiration implemented by the spacemanager. The SRM used to have a workaround for this, but that workaround was recently removed. This patch adds a check to space manager that will report the state as expired once the lifetime has been exceeded. Target: trunk Request: 2.7 Require-notes: no Require-book: no Acked-by: Paul Millar Patch: http://rb.dcache.org/r/6227/ --- .../diskCacheV111/services/space/Manager.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/dcache/src/main/java/diskCacheV111/services/space/Manager.java b/modules/dcache/src/main/java/diskCacheV111/services/space/Manager.java index 5b6f265ef45..cfea2efd5fa 100644 --- a/modules/dcache/src/main/java/diskCacheV111/services/space/Manager.java +++ b/modules/dcache/src/main/java/diskCacheV111/services/space/Manager.java @@ -4755,14 +4755,26 @@ public void getSpaceMetaData(GetSpaceMetaData gsmd) throws Exception{ } Space[] spaces = new Space[tokens.length]; for(int i=0;i -1 && expirationTime - System.currentTimeMillis() <= 0) { + space.setState(SpaceState.EXPIRED); + } + } } catch(Exception e) { logger.error("failed to find space {}: {}", tokens[i], e.getMessage()); - spaces[i]= null; } + spaces[i] = space; } gsmd.setSpaces(spaces); }