Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing filename causes error #2041

Closed
taojing2002 opened this issue Dec 16, 2024 · 5 comments
Closed

Changing filename causes error #2041

taojing2002 opened this issue Dec 16, 2024 · 5 comments
Milestone

Comments

@taojing2002
Copy link
Contributor

Robyn reported the issue on dev.nceas, which is Metacat 3.1.0:

  1. make a new package with a data file, save it
  2. edit data package and rename the file, save and see error:
HashStore refs files already exist for pid resource_map_urn:uuid:58d3047d-40eb-44cc-88e2-56bff3f3283d and cid: 
8ed23f53022ab5a04687d63b2402e150e9312db3211029e559c269b4ad9a5c26
@taojing2002 taojing2002 added this to the 3.1.0 milestone Dec 16, 2024
@taojing2002
Copy link
Contributor Author

I looked at the tomcat log file and found:

StreamingMultipartRequestResolver.resoloveMulitpart - Metacat is handling the object stream AFTER handling the 
system metadata stream. StreamResolver will store the object with identifier
resource_map_urn:uuid:cdf928df-f5a2-49ac-bcfa-e79309c68930 , declared size 2957 and calculating checksum using
algorithm MD5 [edu.ucsb.nceas.metacat.restservice.multipart.StreamingMultipartRequestResolver:resolveMultipart:197]

The identifier of resource_map_urn:uuid:cdf928df-f5a2-49ac-bcfa-e79309c68930 is the original resource map. I am just wondering why MetacatUI sends the identifier again.

@doulikecookiedough
Copy link
Contributor

@taojing2002 The hashstore error described above occurs when HashStore stores a data object with a given pid with a data file that already exists (and is tagged appropriately).

It seems like when Robyn renames the data file, it attempts to re-store the same data object with the existing pid (and ultimately sees that everything exists where it should be).

Do you think this is an issue with how we handle re-naming of a data file? Should renaming a data file mean it has to be stored again...?

@taojing2002
Copy link
Contributor Author

@doulikecookiedough I looks like not related to hashstore. I tested the scenario on Metacat 2.19.1, which doesn't use hashstore and got the error:

The requested identifier resource_map_urn:uuid:a3caa3ce-5704-497d-aa6e-0c45cab5cacb is already used by another object andtherefore can not be used for this object. Clients should choosea new identifier that is unique and retry the operation or use CN.reserveIdentifier() to reserve one.

It seems MetacatUI reuses (uploads) the original resource map again to Metacat

@iannesbitt
Copy link

@robyngit Can we transfer this issue to NCEAS/MetacatUI?

@robyngit
Copy link
Member

Yes, already created a MetacatUI ticket here: NCEAS/metacatui#2590. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants