revert: rollback AHashMap changes and keep using std HashMap (#6741)

* Revert "perf(ecstore): use AHashMap for FileInfo metadata fields (#6738)"

This reverts commit 13a2ae212e.

* fix(filemeta): restore standard HashMap metadata (#6742)

Remove the direct ahash dependency added for FileInfo metadata and revert the affected filemeta/ecstore call sites back to std::collections::HashMap.

Co-authored-by: heihutu <heihutu@gmail.com>

---------

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-08-27 20:46:08 +08:00
committed by GitHub
parent f1de19fc14
commit 152f110583
26 changed files with 87 additions and 141 deletions
+2 -7
View File
@@ -89,9 +89,7 @@ pub fn is_object_encryption_marker(key: &str) -> bool {
}
/// Reads the logical object size recorded by encryption metadata.
pub fn get_object_encryption_original_size<S: std::hash::BuildHasher>(
metadata: &std::collections::HashMap<String, String, S>,
) -> std::io::Result<Option<i64>> {
pub fn get_object_encryption_original_size(metadata: &std::collections::HashMap<String, String>) -> std::io::Result<Option<i64>> {
let actual_size = super::get_str(metadata, super::SUFFIX_ACTUAL_SIZE);
let size = get_case_insensitive(metadata, RUSTFS_ENCRYPTION_ORIGINAL_SIZE)
.or_else(|| get_case_insensitive(metadata, SSEC_ORIGINAL_SIZE))
@@ -105,10 +103,7 @@ pub fn get_object_encryption_original_size<S: std::hash::BuildHasher>(
.map_err(|error| std::io::Error::other(format!("Failed to parse encryption original size: {error}")))
}
fn get_case_insensitive<'a, S: std::hash::BuildHasher>(
metadata: &'a std::collections::HashMap<String, String, S>,
key: &str,
) -> Option<&'a str> {
fn get_case_insensitive<'a>(metadata: &'a std::collections::HashMap<String, String>, key: &str) -> Option<&'a str> {
metadata.get(key).map(String::as_str).or_else(|| {
metadata
.iter()