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

Startup improvements & PAUSE/RESUME #300

Merged
merged 6 commits into from
Jan 28, 2023

Conversation

levkk
Copy link
Contributor

@levkk levkk commented Jan 28, 2023

  • Don't require servers to be online to start pgcat
  • Don't require all servers in shard to be online to allow queries
  • Validate servers in parallel
  • Added PAUSE/RESUME

Fix #254
Fix #177

@levkk levkk requested a review from drdrsh January 28, 2023 18:24
@@ -136,10 +139,14 @@ pub struct ConnectionPool {
/// The server information (K messages) have to be passed to the
/// clients on startup. We pre-connect to all shards and replicas
/// on pool creation and save the K messages here.
server_info: BytesMut,
server_info: Arc<RwLock<BytesMut>>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gets only read when a new client connects, so it should not have an contention on it.

src/pool.rs Outdated

/// If not validated, we need to double check the pool is available before allowing a client
/// to use it.
pub validated: Arc<AtomicBool>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here. Atomics are also really fast.

@levkk levkk changed the title Dont require servers to be online to start pooler Startup improvements & PAUSE/RESUME Jan 28, 2023
@levkk levkk merged commit 24e79dc into main Jan 28, 2023
@levkk levkk deleted the levkk-dont-require-servers-to-be-online branch January 28, 2023 23:36
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.

Servers need to be available for a successful configuration reloading pause/resume commands supports
1 participant