Skip to content

Commit c4a5430

Browse files
committed
[dnm] envd startup simulation
1 parent 9dcf782 commit c4a5430

File tree

20 files changed

+6552
-225
lines changed

20 files changed

+6552
-225
lines changed

Cargo.lock

Lines changed: 206 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ members = [
116116
"src/walkabout",
117117
"src/workspace-hack",
118118
"test/metabase/smoketest",
119+
"test/simulation",
119120
"test/test-util",
120121
]
121122

@@ -361,13 +362,15 @@ duckdb = { git = "https://github.com/MaterializeInc/duckdb-rs.git", rev = "752c7
361362

362363
turmoil = { git = "https://github.com/teskje/turmoil.git", branch = "mz" }
363364

365+
[patch.'https://github.com/tokio-rs/turmoil']
366+
turmoil = { git = "https://github.com/teskje/turmoil.git", branch = "mz" }
364367

365368
# BEGIN LINT CONFIG
366369
# DO NOT EDIT. Automatically generated by bin/gen-lints.
367370
[workspace.lints.rust]
368371
unknown_lints = "allow"
369372
non_local_definitions = "allow"
370-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(stamped, coverage, nightly_doc_features, release, tokio_unstable)'] }
373+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage, nightly_doc_features, release, simulation, tokio_unstable)'] }
371374

372375
[workspace.lints.rustdoc]
373376

misc/python/materialize/cli/gen-lints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185

186186
EXCLUDE_CRATES = ["workspace-hack"]
187187

188-
CHECK_CFGS = "stamped, coverage, nightly_doc_features, release, tokio_unstable"
188+
CHECK_CFGS = "coverage, nightly_doc_features, release, simulation, tokio_unstable"
189189

190190

191191
def main() -> None:

misc/wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rust-version = "1.76.0"
1414
[workspace.lints.rust]
1515
unknown_lints = "allow"
1616
non_local_definitions = "allow"
17-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(stamped, coverage, nightly_doc_features, release, tokio_unstable)'] }
17+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage, nightly_doc_features, release, simulation, tokio_unstable)'] }
1818

1919
[workspace.lints.rustdoc]
2020

src/adapter/src/client.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use mz_ore::instrument;
3131
use mz_ore::now::{EpochMillis, NowFn, to_datetime};
3232
use mz_ore::result::ResultExt;
3333
use mz_ore::task::AbortOnDropHandle;
34-
use mz_ore::thread::JoinOnDropHandle;
3534
use mz_ore::tracing::OpenTelemetryContext;
3635
use mz_repr::{CatalogItemId, ColumnIndex, Row, SqlScalarType};
3736
use mz_sql::ast::{Raw, Statement};
@@ -46,6 +45,7 @@ use mz_sql_parser::parser::{ParserStatementError, StatementParseResult};
4645
use prometheus::Histogram;
4746
use serde_json::json;
4847
use tokio::sync::{mpsc, oneshot};
48+
use tokio::task::LocalSet;
4949
use tracing::{debug, error};
5050
use uuid::Uuid;
5151

@@ -75,7 +75,7 @@ use crate::{AdapterNotice, AppendWebhookError, PeekClient, PeekResponseUnary, St
7575
pub struct Handle {
7676
pub(crate) session_id: Uuid,
7777
pub(crate) start_instant: Instant,
78-
pub(crate) _thread: JoinOnDropHandle<()>,
78+
pub(crate) local: LocalSet,
7979
}
8080

8181
impl Handle {
@@ -92,6 +92,10 @@ impl Handle {
9292
pub fn start_instant(&self) -> Instant {
9393
self.start_instant
9494
}
95+
96+
pub async fn join(self) {
97+
self.local.await;
98+
}
9599
}
96100

97101
/// A coordinator client.

0 commit comments

Comments
 (0)