Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10766 (closed)

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

Allow change of checksum algorithm

Reported by: mtbcarroll Owned by: mtbcarroll
Priority: major Milestone: 5.1.0-m1
Component: OmeroFs Version: 5.0.2
Keywords: n.a. Cc: fs@…, sbesson
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description

Once a checksum algorithm has been chosen for a file stored in the managed repository, there should be a mechanism for changing it: a server API method could re-checksum by the new and the old, make sure the old matches, then update the original file to the new. This method should be quite easy to provide.

Change History (8)

comment:1 Changed 10 years ago by mtbcarroll

This becomes more important once users are doing in-place import with a trivial checksum algorithm, if we ever run a background job that re-checks the hashes.

comment:2 Changed 10 years ago by jamoore

  • Cc sbesson added
  • Milestone changed from 5.x to 5.1.0-m1
  • Priority changed from minor to major
  • Version set to 5.0.2

Agreed. Can definitely see a bin/omero fs checksum command to use this!

comment:3 Changed 10 years ago by mtbcarroll

  • Status changed from new to accepted

comment:4 Changed 10 years ago by mtbcarroll

The managed repository method to do this must query and change the hasher and hash properties on original files. From the method, is there an easy way to use IQuery and IUpdate within an adequate session / transactional context, or would it be best to simply add what I need through RepositoryDao and SqlAction?

comment:5 Changed 10 years ago by jamoore

A method which takes a Ice.Current and initiates an Executor.Work action would give you the ability to use IQuery and IUpdate in a single transaction. But a SqlAction would also be ok. (I did wonder if we should start splitting up the SqlAction's a la getSqlAction().getFsActions().updateHashers(ids, hashes, hashers).)

Last edited 10 years ago by jamoore (previous) (diff)

comment:6 Changed 10 years ago by mtbcarroll

Thank you, that was helpful. Fixed by https://github.com/openmicroscopy/openmicroscopy/pull/2884.

comment:7 Changed 10 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:8 Changed 10 years ago by jean-marie burel <j.burel@…>

  • Remaining Time set to 0

(In [9437433155b6ef3e4d3f507f3fbb562294253509/ome.git] on branch develop) Merge pull request #2884 from mtbc/trac-10766-change-hasher

fix #10766: add API method for changing original files' hasher

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69019 sec.)

We're Hiring!