mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 17:28:12 +00:00
perf(get): reuse reader paths and lock namespaces (#6015)
Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -356,6 +356,16 @@ async fn test_namespace_lock_with_local_manager() {
|
||||
assert_eq!(lock.namespace(), "local-ns");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn namespace_lock_preserves_shared_namespace_storage() {
|
||||
let namespace: Arc<str> = Arc::from("shared-namespace");
|
||||
let namespace_ptr = Arc::as_ptr(&namespace);
|
||||
let local = LocalLock::new_shared(namespace.clone(), Arc::new(GlobalLockManager::new()));
|
||||
|
||||
assert_eq!(local.namespace(), namespace.as_ref());
|
||||
assert_eq!(local.namespace().as_ptr(), namespace_ptr.cast::<u8>());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_namespace_lock_with_clients() {
|
||||
let clients = vec![ClientFactory::create_local(), ClientFactory::create_local()];
|
||||
|
||||
Reference in New Issue
Block a user