Skip to content

Recreate connection cache after restart#4841

Merged
lijunwangs merged 6 commits intoanza-xyz:masterfrom
lijunwangs:recreate_connection_cache_after_restart
Feb 11, 2025
Merged

Recreate connection cache after restart#4841
lijunwangs merged 6 commits intoanza-xyz:masterfrom
lijunwangs:recreate_connection_cache_after_restart

Conversation

@lijunwangs
Copy link
Copy Markdown

@lijunwangs lijunwangs commented Feb 7, 2025

Problem

The connection cache might hold connections to the validators before the restart which can make the test slow as it has to wait for the existing defunct connection to timeout.

The tests under local-cluster/tests can all be impacted if it involved restart. For example

cargo test test_snapshots_restart_validity

This is exposed when we tried to increase the QUIC connection idle timeout value for example to 60 seconds.

Summary of Changes

Recreate the connection cache after a restart.

Fixes #

validator_config.staked_nodes_overrides = Arc::new(RwLock::new(overrides));
}

assert!(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why kill this assert?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This assert is useless as the branch condition already cover it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

see "if config.tpu_use_quic"

Comment thread local-cluster/src/local_cluster.rs Outdated
@alexpyattaev
Copy link
Copy Markdown

I guess would be nice to explain in PR description which test was slowed down in case we need to later search for it.

Copy link
Copy Markdown

@alexpyattaev alexpyattaev left a comment

Choose a reason for hiding this comment

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

Lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants