Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#66 Error validating checksum when adding/updating M datastreams

Fedora 3.0b1
closed
E S
5
2008-09-15
2008-05-05
Bill Branan
No

This error was reported by Nishen Naidoo (nishen@melcoe.mq.edu.au). His original email and test code are included as attachments.

When calling addDatastream() or modifyDatastreamByReference() for a managed datastream, if valid checksumType and checksum parameters are included with the call the following error results:
"fedora.server.errors.ValidationException: Checksum Mismatch: ExceptionReadingStream"

The reason for the exception is that the Datastream.computeChecksum() call attempts to get the content stream by reading it from LLStore (see DatastreamManagedContent.getContentStream()), but the datastream is not actually written to LLStore until the final commit.

The question this raises is: Which comes first, the commit or the checksum check? If the checksum check needs to happen first the content stream needs to be read earlier so that the checksum computation can happen. If the commit comes first, then the commit may need to be backed out if the checksum check fails.

Discussion

  • Bill Branan
    Bill Branan
    2008-05-05

    Original error report from Nishen Naidoo

     
    Attachments
  • Bill Branan
    Bill Branan
    2008-05-05

    Logged In: YES
    user_id=1987639
    Originator: YES

    File Added: test-code.txt

     
  • Bill Branan
    Bill Branan
    2008-05-05

    Test code submitted by Nishen Naidoo

     
    Attachments
  • E S
    E S
    2008-06-28

    • assigned_to: nobody --> pangloss
     
  • fcswa
    fcswa
    2008-09-15

    • status: open --> closed