mirror of
https://github.com/rustfs/rustfs.git
synced 2026-11-02 09:04:14 +00:00
c0f3f9a108
* perf(filemeta,ecstore): avoid redundant decodes and clones on xl.meta write and delete paths * perf(filemeta): remove restore parsing allocations and add guards Borrow restore header fields instead of allocating temporary vectors and reuse the canonical dual-prefix metadata key guard. Cover scanner/full decoder equivalence on historical and mutated records, restore grammar, and the complete old-current observation tuple. Add the missing Criterion entry for unshared data-directory selection. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * bench(filemeta): isolate metadata mutation and batch deletion costs Move the metadata-only Criterion target to filemeta so it does not build ECStore. Add deterministic physical and inline dense/sparse deletion cases with the same fixtures available to baseline and candidate builds. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * perf(filemeta): index ordinary metadata deletion batches Use a batch-local version lookup, compact directory summaries, and lazy physical reference counts for larger ordinary V2 deletion batches. Decode each indexed body at most once and compact the version vector once. Flush pending removals before canonical fallback and preserve per-request validation, partial failures, inline-key aliases, and cleanup decisions. Keep small batches and transition/legacy/ambiguous records on the scalar path. Cover indexed/scalar state equivalence and fail-closed cache errors. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(filemeta): enforce linear batch decoding and safe fallbacks Count V2 scans in tests to guard the indexed path's linear work contract. Exercise marker, retention, restore, transition, free-version, and pending purge requests against the canonical sequential path. Compare logical state and deterministic headers for re-encoded maps while retaining exact byte equality for ordinary indexed deletion and opaque metadata. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> --------- Co-authored-by: Hauser <housemecn@gmail.com> Co-authored-by: heihutu <heihutu@gmail.com> Co-authored-by: zhi22915 <qiuzgang@gmail.com>
77 lines
2.7 KiB
TOML
77 lines
2.7 KiB
TOML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
[package]
|
|
name = "rustfs-filemeta"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
version.workspace = true
|
|
homepage.workspace = true
|
|
description = "File metadata management for RustFS, providing efficient storage and retrieval of file metadata in a distributed system."
|
|
keywords = ["file-metadata", "storage", "retrieval", "rustfs", "Minio"]
|
|
categories = ["web-programming", "development-tools", "filesystem"]
|
|
documentation = "https://docs.rs/rustfs-filemeta/latest/rustfs_filemeta/"
|
|
|
|
[features]
|
|
default = []
|
|
hotpath = ["hotpath/hotpath", "hotpath/tokio", "rustfs-utils/hotpath"]
|
|
hotpath-alloc = ["hotpath", "hotpath/hotpath-alloc", "rustfs-utils/hotpath-alloc"]
|
|
hotpath-cpu = ["hotpath", "hotpath/hotpath-cpu", "rustfs-utils/hotpath-cpu"]
|
|
|
|
[dependencies]
|
|
hotpath.workspace = true
|
|
crc-fast = { workspace = true }
|
|
rmp.workspace = true
|
|
rmp-serde.workspace = true
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json.workspace = true
|
|
time = { workspace = true, features = ["parsing", "formatting", "macros", "serde"] }
|
|
uuid = { workspace = true, features = ["v4", "fast-rng", "serde", "macro-diagnostics"] }
|
|
tokio = { workspace = true, features = ["io-util", "macros", "sync", "fs", "rt-multi-thread"] }
|
|
xxhash-rust = { workspace = true, features = ["xxh64", "xxh3"] }
|
|
bytes = { workspace = true, features = ["serde"] }
|
|
rustfs-utils = { workspace = true, features = ["hash", "http"] }
|
|
rustfs-config = { workspace = true, features = ["constants"] }
|
|
byteorder = { workspace = true }
|
|
tracing.workspace = true
|
|
thiserror.workspace = true
|
|
regex.workspace = true
|
|
arc-swap.workspace = true
|
|
sha2.workspace = true
|
|
base64-simd.workspace = true
|
|
|
|
[dev-dependencies]
|
|
criterion = { workspace = true, features = ["html_reports"] }
|
|
# The metacache tests use tokio::time; s3s used to enable the feature via
|
|
# feature unification before filemeta dropped it (backlog#1735 A3c).
|
|
tokio = { workspace = true, features = ["time"] }
|
|
tempfile = { workspace = true }
|
|
proptest = "1"
|
|
|
|
[[bench]]
|
|
name = "xl_meta_bench"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "rename_data_meta_benchmark"
|
|
harness = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|