You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2012/01/20 03:23:13 UTC
svn commit: r1233734 -
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Author: nspiegelberg
Date: Fri Jan 20 02:23:12 2012
New Revision: 1233734
URL: http://svn.apache.org/viewvc?rev=1233734&view=rev
Log:
[HBASE-3421] Addendum to make sure we don't miss out any kvs during compaction
Summary:
Strictly speaking, based on code analysis, this change is not needed. But code
is confusing to reason about without this safety check.
https://phabricator.fb.com/differential/diff/916819/
Test Plan:
Ran TestCompaction. Now also running unit tests on MR (titanmigrate) cluster.
Reviewers: mbautin, nspiegelberg, kranganathan
Reviewed By: mbautin
CC: hbase-eng@lists, mbautin, kannan, nspiegelberg
Differential Revision: https://phabricator.fb.com/D390439
Modified:
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1233734&r1=1233733&r2=1233734&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Fri Jan 20 02:23:12 2012
@@ -1276,7 +1276,7 @@ public class Store extends SchemaConfigu
// since scanner.next() can return 'false' but still be delivering data,
// we have to use a do/while loop.
ArrayList<KeyValue> kvs = new ArrayList<KeyValue>();
- while (scanner.next(kvs, 1)) {
+ while (scanner.next(kvs, 1) || (!kvs.isEmpty())) {
if (writer == null && !kvs.isEmpty()) {
writer = createWriterInTmp(maxKeyCount, false);
}