diff --git a/modules/dcache/src/main/java/diskCacheV111/vehicles/PoolMgrSelectReadPoolMsg.java b/modules/dcache/src/main/java/diskCacheV111/vehicles/PoolMgrSelectReadPoolMsg.java index 0e413ffa335..859598bd199 100644 --- a/modules/dcache/src/main/java/diskCacheV111/vehicles/PoolMgrSelectReadPoolMsg.java +++ b/modules/dcache/src/main/java/diskCacheV111/vehicles/PoolMgrSelectReadPoolMsg.java @@ -10,8 +10,6 @@ import static org.dcache.namespace.FileAttribute.HSM; import static org.dcache.namespace.FileAttribute.LOCATIONS; import static org.dcache.namespace.FileAttribute.PNFSID; -import static org.dcache.namespace.FileAttribute.QOS_POLICY; -import static org.dcache.namespace.FileAttribute.QOS_STATE; import static org.dcache.namespace.FileAttribute.RETENTION_POLICY; import static org.dcache.namespace.FileAttribute.SIZE; import static org.dcache.namespace.FileAttribute.STORAGECLASS; @@ -52,7 +50,7 @@ public class PoolMgrSelectReadPoolMsg extends PoolMgrSelectPoolMsg { private static final EnumSet REQUIRED_ATTRIBUTES = EnumSet.of(PNFSID, STORAGEINFO, STORAGECLASS, CACHECLASS, HSM, LOCATIONS, SIZE, - ACCESS_LATENCY, RETENTION_POLICY, QOS_POLICY, QOS_STATE); + ACCESS_LATENCY, RETENTION_POLICY); private static final long serialVersionUID = -2126253028981131441L; diff --git a/modules/dcache/src/main/java/org/dcache/util/Transfer.java b/modules/dcache/src/main/java/org/dcache/util/Transfer.java index 81ac0288908..9827f31c811 100644 --- a/modules/dcache/src/main/java/org/dcache/util/Transfer.java +++ b/modules/dcache/src/main/java/org/dcache/util/Transfer.java @@ -9,6 +9,8 @@ import static java.util.Objects.requireNonNull; import static org.dcache.namespace.FileAttribute.CREATION_TIME; import static org.dcache.namespace.FileAttribute.PNFSID; +import static org.dcache.namespace.FileAttribute.QOS_POLICY; +import static org.dcache.namespace.FileAttribute.QOS_STATE; import static org.dcache.namespace.FileAttribute.SIZE; import static org.dcache.namespace.FileAttribute.STORAGEINFO; import static org.dcache.namespace.FileAttribute.TYPE; @@ -63,7 +65,6 @@ import java.time.Duration; import java.util.Collections; import java.util.EnumSet; -import java.util.HashSet; import java.util.List; import java.util.OptionalLong; import java.util.Set; @@ -103,6 +104,9 @@ public class Transfer implements Comparable { private static final BaseEncoding SESSION_ENCODING = BaseEncoding.base64().omitPadding(); + private static final EnumSet QOS_ATTRIBUTES = + EnumSet.of(QOS_POLICY, QOS_STATE); + protected final PnfsHandler _pnfs; /** @@ -751,6 +755,7 @@ private ListenableFuture readNameSpaceEntryAsync(boolean allowWrite, long attr.addAll(PoolMgrSelectReadPoolMsg.getRequiredAttributes()); Set mask; if (allowWrite) { + attr.addAll(QOS_ATTRIBUTES); mask = EnumSet.of(AccessMask.READ_DATA, AccessMask.WRITE_DATA); } else { mask = EnumSet.of(AccessMask.READ_DATA);