Skip to content

Commit 4dc61df

Browse files
authored
chore: update to latest influxdb3_core (#26429)
* chore: update to latest core * chore: allow CDLA permissive 2 license * chore: update insta snapshot for new internal df tables * test: update assertion in flightsql test * fix: object store size hinting workaround in clap_blocks Applied a workaround from upstream to strip size hinting from the object store get request options. See: influxdata/influxdb_iox#13771 * fix: query_executor tests use object store size hinting workaround * fix: insta snapshot test for show system summary command * chore: update windows- crates for advisories * chore: update to latest sha on influxdb3_core branch * chore: update to latest influxdb3_core rev * refactor: pr feedback * refactor: do not use object store size hint layer Instead of using the ObjectStoreStripSizeHint layer, just provide the configuration to datafusion to disable the use of size hinting from iox_query. This is used in IOx and not relevant to Monolith. * fix: use parquet cache for get_opts requests * test: that the parquet cache is being hit from write buffer
1 parent 9ed1af7 commit 4dc61df

File tree

26 files changed

+1387
-1168
lines changed

26 files changed

+1387
-1168
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ crossbeam-channel = "0.5.11"
8080
csv = "1.3.0"
8181
# Use DataFusion fork
8282
# See https://github.com/influxdata/arrow-datafusion/pull/49 for contents
83-
datafusion = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "ae0a57b05895ccf4d2febb9c91bbb0956cf7e863" }
84-
datafusion-proto = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "ae0a57b05895ccf4d2febb9c91bbb0956cf7e863" }
83+
datafusion = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "1c10b8b635831e87cb043a1e3fa8eb89be430d54" }
84+
datafusion-proto = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "1c10b8b635831e87cb043a1e3fa8eb89be430d54" }
8585
dashmap = "6.1.0"
8686
dotenvy = "0.15.7"
8787
flate2 = "1.0.27"
@@ -137,7 +137,7 @@ sysinfo = "0.30.8"
137137
tempfile = "3.14.0"
138138
test-log = { version = "0.2.16", features = ["trace"] }
139139
thiserror = "1.0"
140-
tokio = { version = "1.43.1", features = ["full"] }
140+
tokio = { version = "1.45", features = ["full"] }
141141
tokio-util = { version = "0.7.13", features = ["rt"] }
142142
tonic = { version = "0.11.0", features = ["tls", "tls-roots"] }
143143
tonic-build = "0.11.0"
@@ -148,41 +148,40 @@ twox-hash = "2.1.0"
148148
unicode-segmentation = "1.11.0"
149149
url = "2.5.0"
150150
urlencoding = "1.1"
151-
uuid = { version = "1", features = ["v4"] }
151+
uuid = { version = "1", features = ["v4", "v7", "serde"] }
152152
num = { version = "0.4.3" }
153153

154154
# Core.git crates we depend on
155-
arrow_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
156-
authz = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
157-
data_types = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
158-
datafusion_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
159-
executor = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
160-
influxdb-line-protocol = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f"}
161-
influxdb_influxql_parser = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
162-
influxdb_iox_client = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
163-
iox_catalog = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
164-
iox_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
165-
iox_query = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
166-
iox_query_params = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
167-
iox_query_influxql = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
168-
iox_system_tables = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
169-
iox_time = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
170-
metric = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
171-
metric_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
172-
object_store_metrics = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
173-
observability_deps = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
174-
panic_logging = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
175-
parquet_file = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
176-
schema = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f", features = ["v3"]}
177-
service_common = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
178-
service_grpc_flight = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
179-
test_helpers = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
180-
tokio_metrics_bridge = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
181-
trace = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
182-
trace_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
183-
trace_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
184-
tracker = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f" }
185-
trogging = { git = "https://github.com/influxdata/influxdb3_core", rev = "26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f", features = ["clap"] }
155+
arrow_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
156+
authz = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
157+
data_types = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
158+
datafusion_util = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
159+
executor = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
160+
influxdb-line-protocol = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb", features = ["v3"]}
161+
influxdb_influxql_parser = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
162+
influxdb_iox_client = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
163+
iox_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
164+
iox_query = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
165+
iox_query_params = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
166+
iox_query_influxql = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
167+
iox_system_tables = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
168+
iox_time = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
169+
metric = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
170+
metric_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
171+
object_store_metrics = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
172+
observability_deps = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
173+
panic_logging = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
174+
parquet_file = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
175+
schema = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb", features = ["v3"]}
176+
service_common = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
177+
service_grpc_flight = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
178+
test_helpers = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
179+
tokio_metrics_bridge = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
180+
trace = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
181+
trace_exporters = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
182+
trace_http = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
183+
tracker = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb" }
184+
trogging = { git = "https://github.com/influxdata/influxdb3_core", rev = "fd0e474a6c0af5ba867399d753f5df18f59907cb", features = ["clap"] }
186185

