Skip to content

Commit

Permalink
Don't clear channels on writer close() (#1194)
Browse files Browse the repository at this point in the history
Don't clear channels on writer close(). This matches the behavior
schemas has, allowing for stable ids after closing and opening a new
file with the same reader. See
https://foxglove.slack.com/archives/C02H1JXG3C3/p1720827358364829?thread_ts=1720825408.044619&cid=C02H1JXG3C3

Alternatives to this involve more bookkeeping on the recorder
implementation side to re-register all schemas/channels on split.
  • Loading branch information
kyle-basis authored Sep 25, 2024
1 parent ef36f4b commit c0bc479
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cpp/mcap/include/mcap/writer.inl
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ void McapWriter::terminate() {
zstdChunk_.reset();
#endif

channels_.clear();
attachmentIndex_.clear();
metadataIndex_.clear();
chunkIndex_.clear();
Expand Down

0 comments on commit c0bc479

Please sign in to comment.