void deleteWeakRow() { if (weakNotification != null) { env.getSharedResources().getBatchWriter() .writeMutation(weakNotification.newDelete(env, startTs)); } }
private void rollback(CommitData cd) throws MutationsRejectedException { // roll back locks // TODO let rollback be done lazily? this makes GC more difficult Flutation m; ArrayList<Mutation> mutations = new ArrayList<>(cd.acceptedRows.size()); for (Bytes row : cd.acceptedRows) { m = new Flutation(env, row); for (Column col : updates.get(row).keySet()) { m.put(col, ColumnConstants.DEL_LOCK_PREFIX | startTs, DelLockValue.encode(startTs, false, true)); } mutations.add(m); } env.getSharedResources().getBatchWriter().writeMutations(mutations); // mark transaction as complete for garbage collection purposes m = new Flutation(env, cd.prow); // TODO timestamp? // TODO writing the primary column with a batch writer is iffy m.put(cd.pcol, ColumnConstants.DEL_LOCK_PREFIX | startTs, DelLockValue.encode(startTs, false, true)); m.put(cd.pcol, ColumnConstants.TX_DONE_PREFIX | startTs, EMPTY); env.getSharedResources().getBatchWriter().writeMutation(m); }