Review Board 1.7.22


FLUME-1113. JDBC channel invokes size query on every put

Review Request #4704 - Created April 12, 2012 and submitted

Arvind Prabhakar
FLUME-1113
Reviewers
Flume
Flume
This change modifies the JDBC channel provider implementation so that it invokes the size query only during configuration to initialize it's own execution state. At runtime, the transaction instances keep track of how many events get added and removed and the delta is then added to the size maintained by the provider. Some notes about this implementation:

* It is possible that between the commit and update of the size counter by one transaction, another transaction may read stale size information. 
* The size counter is only used to gate put operations and not take. This ensures that stale or incorrect information does not inhibit the draining of the channel.

Also refactored the channel tests to be run with and without foreign keys enabled.
Full build and tests.
Review request changed
Updated (April 12, 2012, 3:11 a.m.)
Incorporated review feedback.