-
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](publish) Fix publish failed because because "task" is null #37531
Conversation
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: 40033 ms
|
TPC-DS: Total hot run time: 172346 ms
|
ClickBench: Total hot run time: 30.61 s
|
@@ -822,7 +822,7 @@ public String getErrMsg() { | |||
public void pruneAfterVisible() { | |||
publishVersionTasks.clear(); | |||
tableIdToTabletDeltaRows.clear(); | |||
// TODO if subTransactionStates can be cleared? | |||
involvedBackends.clear(); |
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.
add @SerializedName to involvedBackends ?
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 anyone and no changes requested. |
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. |
…che#37531) ## Proposed changes ``` 2024-07-08 00:43:27,149 ERROR (PUBLISH_VERSION|33) [PublishVersionDaemon.runAfterCatalogReady():73] errors while publish version to all backends java.lang.NullPointerException: Cannot invoke "org.apache.doris.task.PublishVersionTask.isFinished()" because "task" is null at org.apache.doris.transaction.PublishVersionDaemon.lambda$tryFinishTxn$0(PublishVersionDaemon.java:163) ~[doris-fe.jar:1.2-SNAPSHOT] at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?] at org.apache.doris.transaction.PublishVersionDaemon.tryFinishTxn(PublishVersionDaemon.java:160) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.transaction.PublishVersionDaemon.publishVersion(PublishVersionDaemon.java:96) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.transaction.PublishVersionDaemon.runAfterCatalogReady(PublishVersionDaemon.java:70) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT] ``` 1. When try finish one txn, catch the exception to make the failed txn does not block the other txns. 2. In the original way, when commit txn, add a <be_id, null publish task> to publish tasks, and then when publish txn, reset the null publish task to a new publish task. This pr modify it to when commit txn, record the involved be ids, and then when publish txn, generate the publish tasks to all involved bes. 3. There is also a bug of `tableIdToTabletDeltaRows` in transaction state, it records all ready txn infos, because the variable scope is out of `for (TransactionState transactionState : readyTransactionStates)`
) ## Proposed changes ``` 2024-07-08 00:43:27,149 ERROR (PUBLISH_VERSION|33) [PublishVersionDaemon.runAfterCatalogReady():73] errors while publish version to all backends java.lang.NullPointerException: Cannot invoke "org.apache.doris.task.PublishVersionTask.isFinished()" because "task" is null at org.apache.doris.transaction.PublishVersionDaemon.lambda$tryFinishTxn$0(PublishVersionDaemon.java:163) ~[doris-fe.jar:1.2-SNAPSHOT] at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?] at org.apache.doris.transaction.PublishVersionDaemon.tryFinishTxn(PublishVersionDaemon.java:160) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.transaction.PublishVersionDaemon.publishVersion(PublishVersionDaemon.java:96) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.transaction.PublishVersionDaemon.runAfterCatalogReady(PublishVersionDaemon.java:70) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:116) ~[doris-fe.jar:1.2-SNAPSHOT] ``` 1. When try finish one txn, catch the exception to make the failed txn does not block the other txns. 2. In the original way, when commit txn, add a <be_id, null publish task> to publish tasks, and then when publish txn, reset the null publish task to a new publish task. This pr modify it to when commit txn, record the involved be ids, and then when publish txn, generate the publish tasks to all involved bes. 3. There is also a bug of `tableIdToTabletDeltaRows` in transaction state, it records all ready txn infos, because the variable scope is out of `for (TransactionState transactionState : readyTransactionStates)`
Proposed changes
This pr modify it to when commit txn, record the involved be ids, and then when publish txn, generate the publish tasks to all involved bes.
tableIdToTabletDeltaRows
in transaction state, it records all ready txn infos, because the variable scope is out offor (TransactionState transactionState : readyTransactionStates)