mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
fix(tagging): fix e2e test_object_tagging failure (#1327)
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -160,7 +160,7 @@ jobs:
|
||||
with:
|
||||
tool: s3s-e2e
|
||||
git: https://github.com/Nugine/s3s.git
|
||||
rev: b7714bfaa17ddfa9b23ea01774a1e7bbdbfc2ca3
|
||||
rev: 9e41304ed549b89cfb03ede98e9c0d2ac7522051
|
||||
|
||||
- name: Build debug binary
|
||||
run: |
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
use rustfs_utils::hash::EMPTY_STRING_SHA256_HASH;
|
||||
|
||||
pub struct RemoveBucketOptions {
|
||||
_forced_elete: bool,
|
||||
_forced_delete: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -473,12 +473,30 @@ impl FileMeta {
|
||||
match version.header.version_type {
|
||||
VersionType::Invalid | VersionType::Legacy => (),
|
||||
VersionType::Object => {
|
||||
if version.header.version_id == fi.version_id {
|
||||
// For non-versioned buckets, treat None as Uuid::nil()
|
||||
let fi_vid = fi.version_id.or(Some(Uuid::nil()));
|
||||
let ver_vid = version.header.version_id.or(Some(Uuid::nil()));
|
||||
|
||||
if ver_vid == fi_vid {
|
||||
let mut ver = FileMetaVersion::try_from(version.meta.as_slice())?;
|
||||
|
||||
if let Some(ref mut obj) = ver.object {
|
||||
for (k, v) in fi.metadata.iter() {
|
||||
obj.meta_user.insert(k.clone(), v.clone());
|
||||
// Split metadata into meta_user and meta_sys based on prefix
|
||||
// This logic must match From<FileInfo> for MetaObject
|
||||
if k.len() > RESERVED_METADATA_PREFIX.len()
|
||||
&& (k.starts_with(RESERVED_METADATA_PREFIX) || k.starts_with(RESERVED_METADATA_PREFIX_LOWER))
|
||||
{
|
||||
// Skip internal flags that shouldn't be persisted
|
||||
if k == headers::X_RUSTFS_HEALING || k == headers::X_RUSTFS_DATA_MOV {
|
||||
continue;
|
||||
}
|
||||
// Insert into meta_sys
|
||||
obj.meta_sys.insert(k.clone(), v.as_bytes().to_vec());
|
||||
} else {
|
||||
// Insert into meta_user
|
||||
obj.meta_user.insert(k.clone(), v.clone());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(mod_time) = fi.mod_time {
|
||||
|
||||
Reference in New Issue
Block a user