[ 
https://issues.apache.org/jira/browse/DERBY-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532069
 ] 

Knut Anders Hatlen commented on DERBY-3064:
-------------------------------------------

I don't quite understand this part of the patch:

+        } catch (NoSuchElementException nse) {
+            //Although next() returns true a request for data on the buffer
+            //fails implying that there has been a fatal exception in the
+            //buffer.
+            masterController.handleExceptions(StandardException.newException
+                (SQLState.REPLICATION_UNEXPECTED_EXCEPTION, nse));
+        }

Is there something special about NoSuchElementException compared to other 
runtime exceptions like NullPointerException?

If the problem is that run() swallows runtime exceptions, wouldn't it be better 
to add a generic "catch (RuntimeException re)" clause in the run() method and 
handle the exception there? That way you would solve the problem both for 
NoSuchElementException and for other unexpected exceptions.

> Implement the LogShipper that will enable the shipping of Log records from 
> the master to the slave
> --------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3064
>                 URL: https://issues.apache.org/jira/browse/DERBY-3064
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>         Attachments: LogShipperImpl_v1.diff, LogShipperImpl_v1.stat, 
> LogShipperImpl_v2.diff, LogShipperImpl_v2.stat, LogShipperImpl_v3.diff, 
> LogShipperImpl_v3.stat, LogShipperImpl_v4.diff, LogShipperImpl_v4.stat, 
> LogShipperImpl_v5.diff, LogShipperImpl_v5.stat
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to