-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Apache][Doris][Feature][FE]Support users with high QPS in the same query through result set cache #4284
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
Conversation
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/common/FeMetaVersion.java
Outdated
Show resolved
Hide resolved
yangzhg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should also add a trigger that when a table has load or delete ops, you should refresh all cache related that table
e088100 to
af98ad1
Compare
|
@songenjie Hi, what's your design doc for this PR? I think this PR is repeated with SQL mode cache in #4330 , what do you think it? |
|
Hi, I think the selfsame OLAP querys in prod env is very rare. Do you test this PR in your prod env? what's the cache hit rate? The Apache Kylin use SQL result cache Like this PR, After Kylin run many years in MEITUAN, we could confirm the SQL result cache is meaningless for OLAP system. The Apache Druid use segment cache like #4330, After Druid run many years in MEITUAN, we could confirm the segment cache is useful for OLAP system. So I think If we already have segment query cache, we don't need the query result cache. |
3ks the result cache has been used in Jingdong for more than half a year, and the cache hit rate is also very high, especially in the e-commerce industry like ours, in special periods and business scenarios, its hit rate is very high As far as I know, most of the business of meituan is near real-time, and the scope of business use and analysis is slightly different from ours. So maybe the hit rate of cache is not high |
fe/fe-core/src/main/java/org/apache/doris/cache/SimpleLocalCache.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/cache/SimpleLocalCache.java
Outdated
Show resolved
Hide resolved
|
I didn't see any code about cache invalid? Did I miss something? |
a65b208 to
6c2ca46
Compare
|
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see any code about cache invalid? Did I miss something?
I mean, where is the logic for judging cache invalidation? The cache key (NamedKey) is only composed by connection id and origin stmt? What if the data has been unchanged?
use Caffeine.newBuilder().recordStats(); |
So it only depends on time? If data changed within |
right |
-Support users with high QPS in the same query through result set cache
Fixes #4283