fix(madmin): restore server_info msgpack compatibility across mixed nodes (#2621)

This commit is contained in:
houseme
2026-04-21 09:09:25 +08:00
committed by GitHub
parent 3796b684f0
commit b7a945e453
6 changed files with 141 additions and 9 deletions
+3 -1
View File
@@ -204,7 +204,9 @@ impl NodeService {
) -> Result<Response<ServerInfoResponse>, Status> {
let info = get_local_server_property().await;
let mut buf = Vec::new();
if let Err(err) = info.serialize(&mut Serializer::new(&mut buf)) {
// Use map encoding for forward/backward compatibility across mixed versions:
// unknown fields can be ignored by older nodes during deserialization.
if let Err(err) = info.serialize(&mut Serializer::new(&mut buf).with_struct_map()) {
return Ok(Response::new(ServerInfoResponse {
success: false,
server_properties: Bytes::new(),