[
https://issues.apache.org/jira/browse/HBASE-3750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017970#comment-13017970
]
[email protected] commented on HBASE-3750:
------------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/573/#review409
-----------------------------------------------------------
What is the motivation for calling flushCommits() automatically here? Are we
trying to save client developers from writing buggy code?
The downside I see is that it's easy to envision a case where I use HTablePool
for batch loading, but don't want to actually flush after every cycle of: get
table, perform operation, return table. This change would prevent me from
doing that and force me either write my own pool or somehow work around it.
In this case it both fails the obviousness test for me and limits what I can
easily do as a developer. What is the upside? Is it sufficient to balance out
the limitations?
/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
<https://reviews.apache.org/r/573/#comment793>
This seems dangerous and unexpected from a client code point of view. I
wouldn't expect returning the table to a pool to throw a RuntimeException that
could potentially cause my client application to exit.
- Gary
On 2011-04-09 19:48:31, Ted Yu wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/573/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-04-09 19:48:31)
bq.
bq.
bq. Review request for hbase and Lars George.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. Currently HTablePool.putTable() doesn't call table.flushCommits()
bq. If AutoFlush is disabled for table instance, we should call
table.flushCommits().
bq.
bq. When HTable instance is discarded in putTable(), we should call
tableFactory.releaseHTableInterface().
bq.
bq.
bq. This addresses bug HBASE-3750.
bq. https://issues.apache.org/jira/browse/HBASE-3750
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. /src/main/java/org/apache/hadoop/hbase/client/HTablePool.java 1090500
bq.
bq. Diff: https://reviews.apache.org/r/573/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. TestHTablePool passes.
bq.
bq.
bq. Thanks,
bq.
bq. Ted
bq.
bq.
> HTablePool.putTable() should call table.flushCommits()
> ------------------------------------------------------
>
> Key: HBASE-3750
> URL: https://issues.apache.org/jira/browse/HBASE-3750
> Project: HBase
> Issue Type: Bug
> Components: client
> Affects Versions: 0.90.1
> Reporter: Ted Yu
> Assignee: Ted Yu
> Attachments: 3750.txt
>
>
> Currently HTablePool.putTable() doesn't call table.flushCommits()
> This may turn out to be surprise for users
> When HTable instance is discarded in putTable(), we should call
> tableFactory.releaseHTableInterface().
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira