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"

Bug #1102 (closed)

Opened 16 years ago

Closed 16 years ago

FullText BackLog can get stuck

Reported by: jamoore Owned by: jamoore
Priority: major Cc:
Sprint: n.a.
Total Remaining Time: n.a.

Description

Under certain conditions (e.g. custom SearchBridges), the indexing backlog (in EventLogLoader) can be continually filled. The List<EventLog> currently in use should be replaced with something smarter.

Change History (8)

comment:1 Changed 16 years ago by jmoore

This consists of two issues:

  1. The first is that there needs to be a test for EventLog equivalency in the backlog. This is fairly straight-forward and requires adding our own collection type which checks on add(EventLog).
  1. The other problem is the possibility of recursion in bridges. For example, if a custom bridge wants to index dataset names with contained images and image names with the containing datasets, then to keep the index in sync, it is necessary to call reindex(Dataset) while indexing an Image. However, if reindex(Image) is also called while indexing the Dataset, then the indexing runs perpetually. The planned solution is to disallow adding any objects to the backlog while clearing the backlog. This means that a bridge should be careful to add ALL objects to the backlog which should be processed for a given object and not rely on transitivity. (i.e. if image names should also be indexed with projects, then the bridge should call reindex(Dataset) and reindex(Project). This will be documented under SearchBridges.

comment:2 Changed 16 years ago by jmoore

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

r2796 contains this fix. This needs some testing, but this will most likely have to happen in non-standard builds, since there are no cases of recursive reindex()ing in trunk. (The only objects which are reindex()ed are the parents of an AnnotationLink).

Closing for now, and will report back from the Glencoe use of this code.

comment:3 Changed 16 years ago by jmoore

Apologies, r2798 contains the fix.

comment:4 Changed 16 years ago by jmoore

Grrr...and r2800 contains the actual implementation of EventBacklog

comment:5 Changed 16 years ago by jmoore

  • Resolution fixed deleted
  • Status changed from closed to reopened

r2804 adds better logging. Some bridges can still get stuck. Re-opening.

comment:6 Changed 16 years ago by jmoore

r2805 has a possible fix.

comment:7 Changed 16 years ago by jmoore

  1. Another issue with the EventLogLoader/EventBacklog pair is even more fundamental: nothing gets added to the backlog until flush time. This uniquely Hibernate behavior completely changes how these classes have to function. They were designed with the assumption that:
  for (EventLog log : loader) {
     flush(log); // <-- backlog added here
  }

but it's much more:

  for (EventLog log : loader) {
     flush(log); // no-op
  }
  commit(); // <-- backlog added here!

comment:8 Changed 16 years ago by jmoore

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

r2806 contains the changes to the state machine. Each batch can now only either be in eventlog or in backlog state. Not both. While the backlog is being worked on, nothing can be added to the backlog, which is why SearchBridges must be careful to add everything which needs to be synchronized in one shot.

One further fallout of this change is that some batches may be significantly smaller than the set batch size.

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

We're Hiring!