Source:
<code>private void applyTtlUpdate(MessageInfo messageInfo, RemoteReplicaInfo remoteReplicaInfo) throws IOException, MessageFormatException, StoreException { MessageFormatInputStream ttlUpdateStream = new TtlUpdateMessageFormatInputStream(messageInfo.getStoreKey(), messageInfo.getAccountId(), messageInfo.getContainerId(), messageInfo.getOperationTimeMs()); MessageInfo info = new MessageInfo(messageInfo.getStoreKey(), ttlUpdateStream.getSize(), false, true, messageInfo.getAccountId(), messageInfo.getContainerId(), messageInfo.getOperationTimeMs()); MessageFormatWriteSet writeSet = new MessageFormatWriteSet(ttlUpdateStream, Collections.singletonList(info), false); DataNodeId remoteNode = remoteReplicaInfo.getReplicaId().getDataNodeId(); try { remoteReplicaInfo.getLocalStore().updateTtl(writeSet); logger.trace("Remote node: Thread name: Remote replica: Key ttl updated id: {}", remoteNode, threadName, <START> remoteReplicaInfo.getReplicaId(), messageInfo.getStoreKey()); <END> } catch (StoreException e) { if (e.getErrorCode() == StoreErrorCodes.ID_Deleted || e.getErrorCode() == StoreErrorCodes.Already_Updated) { logger.trace("Remote node: Thread name: Remote replica: Key already updated: {}", remoteNode, threadName, remoteReplicaInfo.getReplicaId(), messageInfo.getStoreKey()); } else { throw e; } } if (notification != null) { notification.onBlobReplicaUpdated(dataNodeId.getHostname(), dataNodeId.getPort(), messageInfo.getStoreKey().getID(), BlobReplicaSourceType.REPAIRED, UpdateType.TTL_UPDATE, messageInfo); } }</code><technical_language>ttl updates compaction? If this scenario store is compacted afterward, this stale ttl update get removed</technical_language>

Target:
private void applyTtlUpdate(MessageInfo messageInfo, RemoteReplicaInfo remoteReplicaInfo) throws IOException, MessageFormatException, StoreException { MessageFormatInputStream ttlUpdateStream = new TtlUpdateMessageFormatInputStream(messageInfo.getStoreKey(), messageInfo.getAccountId(), messageInfo.getContainerId(), messageInfo.getExpirationTimeInMs(), messageInfo.getOperationTimeMs()); MessageInfo info = new MessageInfo(messageInfo.getStoreKey(), ttlUpdateStream.getSize(), false, true, messageInfo.getExpirationTimeInMs(), messageInfo.getAccountId(), messageInfo.getContainerId(), messageInfo.getOperationTimeMs()); MessageFormatWriteSet writeSet = new MessageFormatWriteSet(ttlUpdateStream, Collections.singletonList(info), false); DataNodeId remoteNode = remoteReplicaInfo.getReplicaId().getDataNodeId(); try { remoteReplicaInfo.getLocalStore().updateTtl(writeSet); logger.trace("Remote node: Thread name: Remote replica: Key ttl updated id: {}", remoteNode, threadName, remoteReplicaInfo.getReplicaId(), messageInfo.getStoreKey()); } catch (StoreException e) { if (e.getErrorCode() == StoreErrorCodes.ID_Deleted || e.getErrorCode() == StoreErrorCodes.Already_Updated) { logger.trace("Remote node: Thread name: Remote replica: Key already updated: {}", remoteNode, threadName, remoteReplicaInfo.getReplicaId(), messageInfo.getStoreKey()); } else { throw e; } } if (notification != null) { notification.onBlobReplicaUpdated(dataNodeId.getHostname(), dataNodeId.getPort(), messageInfo.getStoreKey().getID(), BlobReplicaSourceType.REPAIRED, UpdateType.TTL_UPDATE, messageInfo); } }