-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[bugfix](hive)Fix cache inconsistency issue #40729
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
de5bd4e to
da56e9b
Compare
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
TPC-H: Total hot run time: 40497 ms |
TPC-DS: Total hot run time: 194513 ms |
ClickBench: Total hot run time: 31.18 s |
|
run buildall |
TPC-H: Total hot run time: 42682 ms |
TPC-DS: Total hot run time: 199911 ms |
ClickBench: Total hot run time: 31.32 s |
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.
Please add FE UT for invalidateTableCache()
|
run buildall |
TPC-H: Total hot run time: 41767 ms |
TPC-DS: Total hot run time: 197751 ms |
ClickBench: Total hot run time: 31.73 s |
|
run feut |
|
run p0 |
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.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
kaka11chen
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.
LGTM
## Proposed changes 1. Concurrency issues: a. One thread is performing a refresh catalog action. b. One thread is performing an insert table action, and after completion, it executes a refresh table action. The `partitionCache` will be refreshed only if the corresponding table exists in the `partitionValuesCache`. However, the `partitionValuesCache` may have been refreshed by the `refresh catalog`, resulting in the inability to find the corresponding table through the `partitionValuesCache`, resulting in the `partitionCache` not being refreshed. Similarly, the `fileCacheRef` may not be refreshed either. Therefore, directly search for all keys to match to prevent them from being refreshed. 2. No need to perform refreshAfterWriteSec operation on partitionCache. 3. Increase the thread pool size.
## Proposed changes 1. Concurrency issues: a. One thread is performing a refresh catalog action. b. One thread is performing an insert table action, and after completion, it executes a refresh table action. The `partitionCache` will be refreshed only if the corresponding table exists in the `partitionValuesCache`. However, the `partitionValuesCache` may have been refreshed by the `refresh catalog`, resulting in the inability to find the corresponding table through the `partitionValuesCache`, resulting in the `partitionCache` not being refreshed. Similarly, the `fileCacheRef` may not be refreshed either. Therefore, directly search for all keys to match to prevent them from being refreshed. 2. No need to perform refreshAfterWriteSec operation on partitionCache. 3. Increase the thread pool size.
Proposed changes
a. One thread is performing a refresh catalog action.
b. One thread is performing an insert table action, and after completion, it executes a refresh table action.
The
partitionCachewill be refreshed only if the corresponding table exists in thepartitionValuesCache. However, thepartitionValuesCachemay have been refreshed by therefresh catalog, resulting in the inability to find the corresponding table through thepartitionValuesCache, resulting in thepartitionCachenot being refreshed.Similarly, the
fileCacheRefmay not be refreshed either.Therefore, directly search for all keys to match to prevent them from being refreshed.