-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/cli: Coalesce identical channels by default #985
go/cli: Coalesce identical channels by default #985
Conversation
5bff47e
to
9254f87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 The idea seems fine to me but I don't think I'm the best person to review the code changes.
@wkalt @james-rms thoughts? |
Friendly ping @wkalt / @james-rms / @narasaka |
go/cli/mcap/cmd/merge.go
Outdated
} | ||
|
||
hash := hasher.Sum(nil) | ||
return hex.EncodeToString(hash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems odd to me that we store the hash as a string rather than a fixed size value - won't block the PR, just seems odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like channelIdByHash should key off the result of hasher.Sum()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Should I do the same for the schemaIDByHash
map ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that would be good.
Changes the default behavior of `mcap merge` to automatically coalesce identical channels. Channels are considered identical when their topic, schema, message encoding and metadata equals. One can force coalescing of channels with different metadata with `--coalesce-channels force`. Channel coalescing can also be completely disabled with `--coalesce-channels none`.
6fce3dc
to
eb8491f
Compare
### Public-Facing Changes go/cli: Coalesce identical channels by default ### Description Changes the default behavior of `mcap merge` to automatically coalesce identical channels. Channels are considered identical when their topic, schema, message encoding and metadata equals. One can force coalescing of channels with different metadata with `--coalesce-channels force`. Channel coalescing can also be completely disabled with `--coalesce-channels none`.
Public-Facing Changes
go/cli: Coalesce identical channels by default
Description
Changes the default behavior of
mcap merge
to automatically coalesce identical channels. Channels are considered identical when their topic, schema, message encoding and metadata equals. One can force coalescing of channels with different metadata with--coalesce-channels force
. Channel coalescing can also be completely disabled with--coalesce-channels none
.