diff --git a/README.md b/README.md index 892271bd9..7a40adf78 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ This section elaborates available options to run Parseable in production or deve ## Features :rocket: - [High availability & Cluster mode ↗︎](https://www.parseable.com/docs/concepts/distributed-architecture) -- [Local cache ↗︎](https://www.parseable.com/docs/features/tiering) +- [Hot Tier ↗︎](https://www.parseable.com/docs/features/tiering) - [Alerts ↗︎](https://www.parseable.com/docs/alerts) - [Role based access control ↗︎](https://www.parseable.com/docs/rbac) - [OAuth2 support ↗︎](https://www.parseable.com/docs/oidc) diff --git a/src/handlers/http/about.rs b/src/handlers/http/about.rs index 11b08e390..40113f885 100644 --- a/src/handlers/http/about.rs +++ b/src/handlers/http/about.rs @@ -39,7 +39,6 @@ use std::path::PathBuf; /// "license": "AGPL-3.0-only", /// "mode": mode, /// "staging": staging, -/// "cache": cache_details, /// "grpcPort": grpc_port, /// "store": { /// "type": CONFIG.get_storage_mode_string(), diff --git a/src/handlers/http/logstream.rs b/src/handlers/http/logstream.rs index ef7386eea..2f35ef08d 100644 --- a/src/handlers/http/logstream.rs +++ b/src/handlers/http/logstream.rs @@ -567,7 +567,6 @@ pub async fn get_stream_info(req: HttpRequest) -> Result caching has been deprecated - .route(web::put().to(caching_removed)) - // GET "/logstream/{logstream}/cache" ==> caching has been deprecated - .route(web::get().to(caching_removed)), - ) .service( web::scope("/retention").service( web::resource("/cleanup").route( diff --git a/src/handlers/http/modal/query_server.rs b/src/handlers/http/modal/query_server.rs index 32bf8e2d5..1c95bd7ee 100644 --- a/src/handlers/http/modal/query_server.rs +++ b/src/handlers/http/modal/query_server.rs @@ -18,11 +18,11 @@ use crate::correlation::CORRELATIONS; use crate::handlers::airplane; +use crate::handlers::http::base_path; use crate::handlers::http::cluster::{self, init_cluster_metrics_schedular}; use crate::handlers::http::logstream::create_internal_stream_if_not_exists; use crate::handlers::http::middleware::{DisAllowRootUser, RouteExt}; use crate::handlers::http::{self, role}; -use crate::handlers::http::{base_path, caching_removed}; use crate::handlers::http::{logstream, MAX_EVENT_PAYLOAD_SIZE}; use crate::hottier::HotTierManager; use crate::rbac::role::Action; @@ -54,7 +54,6 @@ impl ParseableServer for QueryServer { .service(Server::get_correlation_webscope()) .service(Server::get_query_factory()) .service(Server::get_trino_factory()) - .service(Server::get_cache_webscope()) .service(Server::get_liveness_factory()) .service(Server::get_readiness_factory()) .service(Server::get_about_factory()) @@ -331,13 +330,6 @@ impl QueryServer { .authorize_for_stream(Action::GetRetention), ), ) - .service( - web::resource("/cache") - // PUT "/logstream/{logstream}/cache" ==> caching has been deprecated - .route(web::put().to(caching_removed)) - // GET "/logstream/{logstream}/cache" ==> caching has been deprecated - .route(web::get().to(caching_removed)), - ) .service( web::resource("/hottier") // PUT "/logstream/{logstream}/hottier" ==> Set hottier for given logstream diff --git a/src/handlers/http/modal/server.rs b/src/handlers/http/modal/server.rs index 34a3d00af..e1302c66f 100644 --- a/src/handlers/http/modal/server.rs +++ b/src/handlers/http/modal/server.rs @@ -21,7 +21,6 @@ use crate::correlation::CORRELATIONS; use crate::handlers; use crate::handlers::http::about; use crate::handlers::http::base_path; -use crate::handlers::http::caching_removed; use crate::handlers::http::health_check; use crate::handlers::http::query; use crate::handlers::http::trino; @@ -71,7 +70,6 @@ impl ParseableServer for Server { .service(Self::get_correlation_webscope()) .service(Self::get_query_factory()) .service(Self::get_trino_factory()) - .service(Self::get_cache_webscope()) .service(Self::get_ingest_factory()) .service(Self::get_liveness_factory()) .service(Self::get_readiness_factory()) @@ -282,18 +280,6 @@ impl Server { web::resource("/query").route(web::post().to(query::query).authorize(Action::Query)) } - pub fn get_cache_webscope() -> Scope { - web::scope("/cache").service( - web::scope("/{user_id}").service( - web::scope("/{stream}").service( - web::resource("") - .route(web::get().to(caching_removed)) - .route(web::post().to(caching_removed)), - ), - ), - ) - } - // get the logstream web scope pub fn get_logstream_webscope() -> Scope { web::scope("/logstream") @@ -391,13 +377,6 @@ impl Server { .authorize_for_stream(Action::GetRetention), ), ) - .service( - web::resource("/cache") - // PUT "/logstream/{logstream}/cache" ==> Set retention for given logstream - .route(web::put().to(caching_removed)) - // GET "/logstream/{logstream}/cache" ==> Get retention for given logstream - .route(web::get().to(caching_removed)), - ) .service( web::resource("/hottier") // PUT "/logstream/{logstream}/hottier" ==> Set hottier for given logstream diff --git a/src/metadata.rs b/src/metadata.rs index 4657c8aa5..017ddab49 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -67,7 +67,6 @@ pub struct LogStreamMetadata { pub schema: HashMap>, pub alerts: Alerts, pub retention: Option, - pub cache_enabled: bool, pub created_at: String, pub first_event_at: Option, pub time_partition: Option, @@ -430,7 +429,6 @@ pub async fn load_stream_metadata_on_server_start( created_at, first_event_at, retention, - cache_enabled, snapshot, stats, time_partition, @@ -467,7 +465,6 @@ pub async fn load_stream_metadata_on_server_start( schema, alerts, retention, - cache_enabled, created_at, first_event_at, time_partition, diff --git a/src/metrics/prom_utils.rs b/src/metrics/prom_utils.rs index dab1aaff8..0aaaacf36 100644 --- a/src/metrics/prom_utils.rs +++ b/src/metrics/prom_utils.rs @@ -50,7 +50,6 @@ pub struct Metrics { event_time: NaiveDateTime, commit: String, staging: String, - cache: String, } #[derive(Debug, Serialize, Default, Clone)] @@ -85,7 +84,6 @@ impl Default for Metrics { event_time: Utc::now().naive_utc(), commit: "".to_string(), staging: "".to_string(), - cache: "".to_string(), } } } @@ -109,7 +107,6 @@ impl Metrics { event_time: Utc::now().naive_utc(), commit: "".to_string(), staging: "".to_string(), - cache: "".to_string(), } } } @@ -206,7 +203,7 @@ impl Metrics { } } } - let (commit_id, staging, cache) = Self::from_about_api_response(ingestor_metadata.clone()) + let (commit_id, staging) = Self::from_about_api_response(ingestor_metadata.clone()) .await .map_err(|err| { error!("Fatal: failed to get ingestor info: {:?}", err); @@ -215,14 +212,13 @@ impl Metrics { prom_dress.commit = commit_id; prom_dress.staging = staging; - prom_dress.cache = cache; Ok(prom_dress) } pub async fn from_about_api_response( ingestor_metadata: IngestorMetadata, - ) -> Result<(String, String, String), PostError> { + ) -> Result<(String, String), PostError> { let uri = Url::parse(&format!( "{}{}/about", &ingestor_metadata.domain_name, @@ -249,15 +245,7 @@ impl Metrics { .get("staging") .and_then(|x| x.as_str()) .unwrap_or_default(); - let cache = about_api_json - .get("cache") - .and_then(|x| x.as_str()) - .unwrap_or_default(); - Ok(( - commit_id.to_string(), - staging.to_string(), - cache.to_string(), - )) + Ok((commit_id.to_string(), staging.to_string())) } else { warn!( "Failed to fetch about API response from ingestor: {}\n", diff --git a/src/option.rs b/src/option.rs index 0ead3ea0f..f0de887d1 100644 --- a/src/option.rs +++ b/src/option.rs @@ -30,7 +30,6 @@ use serde::{Deserialize, Serialize}; use std::env; use std::path::PathBuf; use std::sync::Arc; -pub const MIN_CACHE_SIZE_BYTES: u64 = 1073741824; // 1 GiB pub const JOIN_COMMUNITY: &str = "Join us on Parseable Slack community for questions : https://logg.ing/community"; diff --git a/src/storage/mod.rs b/src/storage/mod.rs index a43cbc780..9f2d1d281 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -96,8 +96,6 @@ pub struct ObjectStoreFormat { pub stats: FullStats, #[serde(default)] pub snapshot: Snapshot, - #[serde(default)] - pub cache_enabled: bool, #[serde(skip_serializing_if = "Option::is_none")] pub retention: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -120,8 +118,6 @@ pub struct StreamInfo { #[serde(rename = "first-event-at")] #[serde(skip_serializing_if = "Option::is_none")] pub first_event_at: Option, - #[serde(default)] - pub cache_enabled: bool, #[serde(skip_serializing_if = "Option::is_none")] pub time_partition: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -191,7 +187,6 @@ impl Default for ObjectStoreFormat { permissions: vec![Permisssion::new("parseable".to_string())], stats: FullStats::default(), snapshot: Snapshot::default(), - cache_enabled: false, retention: None, time_partition: None, time_partition_limit: None,