K2V #293
4 changed files with 6 additions and 6 deletions
|
@ -23,7 +23,7 @@ use crate::error::*;
|
|||
|
||||
pub(crate) trait ApiEndpoint: Send + Sync + 'static {
|
||||
fn name(&self) -> &'static str;
|
||||
fn add_span_attributes<'a>(&self, span: SpanRef<'a>);
|
||||
fn add_span_attributes(&self, span: SpanRef<'_>);
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
|
|
@ -9,8 +9,8 @@ use hyper::{Body, Method, Request, Response};
|
|||
|
||||
use opentelemetry::{trace::SpanRef, KeyValue};
|
||||
|
||||
use garage_util::error::Error as GarageError;
|
||||
use garage_table::util::*;
|
||||
use garage_util::error::Error as GarageError;
|
||||
|
||||
use garage_model::garage::Garage;
|
||||
use garage_model::key_table::Key;
|
||||
|
@ -96,7 +96,7 @@ impl ApiHandler for S3ApiServer {
|
|||
.and_then(|root_domain| host_to_bucket(&host, root_domain));
|
||||
|
||||
let (endpoint, bucket_name) =
|
||||
Endpoint::from_request(&req, bucket_name.map(ToOwned::to_owned))?;
|
||||
Endpoint::from_request(req, bucket_name.map(ToOwned::to_owned))?;
|
||||
|
||||
Ok(S3ApiEndpoint {
|
||||
bucket_name,
|
||||
|
@ -432,7 +432,7 @@ impl ApiEndpoint for S3ApiEndpoint {
|
|||
self.endpoint.name()
|
||||
}
|
||||
|
||||
fn add_span_attributes<'a>(&self, span: SpanRef<'a>) {
|
||||
fn add_span_attributes(&self, span: SpanRef<'_>) {
|
||||
span.set_attribute(KeyValue::new(
|
||||
"bucket",
|
||||
self.bucket_name.clone().unwrap_or_default(),
|
||||
|
|
|
@ -151,8 +151,7 @@ impl Garage {
|
|||
);
|
||||
|
||||
// ---- K2V tables ----
|
||||
let k2v_item_table =
|
||||
Table::new(K2VItemTable {}, meta_rep_param.clone(), system.clone(), &db);
|
||||
let k2v_item_table = Table::new(K2VItemTable {}, meta_rep_param, system.clone(), &db);
|
||||
|
||||
info!("Initialize Garage...");
|
||||
|
||||
|
|
|
@ -203,6 +203,7 @@ impl TableSchema for K2VItemTable {
|
|||
// nothing for now
|
||||
}
|
||||
|
||||
#[allow(clippy::nonminimal_bool)]
|
||||
fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool {
|
||||
let v = entry.values();
|
||||
!(filter.conflicts_only && v.len() < 2)
|
||||
|
|
Loading…
Reference in a new issue