HBASE-966 HBASE-748 misses some writes

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@709001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2008-10-29 20:29:00 +00:00
parent f4d3ce3f65
commit 4807901194
4 changed files with 7 additions and 19 deletions

View File

@ -51,6 +51,7 @@ Release 0.19.0 - Unreleased
Chores, vs Threads, make HLog manager the write ahead log and
not extend it to provided optional HLog sync operations.
HBASE-970 Update the copy/rename scripts to go against change API
HBASE-966 HBASE-748 misses some writes
IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side

View File

@ -1059,7 +1059,7 @@ public class HTable {
return i;
}
});
if (index != updates.length - 1) {
if (index != -1) {
// Basic waiting time. If many updates are flushed, tests have shown
// that this is barely needed but when commiting 1 update this may
// get retried hundreds of times.

View File

@ -1349,18 +1349,6 @@ public class HRegion implements HConstants {
// set() methods for client use.
//////////////////////////////////////////////////////////////////////////////
/**
* Batch update many rows
* @param bus
* @param locks
* @throws IOException
*/
public void batchUpdate(BatchUpdate[] bus, Integer[] locks) throws IOException {
for (int i = 0; i < bus.length; i++) {
batchUpdate(bus[i], locks[i]);
}
}
/**
* @param b
* @throws IOException

View File

@ -1177,13 +1177,12 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
HRegion region = getRegion(regionName);
this.cacheFlusher.reclaimMemcacheMemory();
Integer[] locks = new Integer[b.length];
for (int j = 0; j < b.length; j++) {
for (i = 0; i < b.length; i++) {
this.requestCount.incrementAndGet();
validateValuesLength(b[j], region);
locks[j] = getLockFromId(b[j].getRowLock());
validateValuesLength(b[i], region);
locks[i] = getLockFromId(b[i].getRowLock());
region.batchUpdate(b[i], locks[i]);
}
i+= b.length-1;
region.batchUpdate(b, locks);
} catch (OutOfMemoryError error) {
abort();
LOG.fatal("Ran out of memory", error);
@ -1195,7 +1194,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
checkFileSystem();
throw e;
}
return i;
return -1;
}
/**