-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[fix](paimon)fix paimon cache bug #35309
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
run buildall |
run buildall |
TPC-H: Total hot run time: 40968 ms
|
TPC-DS: Total hot run time: 170714 ms
|
ClickBench: Total hot run time: 31.06 s
|
...e-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java
Outdated
Show resolved
Hide resolved
…doris/paimon/PaimonJniScanner.java Co-authored-by: Mingyu Chen <morningman.cmy@gmail.com>
run buildall |
TPC-H: Total hot run time: 41282 ms
|
TPC-DS: Total hot run time: 172678 ms
|
ClickBench: Total hot run time: 30.3 s
|
run buildall |
TPC-H: Total hot run time: 41334 ms
|
TPC-DS: Total hot run time: 171208 ms
|
ClickBench: Total hot run time: 30.12 s
|
run buildall |
TPC-H: Total hot run time: 41245 ms
|
TPC-DS: Total hot run time: 172718 ms
|
ClickBench: Total hot run time: 31.47 s
|
run buildall |
TPC-H: Total hot run time: 41620 ms
|
TPC-DS: Total hot run time: 170924 ms
|
ClickBench: Total hot run time: 29.98 s
|
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. |
Issue Number: close #35024 This bug is because the fe incorrectly sets the update time of paimon catalog, causing the be to be unable to update paimon's schema in time. ```c++ private void initTable() { PaimonTableCacheKey key = new PaimonTableCacheKey(ctlId, dbId, tblId, paimonOptionParams, dbName, tblName); TableExt tableExt = PaimonTableCache.getTable(key); if (tableExt.getCreateTime() < lastUpdateTime) { LOG.warn("invalidate cache table:{}, localTime:{}, remoteTime:{}", key, tableExt.getCreateTime(), lastUpdateTime); PaimonTableCache.invalidateTableCache(key); tableExt = PaimonTableCache.getTable(key); } this.table = tableExt.getTable(); paimonAllFieldNames = PaimonScannerUtils.fieldNames(this.table.rowType()); if (LOG.isDebugEnabled()) { LOG.debug("paimonAllFieldNames:{}", paimonAllFieldNames); } } ```
Issue Number: close #35024 This bug is because the fe incorrectly sets the update time of paimon catalog, causing the be to be unable to update paimon's schema in time. ```c++ private void initTable() { PaimonTableCacheKey key = new PaimonTableCacheKey(ctlId, dbId, tblId, paimonOptionParams, dbName, tblName); TableExt tableExt = PaimonTableCache.getTable(key); if (tableExt.getCreateTime() < lastUpdateTime) { LOG.warn("invalidate cache table:{}, localTime:{}, remoteTime:{}", key, tableExt.getCreateTime(), lastUpdateTime); PaimonTableCache.invalidateTableCache(key); tableExt = PaimonTableCache.getTable(key); } this.table = tableExt.getTable(); paimonAllFieldNames = PaimonScannerUtils.fieldNames(this.table.rowType()); if (LOG.isDebugEnabled()) { LOG.debug("paimonAllFieldNames:{}", paimonAllFieldNames); } } ```
## Proposed changes Introduced from #35309 `fields.length` indicates the fields we want to read. If a table has 10 fields, but we only select a few fields, then the length of `fields.length` will definitely be less than 10. So the judgment condition here should be greater than.
## Proposed changes Introduced from #35309 `fields.length` indicates the fields we want to read. If a table has 10 fields, but we only select a few fields, then the length of `fields.length` will definitely be less than 10. So the judgment condition here should be greater than.
Proposed changes
Issue Number: close #35024
This bug is because the fe incorrectly sets the update time of paimon catalog, causing the be to be unable to update paimon's schema in time.
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...