// "waitForActiveFlushes" after the new segment has been created.
logger.debug("truncating {}", columnFamily);
// flush the CF being truncated before forcing the new segment
forceBlockingFlush();
CommitLog.instance.forceNewSegment();
ReplayPosition position = CommitLog.instance.getContext();
// now flush everyone else. re-flushing ourselves is not necessary, but harmless
for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
cfs.forceFlush();
waitForActiveFlushes();
// if everything was clean, flush won't have called discard