-
Notifications
You must be signed in to change notification settings - Fork 535
Description
Dataverse Version: v. 4.9.4 build 1058-57b3b7e
The following line seems to be failing (SwiftAccessIO.java, line 428):
while ((victims = this.swiftContainer.list(this.swiftFileObject.getName()+".", lastVictim, LIST_PAGE_LIMIT))!= null && victims.size() > 0) {
From my understanding, swiftContainer.list() causes joss to throw an exception due to a malformed request. Checking our Swift log, we got a request in the form:
https://SWIFT_URL/v1/AUTH_TENANT_TOKEN/doi-10-1234-DM2/SZJXID?prefix=1673798809a-21f68803badb.&limit=100&format=json
Note: SZJXID is our pseudo-hierarchical folder.
However, according to the OpenStack Swift documentation, queries inside pseudo-hierarchical folders need to occur inside the prefix (e.g. https://SWIFT_URL/v1/AUTH_TENANT_TOKEN/doi-10-1234-DM2?prefix=SZJXID/1673798809a-21f68803badb.&limit=100&format=json).
There seems to be some disagreement in SwiftAccessIO.java. When writing an object to Swift, the identifier for file storage (e.g. SZJXID) is saved as a part of the object, in the form of a pseudo-hierarchical folder. However, when recorded to the dvObject identifier, this pseudo-hierarchical folder is recorded as part of the container in the form of swift://endpoint1:doi-10-1234-DM2/SZJXID:1673798809a-21f68803badb (this takes place in SwiftAccessIO.java, line 531).
Manually changing the dvObject storageidentifier from e.g. swift://endpoint1:doi-10-1234-DM2/SZJXID:1673798809a-21f68803badb to swift://endpoint1:doi-10-1234-DM2:SZJXID/1673798809a-21f68803badb led to a successful run of deleteAllAuxObjects().
My proposed solution is to change SwiftAccessIO.java, line 522-531) so that the dvObject storageidentifier is formed in such a way that owner.getIdentifierForFileStorage() is added to swiftFileName instead.
Please let me know if there is some configuration setting to avoid this error. We have combed through swift.properties and domain.xml and did not find anything related to this.