Record newRecord = mapService.createRecord(mapName, key, recordReplicationInfo.getValue(), -1, false);
mapService.applyRecordInfo(newRecord, mapName, recordReplicationInfo);
// put record.
final Record existingRecord = recordStore.putRecord(key, newRecord);
// size estimator calculations.
final SizeEstimator sizeEstimator = recordStore.getSizeEstimator();
updateSizeEstimator(-calculateRecordSize(existingRecord, sizeEstimator), sizeEstimator);
updateSizeEstimator(calculateRecordSize(newRecord, sizeEstimator), sizeEstimator);
}
recordStore.setLoaded(true);
}