This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 9593a7bfc32 branch-2.1: [fix](split)Fixed the bug that batch mode
split could not query data in multiple be scenarios. #46218 (#46227)
9593a7bfc32 is described below
commit 9593a7bfc32c8075becb6c7ee038cf0ef9a29683
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jan 1 00:34:48 2025 +0800
branch-2.1: [fix](split)Fixed the bug that batch mode split could not query
data in multiple be scenarios. #46218 (#46227)
Cherry-picked from #46218
Co-authored-by: daidai <[email protected]>
---
.../src/main/java/org/apache/doris/datasource/FileQueryScanNode.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
index 1f625d50f53..9cb45d3a2db 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java
@@ -339,7 +339,10 @@ public abstract class FileQueryScanNode extends
FileScanNode {
totalFileSize = fileSplit.getLength() * selectedSplitNum;
long maxWaitTime =
ConnectContext.get().getSessionVariable().getFetchSplitsMaxWaitTime();
// Not accurate, only used to estimate concurrency.
- int numSplitsPerBE = numApproximateSplits() /
backendPolicy.numBackends();
+ // Here, we must take the max of 1, because
+ // in the case of multiple BEs, `numApproximateSplits() /
backendPolicy.numBackends()` may be 0,
+ // and finally numSplitsPerBE is 0, resulting in no data being
queried.
+ int numSplitsPerBE = Math.max(numApproximateSplits() /
backendPolicy.numBackends(), 1);
for (Backend backend : backendPolicy.getBackends()) {
SplitSource splitSource = new SplitSource(backend,
splitAssignment, maxWaitTime);
splitSources.add(splitSource);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]