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

ref(async-inserts): allow async inserts as an option #5955

Merged
merged 4 commits into from
May 23, 2024

Conversation

MeredithAnya
Copy link
Member

@MeredithAnya MeredithAnya commented May 22, 2024

We are going to try out async inserts for specific S4S clusters to test it out and see the impacts of enabling it. This adds a cli arg that we can use to target consumers for specific clusters (e.g. https://github.com/getsentry/ops/pull/10687). I'm also adding a runtime config flag async_inserts_allowed so that we can turn it on and off as we test without having to put up code changes.

When (and if) we move forward to enabling this on more clusters, we won't be able to use the runtime config in the same way since it would turn things on and off across the board, so this is really for testing purposes at this moment

Pre-req for https://github.com/getsentry/ops/pull/10687

query_params.push_str("load_balancing=in_order&insert_distributed_sync=1");

let async_inserts_allowed = get_str_config("async_inserts_allowed").ok().flatten();
if async_inserts && async_inserts_allowed == Some(1.to_string()) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if async_inserts && async_inserts_allowed == Some(1.to_string()) {
if async_inserts && async_inserts_allowed == Some("1") {

that should also work

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I still need to_string() because it was expecting String instead of &str

@MeredithAnya MeredithAnya marked this pull request as ready for review May 23, 2024 21:47
@MeredithAnya MeredithAnya requested a review from a team as a code owner May 23, 2024 21:47
@MeredithAnya MeredithAnya requested a review from a team May 23, 2024 21:47
@MeredithAnya MeredithAnya merged commit f2cc332 into master May 23, 2024
30 checks passed
@MeredithAnya MeredithAnya deleted the meredith/5-21-24 branch May 23, 2024 22:17
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