Source:
<code>public void start() throws ReplicationException { try { for (String mountPath : partitionGroupedByMountPath.keySet()) { <START> readFromFileAndPersist(mountPath); <END> } logger.info("Number of intra DC replica threads: " + replicationConfig.replicationNumOfIntraDCReplicaThreads); logger.info("Number of intra DC nodes to replicate from: " + replicasToReplicateIntraDC.size()); assignReplicasToThreads(replicasToReplicateIntraDC, replicationConfig.replicationNumOfIntraDCReplicaThreads, replicationIntraDCThreads, "Intra DC"); logger.info("Number of inter DC replica threads: " + replicationConfig.replicationNumOfInterDCReplicaThreads); logger.info("Number of inter DC nodes to replicate from: " + replicasToReplicateInterDC.size()); assignReplicasToThreads(replicasToReplicateInterDC, replicationConfig.replicationNumOfInterDCReplicaThreads, replicationInterDCThreads, "Inter DC"); for (ReplicaThread thread : replicationIntraDCThreads) { Thread replicaThread = Utils.newThread(thread.getName(), thread, false); logger.info("Starting intra DC replica thread " + thread.getName()); replicaThread.start(); } for (ReplicaThread thread : replicationInterDCThreads) { Thread replicaThread = Utils.newThread(thread.getName(), thread, false); logger.info("Starting inter DC replica thread " + thread.getName()); replicaThread.start(); } this.scheduler.schedule("replica token persistor", persistor, replicationConfig.replicationTokenFlushDelaySeconds, replicationConfig.replicationTokenFlushIntervalSeconds, TimeUnit.SECONDS); } catch (IOException e) { logger.error("IO error while starting replication"); } }</code><technical_language>change this readFromFileAndMayPersist</technical_language>

Target:
public void start() throws ReplicationException { try { for (String mountPath : partitionGroupedByMountPath.keySet()) { readFromFileAndPersistIfNecessary(mountPath); } logger.info("Number of intra DC replica threads: " + replicationConfig.replicationNumOfIntraDCReplicaThreads); logger.info("Number of intra DC nodes to replicate from: " + replicasToReplicateIntraDC.size()); assignReplicasToThreads(replicasToReplicateIntraDC, replicationConfig.replicationNumOfIntraDCReplicaThreads, replicationIntraDCThreads, "Intra DC"); logger.info("Number of inter DC replica threads: " + replicationConfig.replicationNumOfInterDCReplicaThreads); logger.info("Number of inter DC nodes to replicate from: " + replicasToReplicateInterDC.size()); assignReplicasToThreads(replicasToReplicateInterDC, replicationConfig.replicationNumOfInterDCReplicaThreads, replicationInterDCThreads, "Inter DC"); for (ReplicaThread thread : replicationIntraDCThreads) { Thread replicaThread = Utils.newThread(thread.getName(), thread, false); logger.info("Starting intra DC replica thread " + thread.getName()); replicaThread.start(); } for (ReplicaThread thread : replicationInterDCThreads) { Thread replicaThread = Utils.newThread(thread.getName(), thread, false); logger.info("Starting inter DC replica thread " + thread.getName()); replicaThread.start(); } this.scheduler.schedule("replica token persistor", persistor, replicationConfig.replicationTokenFlushDelaySeconds, replicationConfig.replicationTokenFlushIntervalSeconds, TimeUnit.SECONDS); } catch (IOException e) { logger.error("IO error while starting replication"); } }