Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions server/src/handlers/http/cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@

pub mod utils;

use crate::handlers::http::cluster::utils::{
check_liveness, ingester_meta_filename, to_url_string,
};
use crate::handlers::http::cluster::utils::{check_liveness, to_url_string};
use crate::handlers::http::ingest::PostError;
use crate::handlers::http::logstream::error::StreamError;
use crate::handlers::{STATIC_SCHEMA_FLAG, TIME_PARTITION_KEY};
use crate::option::CONFIG;

use crate::metrics::prom_utils::Metrics;
use crate::storage::object_storage::ingester_metadata_path;
use crate::storage::ObjectStorageError;
use crate::storage::PARSEABLE_ROOT_DIRECTORY;
use actix_web::http::header;
Expand Down Expand Up @@ -380,7 +379,12 @@ pub async fn remove_ingester(req: HttpRequest) -> Result<impl Responder, PostErr
return Err(PostError::Invalid(anyhow::anyhow!("Node Online")));
}

let ingester_meta_filename = ingester_meta_filename(&domain_name);
let url = Url::parse(&domain_name).unwrap();
let ingester_meta_filename = ingester_metadata_path(
url.host_str().unwrap().to_owned(),
url.port().unwrap().to_string(),
)
.to_string();
let object_store = CONFIG.storage().get_object_store();
let msg = match object_store
.try_delete_ingester_meta(ingester_meta_filename)
Expand Down
2 changes: 2 additions & 0 deletions server/src/handlers/http/cluster/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ pub async fn send_stats_request(
}

/// domain_name needs to be http://ip:port
/// dead code for now
#[allow(dead_code)]
pub fn ingester_meta_filename(domain_name: &str) -> String {
if domain_name.starts_with("http://") | domain_name.starts_with("https://") {
let url = Url::parse(domain_name).unwrap();
Expand Down