You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/03/12 14:27:11 UTC
[doris] branch branch-1.2-lts updated (699f0aba51 -> 4014c62f96)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a change to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
from 699f0aba51 [Enhencement](stream load) add some regression test for json format streamload (#17520)
new b46554997d [fix](jdbc-catalog) avoid calculate driver's md5 when replaying edit log (#17693)
new 4014c62f96 [fix](meta) fix concurrent modification exception and potential NPE (#17602)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../java/org/apache/doris/analysis/DescriptorTable.java | 12 ++++++------
.../apache/doris/datasource/JdbcExternalCatalog.java | 2 +-
.../apache/doris/transaction/GlobalTransactionMgr.java | 17 +++++++++++++++--
3 files changed, 22 insertions(+), 9 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[doris] 01/02: [fix](jdbc-catalog) avoid calculate driver's md5 when replaying edit log (#17693)
Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit b46554997d37712f8f7e4bbcfb2a77ac3748a2c2
Author: Mingyu Chen <mo...@163.com>
AuthorDate: Sun Mar 12 22:11:45 2023 +0800
[fix](jdbc-catalog) avoid calculate driver's md5 when replaying edit log (#17693)
---
.../src/main/java/org/apache/doris/datasource/JdbcExternalCatalog.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/JdbcExternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/JdbcExternalCatalog.java
index b0a68d010b..5a61a8b567 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/JdbcExternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/JdbcExternalCatalog.java
@@ -84,7 +84,7 @@ public class JdbcExternalCatalog extends ExternalCatalog {
properties.put(JdbcResource.JDBC_URL, jdbcUrl);
}
- if (properties.containsKey(JdbcResource.DRIVER_URL)) {
+ if (properties.containsKey(JdbcResource.DRIVER_URL) && !properties.containsKey(JdbcResource.CHECK_SUM)) {
properties.put(JdbcResource.CHECK_SUM,
JdbcResource.computeObjectChecksum(properties.get(JdbcResource.DRIVER_URL)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[doris] 02/02: [fix](meta) fix concurrent modification exception and potential NPE (#17602)
Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 4014c62f96518a34b71822b7c5be89afd8bdfbf8
Author: Mingyu Chen <mo...@163.com>
AuthorDate: Sun Mar 12 22:12:07 2023 +0800
[fix](meta) fix concurrent modification exception and potential NPE (#17602)
---
.../java/org/apache/doris/analysis/DescriptorTable.java | 12 ++++++------
.../apache/doris/transaction/GlobalTransactionMgr.java | 17 +++++++++++++++--
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/DescriptorTable.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/DescriptorTable.java
index 7c1b62dcc5..c069337772 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DescriptorTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DescriptorTable.java
@@ -27,14 +27,12 @@ import org.apache.doris.thrift.TDescriptorTable;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -181,7 +179,7 @@ public class DescriptorTable {
public TDescriptorTable toThrift() {
TDescriptorTable result = new TDescriptorTable();
- HashSet<TableIf> referencedTbls = Sets.newHashSet();
+ Map<Long, TableIf> referencedTbls = Maps.newHashMap();
for (TupleDescriptor tupleD : tupleDescs.values()) {
// inline view of a non-constant select has a non-materialized tuple descriptor
// in the descriptor table just for type checking, which we need to skip
@@ -191,7 +189,7 @@ public class DescriptorTable {
// but its table has no id
if (tupleD.getTable() != null
&& tupleD.getTable().getId() >= 0) {
- referencedTbls.add(tupleD.getTable());
+ referencedTbls.put(tupleD.getTable().getId(), tupleD.getTable());
}
for (SlotDescriptor slotD : tupleD.getMaterializedSlots()) {
result.addToSlotDescriptors(slotD.toThrift());
@@ -199,9 +197,11 @@ public class DescriptorTable {
}
}
- referencedTbls.addAll(referencedTables);
+ for (TableIf tbl : referencedTables) {
+ referencedTbls.put(tbl.getId(), tbl);
+ }
- for (TableIf tbl : referencedTbls) {
+ for (TableIf tbl : referencedTbls.values()) {
result.addToTableDescriptors(tbl.toThrift());
}
return result;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
index cb6c5e7c23..4621f08700 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
@@ -335,11 +335,24 @@ public class GlobalTransactionMgr implements Writable {
return !dbTransactionMgr.getCommittedTxnList().isEmpty();
}
- for (TransactionState transactionState : dbTransactionMgr.getCommittedTxnList()) {
+ List<TransactionState> committedTxnList = dbTransactionMgr.getCommittedTxnList();
+ for (TransactionState transactionState : committedTxnList) {
if (transactionState.getTableIdList().contains(tableId)) {
if (partitionId == null) {
return true;
- } else if (transactionState.getTableCommitInfo(tableId).getPartitionCommitInfo(partitionId) != null) {
+ }
+ TableCommitInfo tableCommitInfo = transactionState.getTableCommitInfo(tableId);
+ if (tableCommitInfo == null) {
+ // FIXME: this is a bug, should not happen
+ // If table id is in transaction state's table list, and it is COMMITTED,
+ // table commit info should not be null.
+ // return true to avoid following process.
+ LOG.warn("unexpected error. tableCommitInfo is null. dbId: {} tableId: {}, partitionId: {},"
+ + " transactionState: {}",
+ dbId, tableId, partitionId, transactionState);
+ return true;
+ }
+ if (tableCommitInfo.getPartitionCommitInfo(partitionId) != null) {
return true;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org