187186
[workspace.lints.rust]
188187
missing_copy_implementations = "deny"
@@ -268,3 +267,4 @@ arrow-string = { git = "https://github.com/influxdata/arrow-rs.git", rev = "eae1
268267
arrow-ord = { git = "https://github.com/influxdata/arrow-rs.git", rev = "eae176c21b1ef915227294e8a8a201b6f266031a" }
269268
arrow-flight = { git = "https://github.com/influxdata/arrow-rs.git", rev = "eae176c21b1ef915227294e8a8a201b6f266031a" }
270269
parquet = { git = "https://github.com/influxdata/arrow-rs.git", rev = "eae176c21b1ef915227294e8a8a201b6f266031a" }
270+
object_store = { git = "https://github.com/influxdata/arrow-rs.git", rev = "c946cd81fa12e6588a3be33be08e3d8e9a2770e7" }

deny.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
version = 2
66
yanked = "deny"
77
ignore = [
8-
# dependent on datafusion-common moving away from instant
9-
# https://github.com/apache/datafusion/pull/13355
10-
"RUSTSEC-2024-0384",
118
# paste crate is no longer maintained, but it is past 1.0
129
# Keep this here until our transisent dependencies no longer
1310
# need it
@@ -24,6 +21,7 @@ allow = [
2421
"BSD-2-Clause",
2522
"BSD-3-Clause",
2623
"CC0-1.0",
24+
"CDLA-Permissive-2.0",
2725
"ISC",
2826
"MIT",
2927
"Unicode-3.0",

influxdb3/src/commands/serve.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use influxdb3_write::{
4949
persisted_files::PersistedFiles,
5050
},
5151
};
52-
use iox_query::exec::{DedicatedExecutor, Executor, ExecutorConfig};
52+
use iox_query::exec::{DedicatedExecutor, Executor, ExecutorConfig, PerQueryMemoryPoolConfig};
5353
use iox_time::SystemProvider;
5454
use object_store::ObjectStore;
5555
use object_store_metrics::ObjectStoreMetrics;
@@ -561,6 +561,7 @@ pub async fn command(config: Config) -> Result<()> {
561561
Arc::clone(&time_provider) as _,
562562
"main",
563563
&metrics,
564+
config.object_store_config.bucket.as_ref(),
564565
));
565566

566567
// setup cached object store:
@@ -603,6 +604,9 @@ pub async fn command(config: Config) -> Result<()> {
603604
.collect(),
604605
metric_registry: Arc::clone(&metrics),
605606
mem_pool_size: config.exec_mem_pool_bytes.as_num_bytes(),
607+
// TODO: need to make these configurable?
608+
per_query_mem_pool_config: PerQueryMemoryPoolConfig::Disabled,
609+
heap_memory_limit: None,
606610
},
607611
DedicatedExecutor::new(
608612
"datafusion",
@@ -735,6 +739,7 @@ pub async fn command(config: Config) -> Result<()> {
735739
sys_events_store: Arc::clone(&sys_events_store),
736740
// convert to positive here so that we can avoid double negatives downstream
737741
started_with_auth: !config.without_auth,
742+
time_provider: Arc::clone(&time_provider) as _,
738743
}));
739744

740745
let listener = TcpListener::bind(*config.http_bind_address)

influxdb3/tests/cli/snapshots/lib__cli__summary_should_show_up_to_ten_entries_from_each_table.snap

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
---
22
source: influxdb3/tests/cli/mod.rs
3-
expression: output
3+
expression: summary_output
44
---
55
distinct_caches summary:
6-
+-------+------+------------+--------------+-----------------+-----------------+
7-
| table | name | column_ids | column_names | max_cardinality | max_age_seconds |
8-
+-------+------+------------+--------------+-----------------+-----------------+
9-
+-------+------+------------+--------------+-----------------+-----------------+
6+
++
7+
++
108
last_caches summary:
11-
+-------+------+----------------+------------------+------------------+--------------------+-------+-----+
12-
| table | name | key_column_ids | key_column_names | value_column_ids | value_column_names | count | ttl |
13-
+-------+------+----------------+------------------+------------------+--------------------+-------+-----+
14-
+-------+------+----------------+------------------+------------------+--------------------+-------+-----+
9+
++
10+
++
1511
parquet_files summary:
16-
+------------+------+------------+-----------+----------+----------+
17-
| table_name | path | size_bytes | row_count | min_time | max_time |
18-
+------------+------+------------+-----------+----------+----------+
19-
+------------+------+------------+-----------+----------+----------+
12+
++
13+
++
2014
processing_engine_logs summary:
2115
++
2216
++

