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 #1501 (closed)

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

RawFileStore et al. should keep size in sync

Reported by: jamoore Owned by:
Priority: critical Milestone: OMERO-Beta4.2
Component: General Version: 3.0-M1
Keywords: n.a. Cc: jburel, cxallan, cblackburn
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by jmoore)

I had an interesting problem while working on the scripting engine: I attempt to hack a file under /OMERO/Files leaving it a bit larger than the size in the table. This caused all downloads to fail, since the length was taken from the database.

We should probably include some sanity checks in preparation for multiple repositories.

Possibilities:

  • on setFileId check the the size and timestamp for discrepancies

Change History (13)

comment:1 Changed 13 years ago by cxallan

  • Priority changed from minor to critical

comment:2 Changed 13 years ago by jmoore

#1961 contains a portion of this, specifically for script param integration.

comment:3 Changed 13 years ago by jmoore

  • Sprint set to 2010-04-02 (6)

See #2095

comment:4 Changed 13 years ago by jmoore

  • Remaining Time set to 0.25

comment:5 Changed 12 years ago by jmoore

  • Status changed from new to assigned

comment:6 Changed 12 years ago by jmoore

(In [6568]) fix #1961, see #1501 - Adding save to RFS.close

This commit checks both the size and the sha1 of
file objects on RawFileStore.close(). This
adds an EventLog and therefore kicks off indexing
(see #2098)

comment:7 Changed 12 years ago by jmoore

  • Cc cblackburn added
  • Description modified (diff)

comment:8 Changed 12 years ago by jmoore

(In [6602]) fix #2161 - adding RFS.save (see #1961, #1501)

comment:9 Changed 12 years ago by jmoore

One issue with this will be that if a session times out, it becomes difficult to close it:

2010-04-14 08:38:30,794 ERROR [ ome.services.blitz.impl.ServiceFactoryI] (.Server-23) Error destroying servant: 86:24:41:32:7aa3f55e:127f91236d3:-7ee9omero.api.RawFileStore=omero.api._RawFileStoreTie@5456cf60
ome.conditions.SessionTimeoutException: Session (started=2010-04-14 08:26:06.718, hits=366, last access=2010-04-14 08:26:07.501) exceeded timeToIdle (600000) by 143292 ms
	at ome.services.sessions.state.SessionCache.getElementNullOrThrowOnTimeout(SessionCache.java:307)
	at ome.services.sessions.state.SessionCache.getSessionContext(SessionCache.java:235)
	at ome.services.sessions.SessionManagerImpl.getSessionStats(SessionManagerImpl.java:510)
	at ome.services.sessions.stats.PerSessionStats.stats(PerSessionStats.java:31)
	at ome.services.sessions.stats.DelegatingStats.loadedObjects(DelegatingStats.java:43)
	at ome.services.sessions.stats.DelegatingStats.loadedObjects(DelegatingStats.java:44)
	at ome.security.basic.OmeroInterceptor.onLoad(OmeroInterceptor.java:128)
	at org.hibernate.event.def.DefaultPreLoadEventListener.onPreLoad(DefaultPreLoadEventListener.java:41)
	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:149)
	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:898)
	at org.hibernate.loader.Loader.doQuery(Loader.java:773)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
	at org.hibernate.loader.Loader.loadEntity(Loader.java:1933)
	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
	at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270)
	at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
	at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:147)
	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
	at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1018)
	at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:176)
	at org.hibernate.Hibernate.initialize(Hibernate.java:346)
	at ome.logic.QueryImpl$1.doInHibernate(QueryImpl.java:173)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
	at ome.logic.QueryImpl.get(QueryImpl.java:156)
        ...
	at $Proxy64.close(Unknown Source)
	at ome.services.blitz.impl.AbstractAmdServant.close_async(AbstractAmdServant.java:216)
	at ome.services.blitz.impl.AbstractAmdServant.close(AbstractAmdServant.java:190)
	at ome.services.blitz.impl.ServiceFactoryI.doDestroy(ServiceFactoryI.java:709)
	at ome.services.blitz.impl.ServiceFactoryI.destroy(ServiceFactoryI.java:639)
	at Glacier2._SessionDisp.___destroy(_SessionDisp.java:82)
	at omero.api._ServiceFactoryDisp.__dispatch(_ServiceFactoryDisp.java:1231)
	at IceInternal.Incoming.invoke(Incoming.java:159)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
	at Ice.ConnectionI.message(ConnectionI.java:972)
	at IceInternal.ThreadPool.run(ThreadPool.java:577)
	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
2010-04-14 08:38:30,795 INFO  [ ome.services.blitz.impl.ServiceFactoryI] (.Server-23) Unregistered servant:2838932c-f3be-40c7-9629-ba1e74d12563/86:24:41:32:7aa3f55e:127f91236d3:-7ee9omero.api.RawFileStore(omero.api._RawFileStoreTie@5456cf60)

comment:10 Changed 12 years ago by jmoore

  • Owner jmoore deleted
  • Status changed from assigned to new

comment:11 Changed 12 years ago by jmoore

  • Sprint 2010-04-02 (6) deleted

comment:12 Changed 12 years ago by jmoore

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from new to closed

This has been working well for RFS. Opened #2348 as a carry on for other methods.

comment:13 Changed 12 years ago by jmoore

(In [7015]) fix #2396 - rfs.save is needed. See #1501, #2161

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.70022 sec.)

We're Hiring!