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

Opened 13 years ago

Closed 12 years ago

Bug: DropBox imports some files twice

Reported by: cblackburn Owned by: cblackburn
Priority: minor Milestone: OMERO-4.4
Component: OmeroFs Version: n.a.
Keywords: n.a. Cc: jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-01-17 (6)

Description

Copying a DV file and its log file into a DropBox directory causes two independent imports. Initially I thought this might be related to #5970 but in the case of DropBox the result is that the image is imported twice:

2011-06-23 11:11:07,914 INFO  [         fsclient.fsDropBoxMonitorClient] (MainThread) EVENT_RECORD::Cookie::1308823867.91::Directory::/OMERO/DropBox
2011-06-23 11:11:08,430 INFO  [                        fsclient.DropBox] (MainThread) Created monitor with id = 1cb631b3-9d81-11e0-b014-001b6392eb8c
2011-06-23 11:11:08,434 INFO  [                        fsclient.DropBox] (MainThread) Started OMERO.fs DropBox client
2011-06-23 11:38:04,465 INFO  [                            omero.remote] (Dummy-4   )  Meth: MonitorClientI.fsEventHappened
2011-06-23 11:38:04,483 INFO  [         fsclient.fsDropBoxMonitorClient] (Dummy-4   ) EVENT_RECORD::Cookie::1308825484.48::Batch::1
2011-06-23 11:38:04,484 INFO  [         fsclient.fsDropBoxMonitorClient] (Dummy-4   ) EVENT_RECORD::Cookie::1308825484.48::Create::/OMERO/DropBox/root/dv4/mt1_R3D_D3D_log.txt
2011-06-23 11:38:04,635 INFO  [                            omero.remote] (Dummy-4   )  Rslt: None
2011-06-23 11:38:07,842 INFO  [                            omero.remote] (Dummy-5   )  Meth: MonitorClientI.fsEventHappened
2011-06-23 11:38:07,843 INFO  [         fsclient.fsDropBoxMonitorClient] (Dummy-5   ) EVENT_RECORD::Cookie::1308825487.84::Batch::1
2011-06-23 11:38:07,843 INFO  [         fsclient.fsDropBoxMonitorClient] (Dummy-5   ) EVENT_RECORD::Cookie::1308825487.84::Create::/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv
2011-06-23 11:38:07,858 INFO  [                            omero.remote] (Dummy-5   )  Rslt: None
2011-06-23 11:38:08,189 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) Processing 1 events (1 ids). 1 remaining
2011-06-23 11:38:08,189 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) Getting filesets on : set(['/OMERO/DropBox/root/dv4/mt1_R3D_D3D_log.txt'])
2011-06-23 11:38:16,864 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) EVENT_RECORD::Cookie::1308825496.86::Filesets::{'/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv': ['/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv', '/OMERO/DropBox/root/dv4/mt1_R3D_D3D_log.txt']}
2011-06-23 11:38:16,943 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) New entry /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv contains 2 file(s). Files=2 Timers=1
2011-06-23 11:39:16,944 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-6  ) Removed key /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv
2011-06-23 11:39:16,966 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) Processing 1 events (1 ids). 0 remaining
2011-06-23 11:39:16,967 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) Getting filesets on : set(['/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv'])
2011-06-23 11:39:17,698 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-6  ) Importing /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv (session=46b7ed6e-6934-4b77-b0ae-2d2ece11c60d)
2011-06-23 11:39:19,771 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) EVENT_RECORD::Cookie::1308825559.77::Filesets::{'/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv': ['/OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv', '/OMERO/DropBox/root/dv4/mt1_R3D_D3D_log.txt']}
2011-06-23 11:39:19,869 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-3  ) New entry /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv contains 2 file(s). Files=2 Timers=1
2011-06-23 11:39:20,614 INFO  [                    omero.util.Resources] (Thread-8  ) Starting
2011-06-23 11:39:20,798 WARNI [                                  stderr] (Thread-6  ) Joined session 46b7ed6e-6934-4b77-b0ae-2d2ece11c60d (root@localhost:4064). Idle timeout: 10.0 min. Current group: system
2011-06-23 11:39:48,470 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-6  ) Import of /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv completed (session=46b7ed6e-6934-4b77-b0ae-2d2ece11c60d)
2011-06-23 11:39:48,493 INFO  [                    omero.util.Resources] (Thread-8  ) Halted
2011-06-23 11:40:19,870 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-7  ) Removed key /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv
2011-06-23 11:40:20,243 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-7  ) Importing /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv (session=cb2b1ce9-2d35-44b0-856f-275c3292d7c2)
2011-06-23 11:40:20,664 INFO  [                    omero.util.Resources] (Thread-9  ) Starting
2011-06-23 11:40:20,678 WARNI [                                  stderr] (Thread-7  ) Joined session cb2b1ce9-2d35-44b0-856f-275c3292d7c2 (root@localhost:4064). Idle timeout: 10.0 min. Current group: system
2011-06-23 11:40:29,962 INFO  [                    omero.util.Resources] (Thread-9  ) Halted
2011-06-23 11:40:29,966 INFO  [         fsclient.fsDropBoxMonitorClient] (Thread-7  ) Import of /OMERO/DropBox/root/dv4/mt1_R3D_D3D.dv completed (session=cb2b1ce9-2d35-44b0-856f-275c3292d7c2)

