| Summary: | Repository synchronizer should handle replication failure | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Erwin Betschart <erwin> | ||||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 4.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Erwin Betschart
Created attachment 184470 [details]
Triggers a new replication runnable in case of an error
In case of a replication error the session is deactivated will be reconnected.
Created attachment 185747 [details]
Patch v2
Erwin, please confirm that:
1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
I've changed the catch block to:
catch (RuntimeException ex)
{
if (isActive())
{
OM.LOG.warn("Replication attempt failed. Retrying in " + retryInterval + " seconds...", ex);
sleepRetryInterval();
}
disconnect();
throw ex;
}
But I wonder if the disconnect should be called before the sleep and if a simple return would be better than a rethrow. Thoughts?
I confirm to: 1) The number of lines that you changed is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. (In reply to comment #3) > But I wonder if the disconnect should be called before the sleep and if a > simple return would be better than a rethrow. Thoughts? -> I don't see a problem when disconnect is called before sleep. -> I think a simple return instead of a rethrow is better because the exception is already logged. (In reply to comment #5) > -> I don't see a problem when disconnect is called before sleep. Oh no, at the end of disconnect() the reconnect() is triggered... > -> I think a simple return instead of a rethrow is better because the exception is already logged. Changed to return; Committed to HEAD Available in R20110608-1407 |