-
Notifications
You must be signed in to change notification settings - Fork 976
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
Refactored and Optimized Query Cache with PgSQL Support #4703
Open
rahim-kanji
wants to merge
23
commits into
v3.0
Choose a base branch
from
v3.0_refactor_query_cache
base: v3.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Added Query Cache Support for PgSQL: * Introduced new variables for PgSQL Query Cache management: * pgsql-query_cache_size_MB * pgsql-query_cache_soft_ttl_pct * pgsql-query_cache_stores_empty_result * pgsql-query_cache_handle_warnings (not yet utilized) * Overwriting Transaction Status: * Sending current transaction state to the client when a result is returned from the query cache. * This currently does not differentiate between normal and error transaction states—both are treated as active transaction states. * Cache Lifetime Management: Replaced manual reference counting with std::shared_ptr to efficiently manage the lifecycle of cache entries, ensuring proper memory deallocation and reducing complexity. * Unified Purging Logic: Refactored the query cache purging logic to use a single thread for both MySQL and PgSQL cache entries. * Code Cleanup: Removed unnecessary methods and data members to streamline the codebase and improve maintainability. * Performance Optimization: Improved memory management, reducing memory footprint and enhancing performance.
Can one of the admins verify this patch? |
This test verifies that query cache entries are refreshed upon reaching 'pgsql-query_cache_soft_ttl_pct' value.
rahim-kanji
force-pushed
the
v3.0_refactor_query_cache
branch
from
October 10, 2024 05:13
9d4b3cd
to
5102e19
Compare
…d___query_cache_size_MB value is zero '0'
…contains row description
…ize_MB setting takes precedence over pgsql_thread___threshold_resultset_size
rahim-kanji
force-pushed
the
v3.0_refactor_query_cache
branch
from
October 21, 2024 08:34
9687ba7
to
d75a3ed
Compare
…ery_rules, pgsql-query_cache_stores_empty_result and mysql-query_cache_stores_empty_result value should be considered when determining whether to store empty result sets
…ize_MB setting takes precedence over mysql_thread___threshold_resultset_size
rahim-kanji
changed the title
Refactored and Optimized Query Cache with PgSQL Support [WIP]
Refactored and Optimized Query Cache with PgSQL Support
Oct 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduced separate query processors for MySQL and PostgreSQL.
Added Query Cache Support for PgSQL:
Introduced new variables for PgSQL Query Cache management:
pgsql-query_cache_size_MB
pgsql-query_cache_soft_ttl_pct
pgsql-query_cache_stores_empty_result
pgsql-query_cache_handle_warnings
(not yet utilized)Overwriting Transaction Status:
Updated behavior:
Cache Lifetime Management:
Unified Purging Logic:
Code Cleanup:
Performance Optimization:
TAP Tests:
pgsql-query_cache_soft_ttl_pct-t.cpp
: This test verifies that query cache entries are refreshed upon reaching 'pgsql-query_cache_soft_ttl_pct' value.pgsql-query_cache_test-t.cpp
: This test verifies complete functionality of query cache module.mysql-reg_test_4723_query_cache_stores_empty_result-t.cpp
: regression testCloses #4689
Closes #4723