PILLUTLAAVINASH / google-enterprise-connector-manager

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

Deleting a connector may leave behind files #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a connector instance that creates files in the connector 
configuration directory.
2. Some time later, delete the connector instance.

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

The additional files, and therefore the directory, are not deleted.

Please use labels and text to provide additional information.

One specific example is the state file stored by the SharePoint connector. In 
that case, if a new 
connector is later created with the same name, the old state will erroneously 
be reused. This is also 
filed as Google bug 753251. The workaround for this bug is to recreate the 
connector instance with a 
new name.

Another possible example is that the connector might create temp files in this 
directory, specifically 
for automatic cleanup when the connector is deleted.

Care should be taken, because at least until issue 25 is fixed, we don't want 
to delete a custom 
connectorInstance.xml file, if one is present. Deleting and creating the 
connector instance is the 
documented way to recrawl a repository, and deleting the connectorInstance.xml 
file in that situation 
would be very annoying.

Another problem is that files written by the connector are written from the 
work queue threads. When 
the connector is deleted, the associated work queue thread may run for a while. 
If we delete the files 
immediately, they may be rewritten by the work queue thread. (Even deleting the 
directory is not 
necessarily safe, because the files may be rewritten between the deletion of 
the files and the deletion 
of the directory.) Also, on Windows an open file cannot be deleted, so files 
that the connector has 
open in the connector configuration directory won't can't be deleted until the 
connector is shutdown.

Original issue reported on code.google.com by jl1615@gmail.com on 7 May 2008 at 12:38

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 18 Jul 2008 at 8:37

GoogleCodeExporter commented 8 years ago
Issue 25 is fixed, but we probably want to wait until the connectors require a 
GSA version where Google bug 
#939626 is fixed (post-5.2) before we fix this.

Original comment by jl1615@gmail.com on 2 Feb 2009 at 11:06

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 6 May 2009 at 11:09

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 6 May 2009 at 11:10

GoogleCodeExporter commented 8 years ago

Original comment by mar...@google.com on 4 Dec 2009 at 11:07

GoogleCodeExporter commented 8 years ago

Original comment by jla...@google.com on 25 Jun 2011 at 1:45

GoogleCodeExporter commented 8 years ago
This issue is filed as Google issue #6514071

Original comment by tdnguyen@google.com on 18 May 2012 at 9:48