Skip to content

Commit b2fa8f0

Browse files
committed
Merge branch 'fix/1763-stream-deletion-safety-net' into fix/1763-async-stream-deletion
2 parents a3037b5 + e57e47d commit b2fa8f0

45 files changed

Lines changed: 3396 additions & 1066 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 330 additions & 259 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
[package]
22
name = "parseable"
3-
version = "3.1.0"
3+
version = "3.2.0"
44
authors = ["Parseable Team <hi@parseable.com>"]
55
edition = "2024"
6-
rust-version = "1.91.0"
6+
rust-version = "1.94.0"
77
categories = ["logs", "observability", "metrics", "traces"]
88
build = "build.rs"
99

1010
[dependencies]
1111
# Arrow and DataFusion ecosystem
12-
arrow = "58.0.0"
13-
arrow-array = "58.0.0"
14-
arrow-flight = { version = "58.0.0", features = [
12+
arrow = "59.2.0"
13+
arrow-array = "59.2.0"
14+
arrow-flight = { version = "59.2.0", features = [
1515
"tls-aws-lc",
1616
"tls-native-roots",
1717
] }
18-
arrow-ipc = { version = "58.0.0", features = ["zstd"] }
19-
arrow-json = "58.0.0"
20-
arrow-schema = { version = "58.0.0", features = ["serde"] }
21-
arrow-select = "58.0.0"
22-
datafusion = "53.0.0"
23-
object_store = { version = "0.13.1", features = [
18+
arrow-ipc = { version = "59.2.0", features = ["zstd"] }
19+
arrow-json = "59.2.0"
20+
arrow-schema = { version = "59.2.0", features = ["serde"] }
21+
arrow-select = "59.2.0"
22+
datafusion = "55.0.0"
23+
datafusion-proto = "55.0.0"
24+
object_store = { version = "0.13.2", features = [
2425
"cloud",
2526
"aws",
2627
"azure",
2728
"gcp",
2829
] }
29-
parquet = "58.0.0"
30+
parquet = "59.2.0"
3031

3132
# Web server and HTTP-related
3233
actix-cors = "0.7.0"
@@ -221,12 +222,12 @@ anyhow = "1.0"
221222

222223
[dev-dependencies]
223224
rstest = "0.26.1"
224-
arrow = "58.0.0"
225+
arrow = "59.2.0"
225226
temp-dir = "0.1.14"
226227

227228
[package.metadata.parseable_ui]
228-
assets-url = "https://parseableprismbuild.blob.core.windows.net/parseable-prism-build/v3.1.0/build.zip"
229-
assets-sha1 = "7eec52f6c74aa931a0c370b92f0cc11b0737a2ab"
229+
assets-url = "https://parseableprismbuild.blob.core.windows.net/parseable-prism-build/v3.2.0/build.zip"
230+
assets-sha1 = "c888abb568a2951811181f2962bbf5942a17a226"
230231

231232
[features]
232233
debug = []

‎scripts/ingest.ps1‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ function Setup-Collector {
434434
" compression: none",
435435
" headers:",
436436
" X-API-Key: $apiKeyValue",
437-
" X-P-Stream: $streamNameValue",
438-
" X-P-Log-Source: otel-metrics"
437+
" X-P-Stream: $streamNameValue"
439438
)
440439

441440
if (-not [string]::IsNullOrWhiteSpace($TenantId)) {

‎scripts/ingest.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ exporters:
409409
headers:
410410
X-API-Key: '$api_key_yaml'
411411
X-P-Stream: '$stream_name_yaml'
412-
X-P-Log-Source: otel-metrics
413412
${tenant_header}
414413
415414
service:

‎src/banner.rs‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ fn status_info(config: &Parseable, scheme: &str, id: Uid) {
6363
credentials = "\"Using default creds admin, admin. Please set credentials with P_USERNAME and P_PASSWORD.\"".red().to_string();
6464
}
6565

66-
let llm_status = match &config.options.open_ai_key {
67-
Some(_) => "OpenAI Configured".green(),
68-
None => "Not Configured".grey(),
69-
};
70-
7166
eprintln!(
7267
"
7368
Welcome to Parseable Server! Deployment UID: \"{}\"",
@@ -79,13 +74,11 @@ fn status_info(config: &Parseable, scheme: &str, id: Uid) {
7974
{}
8075
Address: {}
8176
Credentials: {}
82-
Server Mode: \"{}\"
83-
LLM Status: \"{}\"",
77+
Server Mode: \"{}\"",
8478
"Server:".to_string().bold(),
8579
address,
8680
credentials,
8781
config.get_server_mode_string(),
88-
llm_status
8982
);
9083
}
9184

‎src/catalog/column.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ fn is_valid_float_range(min: f64, max: f64) -> bool {
201201
pub struct Column {
202202
pub name: String,
203203
pub stats: Option<TypedStatistics>,
204+
#[serde(default, skip_serializing_if = "Option::is_none")]
205+
pub null_count: Option<u64>,
204206
pub uncompressed_size: u64,
205207
pub compressed_size: u64,
206208
}

‎src/catalog/manifest.rs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use itertools::Itertools;
2222
use parquet::file::{
2323
metadata::{RowGroupMetaData, SortingColumn},
2424
reader::FileReader,
25+
statistics::Statistics,
2526
};
2627

2728
use crate::metastore::metastore_traits::MetastoreObject;
@@ -267,6 +268,10 @@ fn column_statistics(row_groups: &[RowGroupMetaData]) -> HashMap<String, Column>
267268
if let Some(entry) = columns.get_mut(&col_name) {
268269
entry.compressed_size += col.compressed_size() as u64;
269270
entry.uncompressed_size += col.uncompressed_size() as u64;
271+
entry.null_count = entry
272+
.null_count
273+
.zip(col.statistics().and_then(Statistics::null_count_opt))
274+
.and_then(|(current, other)| current.checked_add(other));
270275
if let Some(other) = col.statistics().and_then(|stats| stats.try_into().ok()) {
271276
entry.stats = entry.stats.clone().and_then(|this| this.update(other));
272277
}
@@ -276,6 +281,7 @@ fn column_statistics(row_groups: &[RowGroupMetaData]) -> HashMap<String, Column>
276281
Column {
277282
name: col_name,
278283
stats: col.statistics().and_then(|stats| stats.try_into().ok()),
284+
null_count: col.statistics().and_then(Statistics::null_count_opt),
279285
uncompressed_size: col.uncompressed_size() as u64,
280286
compressed_size: col.compressed_size() as u64,
281287
},
@@ -301,6 +307,7 @@ mod codec_tests {
301307
.map(|c| Column {
302308
name: format!("some_reasonably_long_column_name_{c}"),
303309
stats: None,
310+
null_count: None,
304311
uncompressed_size: 1024,
305312
compressed_size: 512,
306313
})

‎src/cli.rs‎

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ pub struct Options {
437437
)]
438438
pub flight_port: u16,
439439

440+
#[arg(
441+
long,
442+
env = "P_QUERY_GRPC_PORT",
443+
default_value = "8003",
444+
help = "Port for query gRPC server"
445+
)]
446+
pub query_grpc_port: u16,
447+
440448
// Performance settings
441449
#[arg(
442450
long,
@@ -455,16 +463,6 @@ pub struct Options {
455463
)]
456464
pub query_memory_pool_size: Option<usize>,
457465

458-
#[arg(
459-
long,
460-
long = "query-mem-threshold",
461-
value_parser = validation::validate_percentage,
462-
default_value = "80.0",
463-
env = "P_QUERY_MEMORY_THRESHOLD",
464-
help = "Set a threshold (percentage) for memory beyond which query will get queued for 10s to prevent OOM"
465-
)]
466-
pub query_mem_threshold: f32,
467-
468466
#[arg(
469467
long,
470468
env = "P_PARQUET_METADATA_CACHE_SIZE",
@@ -504,20 +502,20 @@ pub struct Options {
504502
#[arg(
505503
long,
506504
env = "P_RESOURCE_CHECK_INTERVAL",
507-
default_value = "15",
505+
default_value = "5",
508506
value_parser = validation::validate_seconds,
509507
help = "Resource monitoring check interval in seconds"
510508
)]
511509
pub resource_check_interval: u64,
512510

513511
#[arg(
514512
long,
515-
env = "P_CPU_THRESHOLD",
516-
default_value = "100.0",
517-
value_parser = validation::validate_percentage,
518-
help = "CPU utilization threshold percentage (0.0-100.0) for resource monitoring"
513+
env = "P_REJECTION_DURATION",
514+
default_value = "30",
515+
value_parser = validation::validate_seconds,
516+
help = "Post threshold breach, reject requests for"
519517
)]
520-
pub cpu_utilization_threshold: f32,
518+
pub rejection_duration: u64,
521519

