Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storcon: switch to diesel-async and tokio-postgres #10280

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
135 changes: 99 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions storage_controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ strum_macros.workspace = true

diesel = { version = "2.2.6", features = [
"serde_json",
"postgres",
"r2d2",
"chrono",
] }
diesel-async = { version = "0.5.2", features = ["postgres", "r2d2", "async-connection-wrapper"] }
diesel_migrations = { version = "2.2.0" }
r2d2 = { version = "0.8.10" }
scoped-futures = "0.1.4"

utils = { path = "../libs/utils/" }
metrics = { path = "../libs/metrics/" }
Expand Down
2 changes: 1 addition & 1 deletion storage_controller/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ async fn async_main() -> anyhow::Result<()> {
// Validate that we can connect to the database
Persistence::await_connection(&secrets.database_url, args.db_connect_timeout.into()).await?;

let persistence = Arc::new(Persistence::new(secrets.database_url));
let persistence = Arc::new(Persistence::new(secrets.database_url).await);

let service = Service::spawn(config, persistence.clone()).await?;

Expand Down
Loading
Loading