mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
fix(filemeta): inline_data key
This commit is contained in:
@@ -97,6 +97,11 @@ jobs:
|
|||||||
name: rustfs
|
name: rustfs
|
||||||
path: ./target/artifacts
|
path: ./target/artifacts
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libglib2.0-dev pkg-config
|
||||||
|
|
||||||
- name: Run s3s-e2e
|
- name: Run s3s-e2e
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
|
use crate::headers::RESERVED_METADATA_PREFIX_LOWER;
|
||||||
use rmp_serde::Serializer;
|
use rmp_serde::Serializer;
|
||||||
use rustfs_utils::HashAlgorithm;
|
use rustfs_utils::HashAlgorithm;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
@@ -9,7 +10,6 @@ use uuid::Uuid;
|
|||||||
|
|
||||||
use crate::headers::RESERVED_METADATA_PREFIX;
|
use crate::headers::RESERVED_METADATA_PREFIX;
|
||||||
use crate::headers::RUSTFS_HEALING;
|
use crate::headers::RUSTFS_HEALING;
|
||||||
use crate::headers::X_RUSTFS_INLINE_DATA;
|
|
||||||
|
|
||||||
pub const ERASURE_ALGORITHM: &str = "rs-vandermonde";
|
pub const ERASURE_ALGORITHM: &str = "rs-vandermonde";
|
||||||
pub const BLOCK_SIZE_V2: usize = 1024 * 1024; // 1M
|
pub const BLOCK_SIZE_V2: usize = 1024 * 1024; // 1M
|
||||||
@@ -302,10 +302,13 @@ impl FileInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_inline_data(&mut self) {
|
pub fn set_inline_data(&mut self) {
|
||||||
self.metadata.insert(X_RUSTFS_INLINE_DATA.to_owned(), "true".to_owned());
|
self.metadata
|
||||||
|
.insert(format!("{}inline-data", RESERVED_METADATA_PREFIX_LOWER).to_owned(), "true".to_owned());
|
||||||
}
|
}
|
||||||
pub fn inline_data(&self) -> bool {
|
pub fn inline_data(&self) -> bool {
|
||||||
self.metadata.get(X_RUSTFS_INLINE_DATA).is_some_and(|v| v == "true")
|
self.metadata
|
||||||
|
.contains_key(format!("{}inline-data", RESERVED_METADATA_PREFIX_LOWER).as_str())
|
||||||
|
&& !self.is_remote()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if the object is compressed
|
/// Check if the object is compressed
|
||||||
|
|||||||
@@ -1855,12 +1855,12 @@ impl MetaObject {
|
|||||||
|
|
||||||
pub fn inlinedata(&self) -> bool {
|
pub fn inlinedata(&self) -> bool {
|
||||||
self.meta_sys
|
self.meta_sys
|
||||||
.contains_key(format!("{}inline", RESERVED_METADATA_PREFIX_LOWER).as_str())
|
.contains_key(format!("{}inline-data", RESERVED_METADATA_PREFIX_LOWER).as_str())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn reset_inline_data(&mut self) {
|
pub fn reset_inline_data(&mut self) {
|
||||||
self.meta_sys
|
self.meta_sys
|
||||||
.remove(format!("{}inline", RESERVED_METADATA_PREFIX_LOWER).as_str());
|
.remove(format!("{}inline-data", RESERVED_METADATA_PREFIX_LOWER).as_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Remove restore headers
|
/// Remove restore headers
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ pub const RESERVED_METADATA_PREFIX_LOWER: &str = "x-rustfs-internal-";
|
|||||||
pub const RUSTFS_HEALING: &str = "X-Rustfs-Internal-healing";
|
pub const RUSTFS_HEALING: &str = "X-Rustfs-Internal-healing";
|
||||||
// pub const RUSTFS_DATA_MOVE: &str = "X-Rustfs-Internal-data-mov";
|
// pub const RUSTFS_DATA_MOVE: &str = "X-Rustfs-Internal-data-mov";
|
||||||
|
|
||||||
pub const X_RUSTFS_INLINE_DATA: &str = "x-rustfs-inline-data";
|
// pub const X_RUSTFS_INLINE_DATA: &str = "x-rustfs-inline-data";
|
||||||
|
|
||||||
pub const VERSION_PURGE_STATUS_KEY: &str = "X-Rustfs-Internal-purgestatus";
|
pub const VERSION_PURGE_STATUS_KEY: &str = "X-Rustfs-Internal-purgestatus";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user