522520
#[arg(
523521
long,
@@ -528,13 +526,13 @@ pub struct Options {
528526
)]
529527
pub memory_utilization_threshold: f32,
530528

531-
// Integration features
532529
#[arg(
533530
long,
534-
env = "P_OPENAI_API_KEY",
535-
help = "OpenAI key to enable llm features"
531+
env = "P_RESOURCE_CHECK_ENABLED",
532+
default_value = "false",
533+
help = "Flag to enable resource check"
536534
)]
537-
pub open_ai_key: Option<String>,
535+
pub resource_check_enabled: bool,
538536

539537
#[arg(
540538
long,

‎src/handlers/airplane.rs‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ pub fn server() -> impl Future<Output = Result<(), Box<dyn std::error::Error + S
321321
let config = identity.map(|id| ServerTlsConfig::new().identity(id));
322322

323323
// rust is treating closures as different types
324-
let err_map_fn = |err| Box::new(err) as Box<dyn std::error::Error + Send>;
324+
let err_map_fn = move |err| {
325+
tracing::error!("Unable to start Flight Server on addr- {:?}", addr);
326+
Box::new(err) as Box<dyn std::error::Error + Send>
327+
};
325328

326329
// match on config to decide if we want to use tls or not
327330
match config {
@@ -332,7 +335,9 @@ pub fn server() -> impl Future<Output = Result<(), Box<dyn std::error::Error + S
332335
};
333336

