Source:
<code>private IndexValue markAsDeleted(StoreKey id, FileSpan fileSpan, MessageInfo info, long deletionTimeMs, short lifeVersion) throws StoreException { boolean hasLifeVersion = lifeVersion > (short) -1; validateFileSpan(fileSpan, true); IndexValue value = findKey(id); if (value == null && info == null) { throw new StoreException("Id " + id + " not present in index " + dataDir, StoreErrorCodes.ID_Not_Found); } else if (value != null) { if (value.isFlagSet(IndexValue.Flags.Delete_Index)) { throw new StoreException("Id " + id + " already deleted in index " + dataDir, StoreErrorCodes.ID_Deleted); <START> } else if (hasLifeVersion && value.getLifeVersion() > lifeVersion) { <END> throw new StoreException("LifeVersion conflict in index. Id " + id + " LifeVersion: " + value.getLifeVersion() + " Delete LifeVersion: " + lifeVersion, StoreErrorCodes.Life_Version_Conflict); } } long size = fileSpan.getEndOffset().getOffset() - fileSpan.getStartOffset().getOffset(); IndexValue newValue; if (value == null) { lifeVersion = lifeVersion < 0 ? 0 : lifeVersion; newValue = new IndexValue(size, fileSpan.getStartOffset(), IndexValue.FLAGS_DEFAULT_VALUE, info.getExpirationTimeInMs(), info.getOperationTimeMs(), info.getAccountId(), info.getContainerId(), lifeVersion); newValue.clearOriginalMessageOffset(); } else { lifeVersion = hasLifeVersion ? lifeVersion : value.getLifeVersion(); newValue = new IndexValue(value.getSize(), value.getOffset(), value.getFlags(), value.getExpiresAtMs(), deletionTimeMs, value.getAccountId(), value.getContainerId(), lifeVersion); newValue.setNewOffset(fileSpan.getStartOffset()); newValue.setNewSize(size); } newValue.setFlag(IndexValue.Flags.Delete_Index); addToIndex(new IndexEntry(id, newValue, null), fileSpan); return newValue; }</code><technical_language>shoudn't this value.getLiftVersion() == lifeVersion</technical_language>

Target:
IndexValue markAsDeleted(StoreKey id, FileSpan fileSpan, MessageInfo info, long deletionTimeMs, short lifeVersion) throws StoreException { boolean hasLifeVersion = lifeVersion > (short) -1; validateFileSpan(fileSpan, true); IndexValue value = findKey(id); if (value == null && info == null) { throw new StoreException("Id " + id + " not present in index " + dataDir, StoreErrorCodes.ID_Not_Found); } else if (value != null) { if (value.isFlagSet(IndexValue.Flags.Delete_Index)) { throw new StoreException("Id " + id + " already deleted in index " + dataDir, StoreErrorCodes.ID_Deleted); } else if (hasLifeVersion && value.getLifeVersion() > lifeVersion) { throw new StoreException("LifeVersion conflict in index. Id " + id + " LifeVersion: " + value.getLifeVersion() + " Delete LifeVersion: " + lifeVersion, StoreErrorCodes.Life_Version_Conflict); } } long size = fileSpan.getEndOffset().getOffset() - fileSpan.getStartOffset().getOffset(); IndexValue newValue; if (value == null) { lifeVersion = lifeVersion < 0 ? 0 : lifeVersion; newValue = new IndexValue(size, fileSpan.getStartOffset(), IndexValue.FLAGS_DEFAULT_VALUE, info.getExpirationTimeInMs(), info.getOperationTimeMs(), info.getAccountId(), info.getContainerId(), lifeVersion); newValue.clearOriginalMessageOffset(); } else { lifeVersion = hasLifeVersion ? lifeVersion : value.getLifeVersion(); newValue = new IndexValue(value.getSize(), value.getOffset(), value.getFlags(), value.getExpiresAtMs(), deletionTimeMs, value.getAccountId(), value.getContainerId(), lifeVersion); newValue.setNewOffset(fileSpan.getStartOffset()); newValue.setNewSize(size); } newValue.clearFlag(IndexValue.Flags.Undelete_Index); newValue.setFlag(IndexValue.Flags.Delete_Index); addToIndex(new IndexEntry(id, newValue, null), fileSpan); return newValue; }