PILLUTLAAVINASH / google-enterprise-connector-manager

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

OutOfMemoryErrors are swallowed in GsaFeedConnection #140

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
OutOfMemoryErrors in GsaFeedConnection are not caught properly.  They should be 
rethrown as 
RepositoryDocumentException, but fall through to a code path that throws 
FeedException.  This 
forces the batch of documents to be retried, resulting in another 
OutofMemoryException, looping 
indefinitely.

Discovered by John when troubleshooting a problem reported by Lilly.

Original issue reported on code.google.com by Brett.Mi...@gmail.com on 8 Apr 2009 at 2:45

GoogleCodeExporter commented 8 years ago
Fixed in Connector Manager trunk Revision r1673
Also fixed in the 1.3.x branch and added to 1.3.2

--- projects/connector-
manager/source/java/com/google/enterprise/connector/pusher/GsaFeedConnection.jav
a   (revision 1665)
+++ projects/connector-
manager/source/java/com/google/enterprise/connector/pusher/GsaFeedConnection.jav
a   (working copy)
@@ -149,6 +149,16 @@
             "IOException while posting: will retry later", e);
         isThrowing = true;
         throw new FeedException(e);
+      } catch (RuntimeException e) {
+        LOGGER.log(Level.SEVERE,
+            "RuntimeException while feeding: skipping", e);
+        isThrowing = true;
+        throw new RepositoryDocumentException(e);
+      } catch (Error e) {
+        LOGGER.log(Level.SEVERE,
+            "Error while feeding: skipping", e);
+        isThrowing = true;
+        throw new RepositoryDocumentException(e);
       } finally {
         try {
           outputStream.close();

Original comment by Brett.Mi...@gmail.com on 8 Apr 2009 at 6:14

GoogleCodeExporter commented 8 years ago

Original comment by jl1615@gmail.com on 28 Apr 2009 at 8:45