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

Limit number of caches #13

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Limit number of caches #13

merged 1 commit into from
Aug 14, 2024

Conversation

altmannmarcelo
Copy link
Collaborator

This commit adds a configuration to limit the number of caches the tool will create.

The default value is 10.

Fixes #4

src/queries.rs Outdated
config.readyset_user,
(config.number_of_queries * 2)
))
.expect("Failed to query proxysql_conn");
Copy link

Choose a reason for hiding this comment

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

This error is now ambiguous; could make it more descriptive and say which query is failing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Fixed.

LIMIT {}",
config.source_hostgroup,
config.readyset_user,
(config.number_of_queries * 2)
Copy link

Choose a reason for hiding this comment

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

Possibly a stupid question, but why 2x? Just to have extras in case some can't be cached?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No stupid. This is indeed to account for query not supported. We get twice as much queries we should cache and start testing them, stopping when we reach number_of_queries config.

This commit adds a configuration to limit the number of caches the
tool will create.

The default value is 10.

Fixes #4
Copy link

@mvzink mvzink left a comment

Choose a reason for hiding this comment

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

Cool, LGTM!

@altmannmarcelo altmannmarcelo merged commit 57ff6b0 into main Aug 14, 2024
4 checks passed
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.

Limit the Number of Queries
2 participants