{
while (iter.hasNext())
{
// deserialize column with PRESERVE_SIZE because we've written the cellDataSize based on the
// data size received, so we must reserialize the exact same data
OnDiskAtom atom = iter.next();
if (atom == null)
break;
if (atom instanceof CounterCell)
{
atom = ((CounterCell) atom).markLocalToBeCleared();
hasLegacyCounterShards = hasLegacyCounterShards || ((CounterCell) atom).hasLegacyShards();
}
int deletionTime = atom.getLocalDeletionTime();
if (deletionTime < Integer.MAX_VALUE)
tombstones.update(deletionTime);
minTimestamp = Math.min(minTimestamp, atom.timestamp());
maxTimestamp = Math.max(maxTimestamp, atom.timestamp());
minColumnNames = ColumnNameHelper.minComponents(minColumnNames, atom.name(), metadata.comparator);
maxColumnNames = ColumnNameHelper.maxComponents(maxColumnNames, atom.name(), metadata.comparator);
maxLocalDeletionTime = Math.max(maxLocalDeletionTime, atom.getLocalDeletionTime());
columnIndexer.add(atom); // This write the atom on disk too
}
columnIndexer.maybeWriteEmptyRowHeader();