IQSS / IQSS/dataverse

computeDataFileHashValue returns success when datafile not present

Open
#8,330 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

What steps does it take to reproduce the issue?

call the computeDataFileHashValue API against a datafile which isn't present on storage.

  • When does this issue occur?

when the datafile is missing

  • Which page(s) does it occurs on?

the computeDataFileHashValue API endpoint

  • What happens?

{"status":"OK","data":{"message":"Datafile rehashing complete. 86298 successfully rehashed. New hash value is: "}}

but server.log sez

edu.harvard.iq.dataverse.api.DownloadInstanceWriter
Datafile 86298: Failed to locate and/or open physical file. Error message: Failed to open local file file:///usr/local/dvn/data/10.5072/FK2/2WOH5X/17e264aecb9-daa13e53b966
edu.harvard.iq.dataverse.api.Admin
Unexpected Exception: Failed to open local file file:///usr/local/dvn/data/10.5072/FK2/2WOH5X/17e264aecb9-daa13e53b966

This happens on S3 as well.

  • To whom does it occur (all users, curators, superusers)?

Must be a superuser to call computeDataFileHashValue

  • What did you expect to happen?

A status of "not OK."

Which version of Dataverse are you using?

5.3, 5.9

Any related open or closed issues to this bug report?

no(?) but I bet Phil will know better.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through the computeDataFileHashValue API endpoint with a missing datafile, then compare its response with the related server.log errors from DownloadInstanceWriter and Admin. Done means a missing local or S3 datafile produces a not-OK status instead of reporting successful rehashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.