Review Board 1.7.22


The put operation can release the rowlock before sync-ing the Hlog

Review Request #2141 - Created Oct. 2, 2011 and updated

Dhruba Borthakur
HBASE-4528
Reviewers
hbase
hbase
The changes the multiPut operation so that the sync to the wal occurs outside the rowlock.

This enhancement is done only to HRegion.mut(Put[]) because this is the only method that gets invoked from an application. The HRegion.put(Put) is used only by unit tests and should possibly be deprecated.
I ran TestLogRolling over and over again, about 50 times, not failed a single time.
/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Revision 1184991 New Change
[20] 1137 lines
[+20] [+] protected boolean internalFlushcache(
1138
    // We also set the memstore size to zero here before we allow updates
1138
    // We also set the memstore size to zero here before we allow updates
1139
    // again so its value will represent the size of the updates received
1139
    // again so its value will represent the size of the updates received
1140
    // during the flush
1140
    // during the flush
1141
    long sequenceId = -1L;
1141
    long sequenceId = -1L;
1142
    long completeSequenceId = -1L;
1142
    long completeSequenceId = -1L;

    
   
1143
    ReadWriteConsistencyControl.WriteEntry w = null;
1143

    
   
1144

   
1144
    // We have to take a write lock during snapshot, or else a write could
1145
    // We have to take a write lock during snapshot, or else a write could
1145
    // end up in both snapshot and memstore (makes it difficult to do atomic
1146
    // end up in both snapshot and memstore (makes it difficult to do atomic
1146
    // rows then)
1147
    // rows then)
1147
    status.setStatus("Obtaining lock to block concurrent updates");
1148
    status.setStatus("Obtaining lock to block concurrent updates");
1148
    this.updatesLock.writeLock().lock();
1149
    this.updatesLock.writeLock().lock();
1149
    status.setStatus("Preparing to flush by snapshotting stores");
1150
    status.setStatus("Preparing to flush by snapshotting stores");
1150
    final long currentMemStoreSize = this.memstoreSize.get();
1151
    final long currentMemStoreSize = this.memstoreSize.get();
1151
    List<StoreFlusher> storeFlushers = new ArrayList<StoreFlusher>(stores.size());
1152
    List<StoreFlusher> storeFlushers = new ArrayList<StoreFlusher>(stores.size());
1152
    try {
1153
    try {

    
   
1154
      // Record the rwcc for all transactions in progress.

    
   
1155
      w = rwcc.beginMemstoreInsert();

    
   
1156
      rwcc.advanceMemstore(w);

    
   
1157

   
1153
      sequenceId = (wal == null)? myseqid :
1158
      sequenceId = (wal == null)? myseqid :
1154
        wal.startCacheFlush(this.regionInfo.getEncodedNameAsBytes());
1159
        wal.startCacheFlush(this.regionInfo.getEncodedNameAsBytes());
1155
      completeSequenceId = this.getCompleteCacheFlushSequenceId(sequenceId);
1160
      completeSequenceId = this.getCompleteCacheFlushSequenceId(sequenceId);
1156

    
   
1161

   
1157
      for (Store s : stores.values()) {
1162
      for (Store s : stores.values()) {
[+20] [20] 17 lines
[+20] protected boolean internalFlushcache(
1175
    // be part of the current running servers state.
1180
    // be part of the current running servers state.
1176
    boolean compactionRequested = false;
1181
    boolean compactionRequested = false;
1177
    try {
1182
    try {
1178
      // A.  Flush memstore to all the HStores.
1183
      // A.  Flush memstore to all the HStores.
1179
      // Keep running vector of all store files that includes both old and the
1184
      // Keep running vector of all store files that includes both old and the
1180
      // just-made new flush store file.
1185
      // just-made new flush store file. The new flushed file is still in the

    
   
1186
      // tmp directory.
1181

    
   
1187

   
1182
      for (StoreFlusher flusher : storeFlushers) {
1188
      for (StoreFlusher flusher : storeFlushers) {
1183
        flusher.flushCache(status);
1189
        flusher.flushCache(status);
1184
      }
1190
      }

    
   
1191

   

    
   
1192
      // wait for all in-progress transactions to commit to HLog before

    
   
1193
      // we can commit the newly created storefiles. This prevents

    
   
1194
      // uncommitted transactions from being written into HFiles.

    
   
1195
      // This can block while holding the cacheFlushLock, but that 

    
   
1196
      // should be ok.

    
   
1197
      rwcc.waitForRead(w);

    
   
1198

   
1185
      // Switch snapshot (in memstore) -> new hfile (thus causing
1199
      // Switch snapshot (in memstore) -> new hfile (thus causing
1186
      // all the store scanners to reset/reseek).
1200
      // all the store scanners to reset/reseek).
1187
      for (StoreFlusher flusher : storeFlushers) {
1201
      for (StoreFlusher flusher : storeFlushers) {
1188
        boolean needsCompaction = flusher.commit();
1202
        boolean needsCompaction = flusher.commit(status);
1189
        if (needsCompaction) {
1203
        if (needsCompaction) {
1190
          compactionRequested = true;
1204
          compactionRequested = true;
1191
        }
1205
        }
1192
      }
1206
      }
1193
      storeFlushers.clear();
1207
      storeFlushers.clear();
[+20] [20] 218 lines
[+20] [+] public void delete(Delete delete, Integer lockid, boolean writeToWAL)
1412
      closeRegionOperation();
1426
      closeRegionOperation();
1413
    }
1427
    }
1414
  }
1428
  }
1415

    
   
1429

   
1416
  /**
1430
  /**

    
   
1431
   * This is used only by unit tests. Not required to be a public API.
1417
   * @param familyMap map of family to edits for the given family.
1432
   * @param familyMap map of family to edits for the given family.
1418
   * @param writeToWAL
1433
   * @param writeToWAL
1419
   * @throws IOException
1434
   * @throws IOException
1420
   */
1435
   */
1421
  public void delete(Map<byte[], List<KeyValue>> familyMap, UUID clusterId,
1436
  void delete(Map<byte[], List<KeyValue>> familyMap, UUID clusterId,
1422
      boolean writeToWAL) throws IOException {
1437
      boolean writeToWAL) throws IOException {
1423
    Delete delete = new Delete();
1438
    Delete delete = new Delete();
1424
    delete.setFamilyMap(familyMap);
1439
    delete.setFamilyMap(familyMap);
1425
    delete.setClusterId(clusterId);
1440
    delete.setClusterId(clusterId);
1426
    delete.setWriteToWAL(writeToWAL);
1441
    delete.setWriteToWAL(writeToWAL);
[+20] [20] 79 lines
[+20] [+] private void internalDelete(Delete delete, UUID clusterId,
1506
        this.log.append(regionInfo, this.htableDescriptor.getName(),
1521
        this.log.append(regionInfo, this.htableDescriptor.getName(),
1507
            walEdit, clusterId, now, this.htableDescriptor);
1522
            walEdit, clusterId, now, this.htableDescriptor);
1508
      }
1523
      }
1509

    
   
1524

   
1510
      // Now make changes to the memstore.
1525
      // Now make changes to the memstore.
1511
      long addedSize = applyFamilyMapToMemstore(familyMap);
1526
      long addedSize = applyFamilyMapToMemstore(familyMap, null);
1512
      flush = isFlushSize(this.addAndGetGlobalMemstoreSize(addedSize));
1527
      flush = isFlushSize(this.addAndGetGlobalMemstoreSize(addedSize));
1513

    
   
1528

   
1514
      if (coprocessorHost != null) {
1529
      if (coprocessorHost != null) {
1515
        coprocessorHost.postDelete(delete, walEdit, writeToWAL);
1530
        coprocessorHost.postDelete(delete, walEdit, writeToWAL);
1516
      }
1531
      }
[+20] [20] 157 lines
[+20] [+] private long doMiniBatchPut(
1674
              OperationStatusCode.SUCCESS);
1689
              OperationStatusCode.SUCCESS);
1675
        }
1690
        }
1676
      }
1691
      }
1677
    }
1692
    }
1678

    
   
1693

   
1679
    long now = EnvironmentEdgeManager.currentTimeMillis();
1694
    ReadWriteConsistencyControl.WriteEntry w = null;
1680
    byte[] byteNow = Bytes.toBytes(now);
1695
    long txid = 0;

    
   
1696
    boolean walSyncSuccessful = false;
1681
    boolean locked = false;
1697
    boolean locked = false;
1682

    
   
1698

   
1683
    /** Keep track of the locks we hold so we can release them in finally clause */
1699
    /** Keep track of the locks we hold so we can release them in finally clause */
1684
    List<Integer> acquiredLocks = Lists.newArrayListWithCapacity(batchOp.operations.length);
1700
    List<Integer> acquiredLocks = Lists.newArrayListWithCapacity(batchOp.operations.length);
1685
    // reference family maps directly so coprocessors can mutate them if desired
1701
    // reference family maps directly so coprocessors can mutate them if desired
[+20] [20] 48 lines
[+20] private long doMiniBatchPut(
1734
          acquiredLocks.add(acquiredLockId);
1750
          acquiredLocks.add(acquiredLockId);
1735
        }
1751
        }
1736
        lastIndexExclusive++;
1752
        lastIndexExclusive++;
1737
        numReadyToWrite++;
1753
        numReadyToWrite++;
1738
      }
1754
      }

    
   
1755

   

    
   
1756
      // we should record the timestamp only after we have acquired the rowLock,

    
   
1757
      // otherwise, newer puts are not guaranteed to have a newer timestamp

    
   
1758
      long now = EnvironmentEdgeManager.currentTimeMillis();

    
   
1759
      byte[] byteNow = Bytes.toBytes(now);

    
   
1760

   
1739
      // Nothing to put -- an exception in the above such as NoSuchColumnFamily?
1761
      // Nothing to put -- an exception in the above such as NoSuchColumnFamily?
1740
      if (numReadyToWrite <= 0) return 0L;
1762
      if (numReadyToWrite <= 0) return 0L;
1741

    
   
1763

   
1742
      // We've now grabbed as many puts off the list as we can
1764
      // We've now grabbed as many puts off the list as we can
1743

    
   
1765

   
[+20] [20] 8 lines
[+20] private long doMiniBatchPut(
1752
        updateKVTimestamps(
1774
        updateKVTimestamps(
1753
            familyMaps[i].values(),
1775
            familyMaps[i].values(),
1754
            byteNow);
1776
            byteNow);
1755
      }
1777
      }
1756

    
   
1778

   
1757

    
   

   
1758
      this.updatesLock.readLock().lock();
1779
      this.updatesLock.readLock().lock();
1759
      locked = true;
1780
      locked = true;
1760

    
   
1781

   

    
   
1782
      //
1761
      // ------------------------------------
1783
      // ------------------------------------
1762
      // STEP 3. Write to WAL
1784
      // Acquire the latest rwcc number

    
   
1785
      // ----------------------------------

    
   
1786
      w = rwcc.beginMemstoreInsert();

    
   
1787

   

    
   
1788
      // ------------------------------------

    
   
1789
      // STEP 3. Write back to memstore

    
   
1790
      // Write to memstore. It is ok to write to memstore

    
   
1791
      // first without updating the HLog because we do not roll

    
   
1792
      // forward the memstore RWCC. The RWCC will be moved up when

    
   
1793
      // the complete operation is done. These changes are not yet

    
   
1794
      // visible to scanners till we update the RWCC. The RWCC is

    
   
1795
      // moved only when the sync is complete.

    
   
1796
      // ----------------------------------

    
   
1797
      long addedSize = 0;

    
   
1798
      for (int i = firstIndex; i < lastIndexExclusive; i++) {

    
   
1799
        if (batchOp.retCodeDetails[i].getOperationStatusCode()
Moved from 1787

    
   
1800
            != OperationStatusCode.NOT_RUN) {
Moved from 1788

    
   
1801
          continue;

    
   
1802
        }

    
   
1803
        addedSize += applyFamilyMapToMemstore(familyMaps[i], w);

    
   
1804
      }

    
   
1805

   

    
   
1806
      // ------------------------------------

    
   
1807
      // STEP 4. Write to WAL
1763
      // ----------------------------------
1808
      // ----------------------------------
1764
      for (int i = firstIndex; i < lastIndexExclusive; i++) {
1809
      for (int i = firstIndex; i < lastIndexExclusive; i++) {
1765
        // Skip puts that were determined to be invalid during preprocessing
1810
        // Skip puts that were determined to be invalid during preprocessing
1766
        if (batchOp.retCodeDetails[i].getOperationStatusCode()
1811
        if (batchOp.retCodeDetails[i].getOperationStatusCode()
1767
            != OperationStatusCode.NOT_RUN) {
1812
            != OperationStatusCode.NOT_RUN) {
1768
          continue;
1813
          continue;
1769
        }
1814
        }

    
   
1815
        batchOp.retCodeDetails[i] = new OperationStatus(OperationStatusCode.SUCCESS);
1770

    
   
1816

   
1771
        Put p = batchOp.operations[i].getFirst();
1817
        Put p = batchOp.operations[i].getFirst();
1772
        if (!p.getWriteToWAL()) continue;
1818
        if (!p.getWriteToWAL()) continue;
1773
        addFamilyMapToWALEdit(familyMaps[i], walEdit);
1819
        addFamilyMapToWALEdit(familyMaps[i], walEdit);
1774
      }
1820
      }
1775

    
   
1821

   
1776
      // Append the edit to WAL
1822
      // -------------------------

    
   
1823
      // STEP 5. Append the edit to WAL. Do not sync wal.

    
   
1824
      // -------------------------
1777
      Put first = batchOp.operations[firstIndex].getFirst();
1825
      Put first = batchOp.operations[firstIndex].getFirst();
1778
      this.log.append(regionInfo, this.htableDescriptor.getName(),
1826
      txid = this.log.appendNoSync(regionInfo, this.htableDescriptor.getName(),
1779
          walEdit, first.getClusterId(), now, this.htableDescriptor);
1827
               walEdit, first.getClusterId(), now, this.htableDescriptor);
1780

    
   
1828

   
1781
      // ------------------------------------
1829
      // -------------------------------
1782
      // STEP 4. Write back to memstore
1830
      // STEP 6. Release row locks, etc.
1783
      // ----------------------------------
1831
      // -------------------------------
1784
      long addedSize = 0;
1832
      if (locked) {
1785
      for (int i = firstIndex; i < lastIndexExclusive; i++) {
1833
        this.updatesLock.readLock().unlock();
1786
        if (batchOp.retCodeDetails[i].getOperationStatusCode()
1834
        locked = false;
1787
            != OperationStatusCode.NOT_RUN) {
Moved to 1800

   
1788
          continue;
Moved to 1801

   
1789
        }
1835
      }
1790
        addedSize += applyFamilyMapToMemstore(familyMaps[i]);
1836
      if (acquiredLocks != null) {
1791
        batchOp.retCodeDetails[i] = new OperationStatus(
1837
        for (Integer toRelease : acquiredLocks) {
1792
            OperationStatusCode.SUCCESS);
1838
          releaseRowLock(toRelease);

    
   
1839
        }

    
   
1840
        acquiredLocks = null;

    
   
1841
      }

    
   
1842
      // -------------------------

    
   
1843
      // STEP 7. Sync wal.

    
   
1844
      // -------------------------

    
   
1845
      if (walEdit.size() > 0 && 

    
   
1846
          (this.regionInfo.isMetaRegion() || 

    
   
1847
           !this.htableDescriptor.isDeferredLogFlush())) {

    
   
1848
        this.log.sync(txid);

    
   
1849
      }

    
   
1850
      walSyncSuccessful = true;

    
   
1851
      // ------------------------------------------------------------------

    
   
1852
      // STEP 8. Advance rwcc. This will make this put visible to scanners and getters.

    
   
1853
      // ------------------------------------------------------------------

    
   
1854
      if (w != null) {

    
   
1855
        rwcc.completeMemstoreInsert(w);

    
   
1856
        w = null;
1793
      }
1857
      }
1794

    
   
1858

   
1795
      // ------------------------------------
1859
      // ------------------------------------
1796
      // STEP 5. Run coprocessor post hooks
1860
      // STEP 9. Run coprocessor post hooks. This should be done after the wal is

    
   
1861
      // sycned so that the coprocessor contract is adhered to.
1797
      // ------------------------------------
1862
      // ------------------------------------
1798
      if (coprocessorHost != null) {
1863
      if (coprocessorHost != null) {
1799
        for (int i = firstIndex; i < lastIndexExclusive; i++) {
1864
        for (int i = firstIndex; i < lastIndexExclusive; i++) {
1800
          // only for successful puts
1865
          // only for successful puts
1801
          if (batchOp.retCodeDetails[i].getOperationStatusCode()
1866
          if (batchOp.retCodeDetails[i].getOperationStatusCode()
[+20] [20] 6 lines
[+20] private long doMiniBatchPut(
1808
      }
1873
      }
1809

    
   
1874

   
1810
      success = true;
1875
      success = true;
1811
      return addedSize;
1876
      return addedSize;
1812
    } finally {
1877
    } finally {
1813
      if (locked)
1878

   

    
   
1879
      // if the wal sync was unsuccessful, remove keys from memstore

    
   
1880
      if (!walSyncSuccessful) {

    
   
1881
        rollbackMemstore(batchOp, familyMaps, firstIndex, lastIndexExclusive);

    
   
1882
      }

    
   
1883
      if (w != null) rwcc.completeMemstoreInsert(w);

    
   
1884

   

    
   
1885
      if (locked) {
1814
        this.updatesLock.readLock().unlock();
1886
        this.updatesLock.readLock().unlock();

    
   
1887
      }
1815

    
   
1888

   

    
   
1889
      if (acquiredLocks != null) {
1816
      for (Integer toRelease : acquiredLocks) {
1890
        for (Integer toRelease : acquiredLocks) {
1817
        releaseRowLock(toRelease);
1891
          releaseRowLock(toRelease);
1818
      }
1892
        }

    
   
1893
      }
1819
      if (!success) {
1894
      if (!success) {
1820
        for (int i = firstIndex; i < lastIndexExclusive; i++) {
1895
        for (int i = firstIndex; i < lastIndexExclusive; i++) {
1821
          if (batchOp.retCodeDetails[i].getOperationStatusCode() == OperationStatusCode.NOT_RUN) {
1896
          if (batchOp.retCodeDetails[i].getOperationStatusCode() == OperationStatusCode.NOT_RUN) {
1822
            batchOp.retCodeDetails[i] = new OperationStatus(
1897
            batchOp.retCodeDetails[i] = new OperationStatus(
1823
                OperationStatusCode.FAILURE);
1898
                OperationStatusCode.FAILURE);
[+20] [20] 226 lines
[+20] [+] private void internalPut(Put put, UUID clusterId,
2050
        addFamilyMapToWALEdit(familyMap, walEdit);
2125
        addFamilyMapToWALEdit(familyMap, walEdit);
2051
        this.log.append(regionInfo, this.htableDescriptor.getName(),
2126
        this.log.append(regionInfo, this.htableDescriptor.getName(),
2052
            walEdit, clusterId, now, this.htableDescriptor);
2127
            walEdit, clusterId, now, this.htableDescriptor);
2053
      }
2128
      }
2054

    
   
2129

   
2055
      long addedSize = applyFamilyMapToMemstore(familyMap);
2130
      long addedSize = applyFamilyMapToMemstore(familyMap, null);
2056
      flush = isFlushSize(this.addAndGetGlobalMemstoreSize(addedSize));
2131
      flush = isFlushSize(this.addAndGetGlobalMemstoreSize(addedSize));
2057
    } finally {
2132
    } finally {
2058
      this.updatesLock.readLock().unlock();
2133
      this.updatesLock.readLock().unlock();
2059
    }
2134
    }
2060

    
   
2135

   
[+20] [20] 11 lines
[+20] private void internalPut(Put put, UUID clusterId,
2072
   * Atomically apply the given map of family->edits to the memstore.
2147
   * Atomically apply the given map of family->edits to the memstore.
2073
   * This handles the consistency control on its own, but the caller
2148
   * This handles the consistency control on its own, but the caller
2074
   * should already have locked updatesLock.readLock(). This also does
2149
   * should already have locked updatesLock.readLock(). This also does
2075
   * <b>not</b> check the families for validity.
2150
   * <b>not</b> check the families for validity.
2076
   *
2151
   *

    
   
2152
   * @param familyMap Map of kvs per family

    
   
2153
   * @param localizedWriteEntry The WriteEntry of the RWCC for this transaction
2077
   * @return the additional memory usage of the memstore caused by the
2154
   * @return the additional memory usage of the memstore caused by the
2078
   * new entries.
2155
   * new entries.
2079
   */
2156
   */
2080
  private long applyFamilyMapToMemstore(Map<byte[], List<KeyValue>> familyMap) {
2157
  private long applyFamilyMapToMemstore(Map<byte[], List<KeyValue>> familyMap,
2081
    ReadWriteConsistencyControl.WriteEntry w = null;
2158
    ReadWriteConsistencyControl.WriteEntry localizedWriteEntry) {
2082
    long size = 0;
2159
    long size = 0;

    
   
2160
    boolean freerwcc = false;

    
   
2161

   
2083
    try {
2162
    try {
2084
      w = rwcc.beginMemstoreInsert();
2163
      if (localizedWriteEntry == null) {

    
   
2164
        localizedWriteEntry = rwcc.beginMemstoreInsert();

    
   
2165
        freerwcc = true;

    
   
2166
      }
2085

    
   
2167

   
2086
      for (Map.Entry<byte[], List<KeyValue>> e : familyMap.entrySet()) {
2168
      for (Map.Entry<byte[], List<KeyValue>> e : familyMap.entrySet()) {
2087
        byte[] family = e.getKey();
2169
        byte[] family = e.getKey();
2088
        List<KeyValue> edits = e.getValue();
2170
        List<KeyValue> edits = e.getValue();
2089

    
   
2171

   
2090
        Store store = getStore(family);
2172
        Store store = getStore(family);
2091
        for (KeyValue kv: edits) {
2173
        for (KeyValue kv: edits) {
2092
          kv.setMemstoreTS(w.getWriteNumber());
2174
          kv.setMemstoreTS(localizedWriteEntry.getWriteNumber());
2093
          size += store.add(kv);
2175
          size += store.add(kv);
2094
        }
2176
        }
2095
      }
2177
      }
2096
    } finally {
2178
    } finally {
2097
      rwcc.completeMemstoreInsert(w);
2179
      if (freerwcc) {

    
   
2180
        rwcc.completeMemstoreInsert(localizedWriteEntry);

    
   
2181
      }
2098
    }
2182
    }
2099
    return size;
2183
    return size;
2100
  }
2184
  }
2101

    
   
2185

   
2102
  /**
2186
  /**

    
   
2187
   * Remove all the keys listed in the map from the memstore. This method is

    
   
2188
   * called rarely, only during error recovery for uncommitted transactions. 

    
   
2189
   */

    
   
2190
  private void rollbackMemstore(BatchOperationInProgress<Pair<Put, Integer>> batchOp,

    
   
2191
                                Map<byte[], List<KeyValue>>[] familyMaps,

    
   
2192
                                int start, int end) {

    
   
2193
    for (int i = start; i < end; i++) {

    
   
2194
      // skip over request that never succeeded in the first place.

    
   
2195
      if (batchOp.retCodeDetails[i].getOperationStatusCode()

    
   
2196
            != OperationStatusCode.SUCCESS) {

    
   
2197
        continue;

    
   
2198
      }

    
   
2199

   

    
   
2200
      // acquire the row lock for this operation

    
   
2201
      Pair<Put, Integer> nextPair = batchOp.operations[i];

    
   
2202
      Put put = nextPair.getFirst();

    
   
2203
      Integer providedLockId = nextPair.getSecond();

    
   
2204
      Integer acquiredLockId = null;

    
   
2205
      try {

    
   
2206
        acquiredLockId = getLock(providedLockId, put.getRow(), true);

    
   
2207
      } catch (IOException e) {

    
   
2208
        LOG.warn("Unable to rollback a row but continuing with other rows.");

    
   
2209
        continue;

    
   
2210
      }

    
   
2211

   

    
   
2212
      // Rollback all the kvs for this row. 

    
   
2213
      Map<byte[], List<KeyValue>> familyMap  = familyMaps[i]; 

    
   
2214
      for (Map.Entry<byte[], List<KeyValue>> e : familyMap.entrySet()) {

    
   
2215
        byte[] family = e.getKey();

    
   
2216
        List<KeyValue> edits = e.getValue();

    
   
2217

   

    
   
2218
        // Remove those keys from the memstore that matches our 

    
   
2219
        // key's (row, cf, cq, timestamp, memstoreTS). The interesting part is

    
   
2220
        // that even the memstoreTS has to match for keys that will be rolleded-back.

    
   
2221
        Store store = getStore(family);

    
   
2222
        for (KeyValue kv: edits) {

    
   
2223
          store.rollback(kv);

    
   
2224
        }

    
   
2225
      }

    
   
2226

   

    
   
2227
      // if we acquired the row lock for the sole purpose of rollback, 

    
   
2228
      // release it here.

    
   
2229
      if (providedLockId == null) {

    
   
2230
        releaseRowLock(acquiredLockId);

    
   
2231
      }

    
   
2232
    }

    
   
2233
  }

    
   
2234

   

    
   
2235
  /**
2103
   * Check the collection of families for validity.
2236
   * Check the collection of families for validity.
2104
   * @throws NoSuchColumnFamilyException if a family does not exist.
2237
   * @throws NoSuchColumnFamilyException if a family does not exist.
2105
   */
2238
   */
2106
  private void checkFamilies(Collection<byte[]> families)
2239
  private void checkFamilies(Collection<byte[]> families)
2107
  throws NoSuchColumnFamilyException {
2240
  throws NoSuchColumnFamilyException {
[+20] [20] 2144 lines
/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueSkipListSet.java
Revision 1184991 New Change
 
/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
Revision 1184991 New Change
 
/src/main/java/org/apache/hadoop/hbase/regionserver/ReadWriteConsistencyControl.java
Revision 1184991 New Change
 
/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Revision 1184991 New Change
 
/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
Revision 1184991 New Change
 
/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java
New File
 
/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
Revision 1184991 New Change
 
/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
Revision 1184991 New Change
 
  1. /src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: Loading...
  2. /src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueSkipListSet.java: Loading...
  3. /src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java: Loading...
  4. /src/main/java/org/apache/hadoop/hbase/regionserver/ReadWriteConsistencyControl.java: Loading...
  5. /src/main/java/org/apache/hadoop/hbase/regionserver/Store.java: Loading...
  6. /src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java: Loading...
  7. /src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java: Loading...
  8. /src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java: Loading...
  9. /src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java: Loading...