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

feat: failover2 #363

Merged
merged 2 commits into from
Feb 1, 2025
Merged

feat: failover2 #363

merged 2 commits into from
Feb 1, 2025

Conversation

sophia-bq
Copy link
Contributor

Summary

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sophia-bq sophia-bq added the wip Pull requests that are a work in progress label Jan 3, 2025
@sophia-bq sophia-bq requested a review from sergiyvamz January 3, 2025 18:07
@sophia-bq sophia-bq force-pushed the feat/failover2 branch 2 times, most recently from c4a4778 to 871729d Compare January 7, 2025 04:05
@sophia-bq sophia-bq force-pushed the feat/failover2 branch 3 times, most recently from 4a749c6 to f86dc16 Compare January 9, 2025 19:02
@sophia-bq sophia-bq force-pushed the feat/failover2 branch 3 times, most recently from 64dcca3 to 8d30bbf Compare January 30, 2025 18:16
common/lib/plugin_service.ts Outdated Show resolved Hide resolved
common/lib/plugin_service.ts Outdated Show resolved Hide resolved
common/lib/plugins/failover2/failover2_plugin.ts Outdated Show resolved Hide resolved
common/lib/plugins/failover2/failover2_plugin.ts Outdated Show resolved Hide resolved
await this.failoverReader();
}

if (this._isInTransaction || this.pluginService.isInTransaction()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this._isInTransaction is set via this.pluginService.isInTransaction(), and when we use it we check this.pluginService.isInTransaction() anyway. Not sure if it is worth having this local variable.

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._isInTransaction is set right before we rollback the client. It stores the knowledge that we are in transaction, as rollback can set inTransaction to be false

common/lib/plugins/failover2/failover2_plugin.ts Outdated Show resolved Hide resolved
return false;
}

protected isBlockingHostListProvider(arg: any): arg is BlockingHostListProvider {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make more sense to put this in utils?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm I don't think it belongs in utils, it is very specific to this one use

@sophia-bq sophia-bq merged commit 2aa927f into main Feb 1, 2025
2 checks passed
@sophia-bq sophia-bq deleted the feat/failover2 branch February 1, 2025 00:40
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.

4 participants