influxdb3/tests/server/flight.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ async fn flight() -> Result<(), influxdb3_client::Error> {
117117
"+--------------+--------------------+----------------------------+------------+",
118118
"| public | information_schema | columns | VIEW |",
119119
"| public | information_schema | df_settings | VIEW |",
120+
"| public | information_schema | parameters | VIEW |",
121+
"| public | information_schema | routines | VIEW |",
120122
"| public | information_schema | schemata | VIEW |",
121123
"| public | information_schema | tables | VIEW |",
122124
"| public | information_schema | views | VIEW |",

influxdb3/tests/server/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl TestServer {
276276
//
277277
// The file is deleted when it goes out of scope (the end of this method) by the TempDir type.
278278
let tmp_dir = TempDir::new().unwrap();
279-
let tmp_dir_path = tmp_dir.into_path();
279+
let tmp_dir_path = tmp_dir.keep();
280280
let tcp_addr_file = tmp_dir_path.join("tcp-listener");
281281
let mut command = Command::cargo_bin("influxdb3").expect("create the influxdb3 command");
282282
let command = command

influxdb3/tests/server/snapshots/lib__server__query__api_v3_query_show_tables_ordering.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ expression: output
2323
| public | information_schema | columns | VIEW |
2424
| public | information_schema | df_settings | VIEW |
2525
| public | information_schema | schemata | VIEW |
26+
| public | information_schema | routines | VIEW |
27+
| public | information_schema | parameters | VIEW |
2628
+---------------+--------------------+----------------------------+------------+

influxdb3_authz/src/lib.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use std::sync::Arc;
22

33
use async_trait::async_trait;
4-
use authz::{Authorizer as IoxAuthorizer, Error as IoxError, Permission as IoxPermission};
4+
use authz::{
5+
Authorization, Authorizer as IoxAuthorizer, Error as IoxError, Permission as IoxPermission,
6+
};
57
use influxdb3_id::{DbId, TokenId};
68
use iox_time::{Time, TimeProvider};
79
use observability_deps::tracing::{debug, trace};
@@ -168,20 +170,16 @@ impl AuthProvider for TokenAuthenticator {
168170

169171
#[async_trait]
170172
impl IoxAuthorizer for TokenAuthenticator {
171-
async fn permissions(
173+
async fn authorize(
172174
&self,
173175
token: Option<Vec<u8>>,
174176
perms: &[IoxPermission],
175-
) -> Result<Vec<IoxPermission>, IoxError> {
176-
match self.authenticate(token).await {
177-
Ok(_) => {
178-
return Ok(perms.to_vec());
179-
}
180-
Err(err) => {
181-
let iox_err = err.into();
182-
return Err(iox_err);
183-
}
184-
}
177+
) -> Result<Authorization, IoxError> {
178+
let _token_id = self.authenticate(token).await?;
179+
// (trevor) The "subject" may just use the `token_id` as a string, but we withheld doing so
180+
// in order to decided and ensure that we make use of the subject consistently throughout
181+
// the system. See: https://github.com/influxdata/influxdb/issues/26440
182+
Ok(Authorization::new(None, perms.to_vec()))
185183
}
186184
}
187185

@@ -190,12 +188,12 @@ pub struct NoAuthAuthenticator;
190188

191189
#[async_trait]
192190
impl IoxAuthorizer for NoAuthAuthenticator {
193-
async fn permissions(
191+
async fn authorize(
194192
&self,
195193
_token: Option<Vec<u8>>,
196194
perms: &[IoxPermission],
197-
) -> Result<Vec<IoxPermission>, IoxError> {
198-
Ok(perms.to_vec())
195+
) -> Result<Authorization, IoxError> {
196+
Ok(Authorization::new(None, perms.to_vec()))
199197
}
200198

201199
async fn probe(&self) -> Result<(), IoxError> {

influxdb3_cache/src/distinct_cache/table_function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::{any::Any, sync::Arc};
33
use arrow::{array::RecordBatch, datatypes::SchemaRef};
44
use async_trait::async_trait;
55
use datafusion::{
6-
catalog::{Session, TableProvider},
6+
catalog::{Session, TableFunctionImpl, TableProvider},
77
common::{DFSchema, Result, internal_err, plan_err},
8-
datasource::{TableType, function::TableFunctionImpl},
8+
datasource::TableType,
99
execution::context::ExecutionProps,
1010
logical_expr::TableProviderFilterPushDown,
1111
physical_expr::{

0 commit comments

Comments
 (0)