Attachments (1)

DropBox.mt1_R3D_D3D.log (76.8 KB) - added by cblackburn 13 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 13 years ago by cblackburn

  • Owner set to cblackburn
  • Remaining Time set to 0.5
  • Status changed from new to accepted

Changed 13 years ago by cblackburn

comment:2 Changed 13 years ago by cblackburn

  • Milestone changed from OMERO-Beta4.3.1 to Unscheduled
  • Remaining Time 0.5 deleted
  • Sprint 2011-07-07 (1) deleted

Results from running an automatic script a few times which copies a dv and then x seconds later its log file, x in (0,3,...60) are shown below. These are all non-overlapping imports to make the logs easier to follow but also to keep what's happening as simple as possible. Other than longer gaps seem to more consistently lead to double imports there doesn't seem to be a strong pattern for shorter gaps. One log file is attached.

CFPNEAT01_R3D: Duplicate imports on: 15, 21, 30, 33, 36, 39, 42, 48, 51, 54, 57, 60 (12/21)
CFPNEAT01_R3D: Duplicate imports on: 12, 27, 30, 33, 36, 39, 42, 45, 51, 54, 57, 60 (12/21)
mt1_R3D_D3D:   Duplicate imports on: 3, 21, 39, 42, 45, 48, 51, 54, 57, 60          (10/21)

comment:3 Changed 12 years ago by cblackburn

  • Milestone changed from Unscheduled to OMERO-Beta4.4
  • Sprint set to 2011-12-13 (4)

comment:4 Changed 12 years ago by cblackburn

The main cause of this bug is that a file notification can be received near the end of the execute() loop and then a companion file notification might be received on a new invocation of execute. This causes two separate imports. The fix in https://github.com/ximenesuk/openmicroscopy/tree/bug/5972 stops this but there are still other edge effects such as the file and its companion falling in two separate batches or the batch size not being large enough for a multi-file format. To some extent configuration can reduce this effect but it will always remain an edge case with the current strategy. We should document the config changes necessary to reduce the likelihood of a double import but may need to reconsider how DropBox works as part of a wider story.

comment:5 Changed 12 years ago by cblackburn

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

comment:6 Changed 12 years ago by cblackburn

  • Remaining Time set to 0.5
  • Resolution fixed deleted
  • Sprint changed from 2011-12-13 (4) to 2011-12-27 (5)
  • Status changed from closed to reopened

Re-opening. In looking at the documentation I realised the problem may be more subtle. It is possibly due to race condition between the wait in the execute loop and the wait of import events. If this is the case a better fix can be implemented.

comment:7 Changed 12 years ago by cblackburn

comment:8 Changed 12 years ago by cblackburn

comment:9 Changed 12 years ago by cblackburn

  • Remaining Time changed from 0.5 to 0.1

Fix tested locally, will push to branch after discussion.

comment:10 Changed 12 years ago by cblackburn

  • Owner cblackburn deleted
  • Status changed from reopened to new

comment:11 Changed 12 years ago by cblackburn

  • Owner set to cblackburn

comment:12 Changed 12 years ago by jburel

  • Sprint changed from 2012-01-03 (5) to 2012-01-17 (6)

Moved from sprint 2012-01-03 (5)

comment:13 Changed 12 years ago by cblackburn

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

Closing this leaving the fraction that is used to calculate worker_wait from dirImportWait hard-coded at 25%. Leaving fileBatch as config.

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

We're Hiring!