Closed GoogleCodeExporter closed 8 years ago
Original comment by donald.z...@gmail.com
on 18 Apr 2008 at 10:15
This is also Google bug 752976.
The workaround for this bug, but not for the related issue 87, is to pause the
traversal before deleting the connector
instance:
1. Edit the connector instance.
2. Set the schedule from 1:00 AM to 1:00 AM (with only one schedule line).
3. Wait a few minutes.
4. Delete the connector instance.
Original comment by jl1615@gmail.com
on 7 May 2008 at 3:03
Fixed in revision r809 .
When a connector was deleted, its persistent ConnectorStateStore
(the stored Checkpoint) and ConnectorScheduleStore are deleted.
However, a slow-to-die worker thread may, as its last gasp,
rewrite the ConnectorStateStore. As a result, deleting and
recreating a connector would often result in the new connector
starting up where the old connector left off, rather than
starting from the beginning.
Many layers of abstraction make it difficult to communicate
deleted connector status down to the worker threads, so we
decided to provide a mechanism that can enable and disable
the ConnectorStateStore for a specific connector. The CM
then disables the store when a connector is deleted, and
enables the store when a connector is created. Attempting
to read or write a disabled store throws an exception.
Similar changes were not needed for the ConnectorScheduleStore
because it is not managed asynchronously (yet?).
ChangeLog:
---------
* java/com/google/enterprise/connector/persist/ConnectorStateStore.java:
- Add enable and disable methods to the ConnectorStateStore Interface.
* java/com/google/enterprise/connector/persist/PrefsStore.java:
- Implement enable and disable methods in the ConnectorStateStore
Implementation.
* java/com/google/enterprise/connector/instantiator/SpringInstantiator.java:
- Enable a connector's ConnectorStateStore when creating a new
instance of a connector. See also the version of SpringInstantiator
that fixes Issues 35, 60, and 63. When both branches are merged
into the trunk, that version of SpringInstantiator should be used
(with the commented out Issue 47 line restored); not this one.
- Disable a connector's ConnectorStateStore when deleting the connector.
* java/com/google/enterprise/connector/manager/ProductionManager.java:
- Remove the connector from the scheduler before deleting the scheduleStore.
* java/com/google/enterprise/connector/traversal/QueryTraverser.java:
- Catch IllegalStateExceptions when reading or writing a connector's
state. These exceptions mean a connector has ceased to exist and
they are dealt with accordingly.
* javatests/com/google/enterprise/connector/instantiator/MockInstantiator.java:
- Enable a connector's ConnectorStateStore when creating a new
connector and disable it when deleting a connector.
- Add dropConnector() implementation, replacing stub.
*
javatests/com/google/enterprise/connector/persist/MockConnectorStateStore.java:
- Implement enable and disable methods in the mock ConnectorStateStore
implementation.
* javatests/com/google/enterprise/connector/persist/PrefsStoreTest.java:
- Add tests for the enable/disable functionality.
Original comment by Brett.Mi...@gmail.com
on 28 May 2008 at 10:31
Original comment by mgron...@gmail.com
on 19 Jun 2008 at 6:35
Original issue reported on code.google.com by
jl1615@gmail.com
on 27 May 2007 at 12:19