Skip to content

Commit

Permalink
pageserver: include node id when subscribing to SK (#10432)
Browse files Browse the repository at this point in the history
## Problem

All pageserver have the same application name which makes it hard to
distinguish them.

## Summary of changes

Include the node id in the application name sent to the safekeeper. This
should gives us
more visibility in logs. There's a few metrics that will increase in
cardinality by `pageserver_count`,
but that's fine.
  • Loading branch information
VladLazar authored Jan 16, 2025
1 parent da13154 commit 3a285a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub(super) async fn handle_walreceiver_connection(

let (replication_client, connection) = {
let mut config = wal_source_connconf.to_tokio_postgres_config();
config.application_name("pageserver");
config.application_name(format!("pageserver-{}", node.0).as_str());
config.replication_mode(tokio_postgres::config::ReplicationMode::Physical);
match time::timeout(connect_timeout, config.connect(postgres::NoTls)).await {
Ok(client_and_conn) => client_and_conn?,
Expand Down
2 changes: 1 addition & 1 deletion test_runner/regress/test_tenants.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def query_all_safekeepers(name, filter):
io_metrics = query_all_safekeepers(
"safekeeper_pg_io_bytes_total",
{
"app_name": "pageserver",
"app_name": f"pageserver-{env.pageserver.id}",
"client_az": "test_ps_az",
"dir": io_direction,
"same_az": "false",
Expand Down

1 comment on commit 3a285a0

@github-actions
Copy link

Choose a reason for hiding this comment

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

7477 tests run: 7088 passed, 1 failed, 388 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_layer_map[release-pg16-github-actions-selfhosted]"
Flaky tests (7)

Postgres 17

Postgres 15

  • test_physical_replication_config_mismatch_max_locks_per_transaction: release-arm64

Postgres 14

Code coverage* (full report)

  • functions: 33.7% (8424 of 25030 functions)
  • lines: 49.2% (70479 of 143358 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
3a285a0 at 2025-01-16T21:17:27.385Z :recycle:

Please sign in to comment.