refactor(meta): remove back compatability supporting code
@@ -715,9 +715,11 @@ impl MetaGrpcClient {
let resp =
res.map_err(|status| MetaHandshakeError::new("handshake is refused", &status))?;
- // backward compatibility: no version in handshake.
- // TODO(xp): remove this when merged.
- if resp.protocol_version > 0 {
+ assert!(
+ resp.protocol_version > 0,
+ "talking to a very old databend-meta: upgrade databend-meta to at least 0.8"
+ );
+
let min_compatible = to_digit_ver(min_metasrv_ver);
if resp.protocol_version < min_compatible {
let invalid_err = AnyError::error(format!(
@@ -730,7 +732,6 @@ impl MetaGrpcClient {
&invalid_err,
));
}
- }
let token = resp.payload;
Ok(token)
