Source:
<code>void processShadowOpaqueEntry(List<SMREntry> smrEntries, Long currentSeqNum, UUID dstUUID) { CorfuStoreMetadata.Timestamp timestamp = logReplicationMetadataManager.getTimestamp(); long persistConfigID = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.TOPOLOGY_CONFIG_ID); long persistSnapStart = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_STARTED); long persitSeqNum = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_APPLIED_SEQ_NUM); if (siteConfigID != persistConfigID || srcGlobalSnapshot != persistSnapStart || currentSeqNum != (persitSeqNum + 1)) { log.warn("Skip current processing as the persistent metadata has applied more recent message than current siteConfigID " + "srcGlobalSnapshot currentAppliedSeqNum {}", logReplicationMetadataManager.toString(), siteConfigID, srcGlobalSnapshot, currentSeqNum); return; } TxBuilder txBuilder = logReplicationMetadataManager.getTxBuilder(); logReplicationMetadataManager.appendUpdate(txBuilder, LogReplicationMetadataManager.LogReplicationMetadataType.TOPOLOGY_CONFIG_ID, siteConfigID); logReplicationMetadataManager.appendUpdate(txBuilder, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_APPLIED_SEQ_NUM, currentSeqNum); for (SMREntry smrEntry : smrEntries) { txBuilder.logUpdate(dstUUID, smrEntry); } try { txBuilder.commit(timestamp); } catch (Exception e) { <START> log.warn("Caught an exception ", e); <END> throw e; } log.debug("Process the entries and set applied sequence number ", smrEntries, currentSeqNum); }</code><technical_language>commits() need rethrow exception, do want throw exception if is UnrecoverableException</technical_language>

Target:
void processShadowOpaqueEntry(List<SMREntry> smrEntries, Long currentSeqNum, UUID dstUUID) { CorfuStoreMetadata.Timestamp timestamp = logReplicationMetadataManager.getTimestamp(); long persistConfigID = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.TOPOLOGY_CONFIG_ID); long persistSnapStart = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_STARTED); long persitSeqNum = logReplicationMetadataManager.query(timestamp, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_APPLIED_SEQ_NUM); if (topologyConfigID != persistConfigID || srcGlobalSnapshot != persistSnapStart || currentSeqNum != (persitSeqNum + 1)) { log.warn("Skip current processing as the persistent metadata has applied more recent message than current topologyConfigID " + "srcGlobalSnapshot currentAppliedSeqNum {}", logReplicationMetadataManager.toString(), topologyConfigID, srcGlobalSnapshot, currentSeqNum); return; } TxBuilder txBuilder = logReplicationMetadataManager.getTxBuilder(); logReplicationMetadataManager.appendUpdate(txBuilder, LogReplicationMetadataManager.LogReplicationMetadataType.TOPOLOGY_CONFIG_ID, topologyConfigID); logReplicationMetadataManager.appendUpdate(txBuilder, LogReplicationMetadataManager.LogReplicationMetadataType.LAST_SNAPSHOT_APPLIED_SEQ_NUM, currentSeqNum); for (SMREntry smrEntry : smrEntries) { txBuilder.logUpdate(dstUUID, smrEntry); } try { txBuilder.commit(timestamp); } catch (Exception e) { log.warn("Caught an exception ", e); if (!(e instanceof TransactionAbortedException)) { throw e; } } log.debug("Process the entries and set applied sequence number ", smrEntries, currentSeqNum); }