Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Detect incomplete or corrupted downloaded files #980

Copy link
Copy link

Description

@aalhossary
Issue body actions
  • It is quite often when a file is being downloaded that it downloads incomplete or corrupted; which could lead to unexpected potential problems.

  • I propose to create one (or two) files beside the target file target.ext, named target.ext.size (and target.ext.sha).

  • When we need to parse a file, we currently check its presence (e.g. in ScopInstallation.ensureClaInstalled() for SCPR classification DB file). In my proposal, we do not only check for its presence, but also for its size +/- its hash code.

  1. HashCode: Some web folders publish the HashCode along with the download file itself. If not, we ignore the hash code :(.
  2. Size: We can issue a HEADER request before the GET or POST call that downloads the file itself, extract the size, and save it.
  • The four functions to store/check size/hash can be implemented centrally in a separate location (most probably in BioJava-core) as public static methods and called only at the respective use places.

  • This way, we hopefully will not modify in the current code a lot: just adding one (or two) lines to call storeSize(), and storeHash() at the file download location and checkSize() +/- checkHash() method from within the ensureXXXInstalled() functions.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

enhancementImprovement of existing code or methodImprovement of existing code or method

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.