Navigation Menu

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

45628143: Store fixity data when a datastream is created or modified #31

Merged
merged 1 commit into from Mar 7, 2013

Conversation

eddies
Copy link

@eddies eddies commented Mar 7, 2013

Uses org.modeshape.jcr.api.Binary for retrieving SHA-1 digests rather than calculating anew.
Also see: https://docs.jboss.org/author/display/MODE/Binary+values

I think this means we should give up the pretense that we support digest algorithms other than SHA-1,
which I'm ok with.

https://www.pivotaltracker.com/story/show/45628143

@cbeer
Copy link
Contributor

cbeer commented Mar 7, 2013

+1, if we're happy with just SHA-1s.

@cbeer
Copy link
Contributor

cbeer commented Mar 7, 2013

Oh, except:

Isn't it a little strange to put content on disk, and then go back to the disk and ask what the digest of that content is?

@ajs6f
Copy link
Contributor

ajs6f commented Mar 7, 2013

Only if you trust your disks implicitly. :)

@eddies
Copy link
Author

eddies commented Mar 7, 2013

Hmm. I figured if the request doesn't include a checksum, we can't guarantee that when we calculate the checksum the resource hasn't already been fouled. We may as well worry about flipped bits in RAM

@cbeer
Copy link
Contributor

cbeer commented Mar 7, 2013

Here's the other down-side.. if the content was quickly spooled off to disk (or, worse, a different node of the cluster), asking for ISPN for a checksum might be unnecessarily slow (I'm not sure how they calculate the hex digest though..)

@ajs6f
Copy link
Contributor

ajs6f commented Mar 7, 2013

So this is a checksum on transmission, and the asynchronous fixity service is responsible for checksumming persistence?

@cbeer
Copy link
Contributor

cbeer commented Mar 7, 2013

Sounds ok to use:

    /**
     * Get the hexadecimal form of the SHA-1 hash of the contents. This hash can be used to determine whether two Binary instances
     * contain the same content.
     * <p>
     * Repeatedly calling this method should generally be efficient, as it most implementations will compute the hash only once.
     * </p>
     * 

Uses org.modeshape.jcr.api.Binary for retrieving SHA-1 digests rather than calculating anew.
Also see: https://docs.jboss.org/author/display/MODE/Binary+values

I think this means we should give up the pretense that we support digest algorithms other than SHA-1,
which I'm ok with.

https://www.pivotaltracker.com/story/show/45628143
cbeer added a commit that referenced this pull request Mar 7, 2013
45628143: Store fixity data when a datastream is created or modified
@cbeer cbeer merged commit e8911df into master Mar 7, 2013
@cbeer cbeer deleted the 45628143 branch March 7, 2013 15:50
birkland pushed a commit to birkland/fcrepo4 that referenced this pull request Jul 22, 2016
decouple project.version from fcrepo.version
dbernstein pushed a commit that referenced this pull request Nov 16, 2022
Co-authored-by: Peter Winckles <peter.winckles@wisc.edu>
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

Successfully merging this pull request may close these issues.

None yet

3 participants