Commit 7b8438ba authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Avoid querying the catalogue in a few more places

parent 82b60713
......@@ -882,9 +882,7 @@ public class GUID implements Comparable<GUID>, CatalogEntity {
db.setReadOnly(true);
db.query("SELECT distinct lfnRef FROM G" + tablename + "L_REF WHERE guidId=?;", false, Integer.valueOf(guidId));
if (!db.moveNext())
if (!db.query("SELECT distinct lfnRef FROM G" + tablename + "L_REF WHERE guidId=?;", false, Integer.valueOf(guidId)) || !db.moveNext())
return null;
lfnCache = new LinkedHashSet<>();
......
......@@ -317,7 +317,7 @@ public class XrootDEnvelope implements Serializable {
final GUID guid = pfn.getGuid();
final Set<LFN> lfns = guid.getLFNs();
final Set<LFN> lfns = guid.getLFNs(false);
String ret = "<authz>\n <file>\n" + " <access>" + access + "</access>\n";
......@@ -390,7 +390,7 @@ public class XrootDEnvelope implements Serializable {
if (se.seName.indexOf("DCACHE") > 0) {
final GUID guid = pfn.getGuid();
final Set<LFN> lfns = guid.getLFNs();
final Set<LFN> lfns = guid.getLFNs(true);
if (lfns != null && lfns.size() > 0)
turl = se.seioDaemons + "/" + lfns.iterator().next().getCanonicalName();
......
......@@ -120,7 +120,7 @@ public abstract class Protocol implements Serializable, Comparable<Protocol>, Cl
return false;
}
else {
final Set<LFN> knownLFNs = guid.getLFNs();
final Set<LFN> knownLFNs = guid.getLFNs(true);
if (knownLFNs != null)
for (final LFN lfn : knownLFNs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment