@Override public DResult delete(byte[] row, long startId) throws IOException { Integer lockId = region.getLock(null, row, true); try { byte[] columnsWritten = MVCC.writeCheckRowStatus(this, getTrxMetaTable(), row, false, lockId, startId); Put deletePut = deletePut(row, startId, columnsWritten); mutateRow(deletePut, lockId); return null; } catch (InvalidRowStatusException e) { return new DResult(null, e.getMessage()); } finally { region.releaseRowLock(lockId); } }
@Override public DResult put(Put put, long startId, boolean locking) throws IOException { Integer lockId = region.getLock(null, put.getRow(), true); try { byte[] columnsWritten = MVCC.writeCheckRowStatus(this, getTrxMetaTable(), put.getRow(), locking, lockId, startId); Put innerPut = clonePut(put, startId, locking, columnsWritten); mutateRow(innerPut, lockId); return null; } catch (InvalidRowStatusException e) { return new DResult(null, e.getMessage()); } finally { region.releaseRowLock(lockId); } }