diff --git a/modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraNameSpaceProvider.java b/modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraNameSpaceProvider.java index 99bc3041452..30398a3659a 100644 --- a/modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraNameSpaceProvider.java +++ b/modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraNameSpaceProvider.java @@ -1190,15 +1190,21 @@ public FsPath createUploadPath(Subject subject, FsPath path, FsPath rootPath, * the upload directory. */ Map tags = Maps.newHashMap(parentOfPath.getTags()); + if (spaceToken != null) { + tags.put(TAG_WRITE_TOKEN, spaceToken.getBytes(Charsets.UTF_8)); + + /* If client provides space token to upload to, the access latency and + * retention policy tags of the upload directory must be disregarded. + */ + tags.remove(TAG_ACCESS_LATENCY); + tags.remove(TAG_RETENTION_POLICY); + } if (al != null) { tags.put(TAG_ACCESS_LATENCY, al.toString().getBytes(Charsets.UTF_8)); } if (rp != null) { tags.put(TAG_RETENTION_POLICY, rp.toString().getBytes(Charsets.UTF_8)); } - if (spaceToken != null) { - tags.put(TAG_WRITE_TOKEN, spaceToken.getBytes(Charsets.UTF_8)); - } if (size != null) { tags.put(TAG_EXPECTED_SIZE, size.toString().getBytes(Charsets.UTF_8)); }