PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

restartConnectorTraversal is broken #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Invoke the restartConnectorTraversal servelet.

What is the expected output? What do you see instead?

Although the connector state is blown away, when the
next traversal is scheduled, runBatch() aborts with
"Halting traversal..." and returns -1.  So the traversal
never starts.

This is an indication that runBatch() received an 
IllegalStateException when fetching the connector state,
which means that GenerationalStateStore is not doing its
job correctly.  This is because the GenerationalStateStore
is now bound to the InstanceInfo, rather than ConnectorInterfaces,
as it was previously. Consequently, creating a new instance
of ConnectorInterfaces no longer creates a new GenerationalStateStore,
freezing the state store at the old generation.

As a work-around, restarting Tomcat fixes the problem.

Original issue reported on code.google.com by Brett.Mi...@gmail.com on 18 Dec 2008 at 11:00

GoogleCodeExporter commented 8 years ago
Fixed Connector Manager revision r1424

The problem was introduced with the re-achitecture of persistent
storage for Connector Manager Issue 78.  The GenerationalStateStore
mechanics were rendered useless, as we never created more than one
generation.  When restartConnectorTraversal was called, the current
generation was invalidated, but a new GenerationalStateStore was
never created.  When the scheduler scheduled QueryTraverser.runBatch(),
It would abort because it thought its generational store was invalid.

The real problem was the creation of the GenerationalStateStore was
moved from the creation of the ConnectorInterfaces to the creation
of InstanceInfo.  The challenge was to restore creating a new
GenerationalStateStore for each new QueryTraverser, but maintaining
the encapsulation of the persistent storage mechanisms within
InstanceInfo.

Change Log:
----------
A 
projects/connector-manager/source/java/com/google/enterprise/connector/traversal
/TraversalStateStore.java
   - A new persistent storage interface used by the Traverser.

M 
projects/connector-manager/source/java/com/google/enterprise/connector/instantia
tor/InstanceInfo.java
   - Provides a TraversalStateStore implementation using a
     GenerationalStateStore on top of the ConnectorStateStore.

M 
projects/connector-manager/source/java/com/google/enterprise/connector/instantia
tor/SpringInstantiator.java
   - Supply a TraversalStateStore parameter to the ConnectorInterfaces
     constructor.

M 
projects/connector-manager/source/java/com/google/enterprise/connector/instantia
tor/ConnectorInterfaces.java
   - Supply the TraversalStateStore rather than the Instantiator
     as a parameter to the QueryTraverser constructor.

M 
projects/connector-manager/source/java/com/google/enterprise/connector/traversal
/QueryTraverser.java
   - Fetch the saved checkpoint via the TraversalStateStore, rather
     than the Instantiator.

M 
projects/connector-manager/source/java/com/google/enterprise/connector/persist/G
enerationalStateStore.java
   - Fixed a issue when a GenerationalStateStore wraps another
     GenerationalStateStore.

M 
projects/connector-manager/source/javatests/com/google/enterprise/connector/inst
antiator/MockInstantiator.java
   - Provides a TraversalStateStore implementation using a
     GenerationalStateStore on top of the ConnectorStateStore.

M 
projects/connector-manager/source/javatests/com/google/enterprise/connector/trav
ersal/QueryTraverserTest.java
   - Support the new QueryTraverser constructor interface.

Original comment by Brett.Mi...@gmail.com on 6 Jan 2009 at 7:56

GoogleCodeExporter commented 8 years ago

Original comment by jl1615@gmail.com on 12 Jan 2009 at 3:33