mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: remove panic for message type in recovery storage and marshal log (#43976)
issue: #43897 Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
parent
26c5c779bf
commit
f5cee0012a
@ -284,8 +284,6 @@ func (r *recoveryStorageImpl) handleMessage(msg message.ImmutableMessage) {
|
||||
r.handleSchemaChange(immutableMsg)
|
||||
case message.MessageTypeTimeTick:
|
||||
// nothing, the time tick message make no recovery operation.
|
||||
default:
|
||||
panic("unreachable: some message type can not be consumed, there's a critical bug.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,9 @@ func (m *messageImpl) MarshalLogObject(enc zapcore.ObjectEncoder) error {
|
||||
return nil
|
||||
}
|
||||
enc.AddString("type", m.MessageType().String())
|
||||
enc.AddString("vchannel", m.VChannel())
|
||||
if m.properties.Exist(messageVChannel) {
|
||||
enc.AddString("vchannel", m.VChannel())
|
||||
}
|
||||
if m.properties.Exist(messageTimeTick) {
|
||||
enc.AddUint64("timetick", m.TimeTick())
|
||||
}
|
||||
@ -25,6 +27,7 @@ func (m *messageImpl) MarshalLogObject(enc zapcore.ObjectEncoder) error {
|
||||
}
|
||||
if broadcast := m.BroadcastHeader(); broadcast != nil {
|
||||
enc.AddInt64("broadcastID", int64(broadcast.BroadcastID))
|
||||
enc.AddString("broadcastVChannels", strings.Join(broadcast.VChannels, ","))
|
||||
}
|
||||
enc.AddInt("size", len(m.payload))
|
||||
marshalSpecializedHeader(m.MessageType(), m.Version(), m.properties[messageHeader], enc)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user