Skip to content

Commit

Permalink
Merge pull request #5113 from neondatabase/release-http-connection-fix
Browse files Browse the repository at this point in the history
Release 2023-08-25
  • Loading branch information
conradludgate authored Aug 25, 2023
2 parents 4e2e44e + ce1753d commit 9da06af
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = []
ignore = ["RUSTSEC-2023-0052"]

# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
Expand Down
42 changes: 22 additions & 20 deletions proxy/src/http/conn_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ async fn connect_to_compute_once(
let (tx, mut rx) = tokio::sync::watch::channel(session);

let conn_id = uuid::Uuid::new_v4();
let span = info_span!(parent: None, "connection", %conn_info, %conn_id);
let span = info_span!(parent: None, "connection", %conn_id);
span.in_scope(|| {
info!(%session, "new connection");
info!(%conn_info, %session, "new connection");
});

tokio::spawn(
Expand All @@ -420,26 +420,28 @@ async fn connect_to_compute_once(
info!(%session, "changed session");
}

let message = ready!(connection.poll_message(cx));
loop {
let message = ready!(connection.poll_message(cx));

match message {
Some(Ok(AsyncMessage::Notice(notice))) => {
info!(%session, "notice: {}", notice);
Poll::Pending
}
Some(Ok(AsyncMessage::Notification(notif))) => {
warn!(%session, pid = notif.process_id(), channel = notif.channel(), "notification received");
Poll::Pending
}
Some(Ok(_)) => {
warn!(%session, "unknown message");
Poll::Pending
}
Some(Err(e)) => {
error!(%session, "connection error: {}", e);
Poll::Ready(())
match message {
Some(Ok(AsyncMessage::Notice(notice))) => {
info!(%session, "notice: {}", notice);
}
Some(Ok(AsyncMessage::Notification(notif))) => {
warn!(%session, pid = notif.process_id(), channel = notif.channel(), "notification received");
}
Some(Ok(_)) => {
warn!(%session, "unknown message");
}
Some(Err(e)) => {
error!(%session, "connection error: {}", e);
return Poll::Ready(())
}
None => {
info!("connection closed");
return Poll::Ready(())
}
}
None => Poll::Ready(()),
}
})
.instrument(span)
Expand Down

1 comment on commit 9da06af

@github-actions
Copy link

@github-actions github-actions bot commented on 9da06af Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1624 tests run: 1549 passed, 0 failed, 75 skipped (full report)


Flaky tests (2)

Postgres 15

  • test_partial_evict_tenant: debug
  • test_get_tenant_size_with_multiple_branches: debug
The comment gets automatically updated with the latest test results
9da06af at 2023-08-25T17:03:22.967Z :recycle:

Please sign in to comment.