Signaling for a segment to be potentially deleted requires a read lock on the topic (to make sure we aren't deleting the active segment). Given that a segment can be flagged for deletion while writing (because we need a new one, so maybe the old one can be removed), the path was deadlocking.
Signaling for a segment to be potentially deleted requires a read lock on the
topic (to make sure we aren't deleting the active segment). Given that a segment
can be flagged for deletion while writing (because we need a new one, so maybe
the old one can be removed), the path was deadlocking.

I'd like to do this without a goroutine. The easy solution is to push the burden
up to Write, since its managing Expand's lock, but I don't like that.

karlseguin/sq,jmptrader/sq