private static void undoUpsertOrDelete(ILSMIndexAccessor indexAccessor, ILogRecord logRecord) throws HyracksDataException { if (logRecord.getOldValue() == null) { try { indexAccessor.forcePhysicalDelete(logRecord.getNewValue()); } catch (HyracksDataException hde) { // Since we're undoing according the write-ahead log, the actual upserting tuple // might not have been written to memory yet. if (hde.getErrorCode() != ErrorCode.UPDATE_OR_DELETE_NON_EXISTENT_KEY) { throw hde; } } } else { indexAccessor.forceUpsert(logRecord.getOldValue()); } }