334337
server
335-
.max_frame_size(16 * 1024 * 1024 - 2)
338+
.initial_stream_window_size(16 * 1024 * 1024)
339+
.initial_connection_window_size(32 * 1024 * 1024)
340+
.http2_adaptive_window(Some(true))
336341
.accept_http1(true)
337342
.layer(cors)
338343
.layer(GrpcWebLayer::new())
@@ -341,7 +346,9 @@ pub fn server() -> impl Future<Output = Result<(), Box<dyn std::error::Error + S
341346
.map_err(err_map_fn)
342347
}
343348
None => Server::builder()
344-
.max_frame_size(16 * 1024 * 1024 - 2)
349+
.initial_stream_window_size(16 * 1024 * 1024)
350+
.initial_connection_window_size(32 * 1024 * 1024)
351+
.http2_adaptive_window(Some(true))
345352
.accept_http1(true)
346353
.layer(cors)
347354
.layer(GrpcWebLayer::new())

‎src/handlers/http/about.rs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ pub async fn about() -> Json<Value> {
6666
let grpc_port = PARSEABLE.options.grpc_port;
6767

6868
let store_endpoint = PARSEABLE.storage.get_endpoint();
69-
let is_llm_active = &PARSEABLE.options.open_ai_key.is_some();
70-
let llm_provider = is_llm_active.then_some("OpenAI");
7169
let is_oidc_active = PARSEABLE.options.openid().is_some();
7270
let ui_version = option_env!("UI_VERSION").unwrap_or("development");
7371

@@ -99,8 +97,6 @@ pub async fn about() -> Json<Value> {
9997
"deploymentId": deployment_id,
10098
"updateAvailable": update_available,
10199
"latestVersion": latest_release,
102-
"llmActive": is_llm_active,
103-
"llmProvider": llm_provider,
104100
"oidcActive": is_oidc_active,
105101
"license": license_info,
106102
"mode": mode,

0 commit comments

Comments
 (0)