PILLUTLAAVINASH / google-enterprise-connector-manager

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

Editing a connector instance has no effect until Tomcat is restarted #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Read the source, or

1. Create a new connector instance and index some data. 
2. Edit the connector instance, and change something, display URL, username, 
etc.
3. Check (via logs, or similar) whether the edits took effect, or

1. Create a new connector instance and index data.
2. Verify search results in the search interface.
3. Change the repository password for the connector instance user.
4. Clear the authorization cache in the GSA.
5. Verify no search results for the connector in the search interface.
6. Edit the connector instance to update the password.
7. Clear the authorization cache in the GSA.
8. Verify search results.

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

A new connector instance is instantiated, and the InstanceMap is updated, but 
the 
ConnectorInterfaces cache in SpringInstantiator is not updated. See issue 60 
for another situation 
where the ConnectorInterfaces cache is not correctly updated.

In the second scenario, you will see that the changes did not take effect. I, 
for example, changed 
the display URL from a FQHN to IP address, but subsequently indexed items used 
the old display 
URL with the FQHN. In the third scenario, you will get no search results in 
step 8, because the 
AuthorizationManager that will be used will still have the old password.

What version of the product are you using? On what operating system?

GSA 5.0.0.G.14, Connector Manager 1.0.2.

Please provide any additional information below.

Note that for the TraversalManager, there is a third level of caching that is 
not updated, namely 
the TraversalWorkQueueItem. Issue 35 is another place where the 
TraversalManager caching is a 
problem.

The workaround is to restart Tomcat, or reload the connector-manager web 
application, in order 
for any connector configuration changes to take effect.

P2; restarting Tomcat isn't terrible, but it shouldn't be necessary.

Original issue reported on code.google.com by jl1615@gmail.com on 7 Nov 2007 at 11:28

GoogleCodeExporter commented 8 years ago

Original comment by donald.z...@gmail.com on 18 Apr 2008 at 10:28

GoogleCodeExporter commented 8 years ago
Fixing this issue required the following:

1) Remove the connector from the connectorCache in
SpringInstantiator.setConnectorConfig().  This forces a subsequent call to
getConnectorInterfaces() to create and cache a new ConnectorInterfaces item for 
the
new (modified) connector.

2) Do not cache the Traverser in WorkQueueItem.  Forcing WorkQueueItem.doWork() 
to
fetch the Traverser from the Instatiator each invocation allows the next batch 
of
work to use the new (updated) Traverser.

3) Synchronizing certain methods in SpringInstantiator.  Since multiple threads 
were
accessing the SpringIntantiator's connectorCache, instanceMap, and typeMap, we 
were
seeing evidence that some of the threads were seeing inconsistent states of 
these
separate maps.  Synchronizing access to these three items seems to have 
eliminated
the stale connectors and traversers we were seeing.

Original comment by Brett.Mi...@gmail.com on 2 May 2008 at 2:49

GoogleCodeExporter commented 8 years ago
Fixed in revision r805 which also addresses issue 35 and issue 60 .

Original comment by Brett.Mi...@gmail.com on 25 May 2008 at 2:15

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 19 Jun 2008 at 6:35