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

verifyObject Signature Update #124

Closed
doulikecookiedough opened this issue Jul 10, 2024 · 2 comments
Closed

verifyObject Signature Update #124

doulikecookiedough opened this issue Jul 10, 2024 · 2 comments

Comments

@doulikecookiedough
Copy link
Contributor

Implement the equivalent HashStore-java issue

When a client calls storeObject(InputStream stream), a data object is stored immediately with its content identifier. Then later, when the client calls verifyObject to confirm the metadata/checksums after they've received it and there is a mismatch, there is no easy way to remove the data object that was stored.

To assist with the clean-up process, we will add a new boolean argument to the signature of verifyObject, deleteInvalidObject.

public void verifyObject(
    ObjectMetadata objectInfo, String checksum, String checksumAlgorithm, long objSize, boolean deleteInvalidObject
)

When this is set to true, HashStore will attempt to delete the data object associated with the given ObjectMetadata and then throw an exception. Otherwise, it will only throw an exception.

Additional ToDo:

  • Ensure HashStore interface return value for verifyObject is accurate/descriptive
@doulikecookiedough
Copy link
Contributor Author

doulikecookiedough commented Jul 17, 2024

The signature does not need to be updated, but the method name does: verifyObject to deleteIfInvalidObject

@doulikecookiedough
Copy link
Contributor Author

This has been completed via Feature-124: verify_object Update

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

1 participant