[import-netapp] import Netapp code into Garage codebase

This commit is contained in:
Alex Auvolat
2024-02-13 12:55:41 +01:00
parent a2ab275da8
commit 5ea24254a9
38 changed files with 3741 additions and 118 deletions
+1 -2
View File
@@ -19,6 +19,7 @@ garage_rpc.workspace = true
garage_table.workspace = true
garage_block.workspace = true
garage_util.workspace = true
garage_net.workspace = true
async-trait.workspace = true
arc-swap.workspace = true
@@ -39,8 +40,6 @@ futures-util.workspace = true
tokio.workspace = true
opentelemetry.workspace = true
netapp.workspace = true
[features]
default = [ "sled", "lmdb", "sqlite" ]
k2v = [ "garage_util/k2v" ]
+1 -1
View File
@@ -1,6 +1,6 @@
use std::sync::Arc;
use netapp::NetworkKey;
use garage_net::NetworkKey;
use garage_db as db;
+3 -3
View File
@@ -22,9 +22,9 @@ pub enum Error {
NoSuchBucket(String),
}
impl From<netapp::error::Error> for Error {
fn from(e: netapp::error::Error) -> Self {
Error::Internal(GarageError::Netapp(e))
impl From<garage_net::error::Error> for Error {
fn from(e: garage_net::error::Error) -> Self {
Error::Internal(GarageError::Net(e))
}
}
+1 -1
View File
@@ -296,7 +296,7 @@ impl K2VRpcHandler {
};
// Send the request to all nodes, use FuturesUnordered to get the responses in any order
let msg = msg.into_req().map_err(netapp::error::Error::from)?;
let msg = msg.into_req().map_err(garage_net::error::Error::from)?;
let rs = RequestStrategy::with_priority(PRIO_NORMAL).without_timeout();
let mut requests = nodes
.iter()