mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-09 06:39:25 +00:00
fix(table-catalog): fix object kind validation (#5784)
Signed-off-by: Sergei Nikolaev <kinolaev@gmail.com> Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -3466,7 +3466,7 @@ fn table_commit_object_key(
|
||||
let object_kind =
|
||||
crate::table_catalog::table_maintenance_object_kind(namespace, table, Some(&warehouse_object_prefix), &object_key)
|
||||
.ok_or_else(|| s3_error!(InvalidRequest, "snapshot object is outside the table warehouse"))?;
|
||||
if object_kind != expected_kind {
|
||||
if !crate::table_catalog::table_maintenance_object_kind_matches_reference(&object_kind, &expected_kind) {
|
||||
return Err(s3_error!(InvalidRequest, "snapshot object kind does not match manifest metadata"));
|
||||
}
|
||||
Ok(object_key)
|
||||
|
||||
Reference in New Issue
Block a user