-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10362/#review19278
-----------------------------------------------------------
I think it'd be great to preserve or enable the Lock-like idiom as a
best-practice, i.e.
txn.begin()
try {
// do stuff, puts, whatever
ch.put(...);
ch.commit();
} catch (FlumeException ex) {
ch.rollback();
} finally {
ch.close();
}
So whatever gets us there (right now we have to catch Throwable which is pretty
horrible) I would support.
May require changes to the channel implementations which is fine. After mulling
it over a bit, I think we should encourage channel implementations to do their
own rollback-on-close and log an ERROR if the txn is still open at close time,
because it will give them more ability to react to implementation specific
details, like if rollback throws in the middle of a close.
- Mike Percy
On April 9, 2013, 3:21 a.m., Roshan Naik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10362/
> -----------------------------------------------------------
>
> (Updated April 9, 2013, 3:21 a.m.)
>
>
> Review request for Flume.
>
>
> Description
> -------
>
> Loggin error instead of throwing exception in cases where close() is called
> w/o rollback or abort being called.
>
>
> This addresses bug FLUME-1321.
> https://issues.apache.org/jira/browse/FLUME-1321
>
>
> Diffs
> -----
>
>
> flume-ng-core/src/main/java/org/apache/flume/channel/BasicTransactionSemantics.java
> 403cbca
>
> Diff: https://reviews.apache.org/r/10362/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Roshan Naik
>
>