Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Iotdb
提交
9090c5d3
I
Iotdb
项目概览
apache
/
Iotdb
9 个月 前同步成功
通知
25
Star
3344
Fork
916
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
Iotdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
9090c5d3
编写于
7月 21, 2023
作者:
L
Liao Lanyu
提交者:
GitHub
7月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the issue that Drivers of query with limit clause can not be finished timely
上级
3ac87d35
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
41 addition
and
6 deletion
+41
-6
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/exception/exchange/GetTsBlockFromClosedOrAbortedChannelException.java
...change/GetTsBlockFromClosedOrAbortedChannelException.java
+26
-0
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java
...ueryengine/execution/exchange/MPPDataExchangeManager.java
+5
-0
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java
...b/db/queryengine/execution/exchange/sink/SinkChannel.java
+3
-2
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java
...b/queryengine/execution/exchange/source/SourceHandle.java
+2
-2
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java
...ryengine/plan/scheduler/FixedRateFragInsStateTracker.java
+5
-2
未找到文件。
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/exception/exchange/GetTsBlockFromClosedOrAbortedChannelException.java
0 → 100644
浏览文件 @
9090c5d3
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package
org.apache.iotdb.db.queryengine.exception.exchange
;
public
class
GetTsBlockFromClosedOrAbortedChannelException
extends
IllegalStateException
{
public
GetTsBlockFromClosedOrAbortedChannelException
(
String
s
)
{
super
(
s
);
}
}
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java
浏览文件 @
9090c5d3
...
@@ -22,6 +22,7 @@ package org.apache.iotdb.db.queryengine.execution.exchange;
...
@@ -22,6 +22,7 @@ package org.apache.iotdb.db.queryengine.execution.exchange;
import
org.apache.iotdb.common.rpc.thrift.TEndPoint
;
import
org.apache.iotdb.common.rpc.thrift.TEndPoint
;
import
org.apache.iotdb.commons.client.IClientManager
;
import
org.apache.iotdb.commons.client.IClientManager
;
import
org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceClient
;
import
org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceClient
;
import
org.apache.iotdb.db.queryengine.exception.exchange.GetTsBlockFromClosedOrAbortedChannelException
;
import
org.apache.iotdb.db.queryengine.execution.driver.DriverContext
;
import
org.apache.iotdb.db.queryengine.execution.driver.DriverContext
;
import
org.apache.iotdb.db.queryengine.execution.exchange.sink.DownStreamChannelIndex
;
import
org.apache.iotdb.db.queryengine.execution.exchange.sink.DownStreamChannelIndex
;
import
org.apache.iotdb.db.queryengine.execution.exchange.sink.DownStreamChannelLocation
;
import
org.apache.iotdb.db.queryengine.execution.exchange.sink.DownStreamChannelLocation
;
...
@@ -115,6 +116,10 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
...
@@ -115,6 +116,10 @@ public class MPPDataExchangeManager implements IMPPDataExchangeManager {
try
{
try
{
ByteBuffer
serializedTsBlock
=
sinkChannel
.
getSerializedTsBlock
(
i
);
ByteBuffer
serializedTsBlock
=
sinkChannel
.
getSerializedTsBlock
(
i
);
resp
.
addToTsBlocks
(
serializedTsBlock
);
resp
.
addToTsBlocks
(
serializedTsBlock
);
}
catch
(
GetTsBlockFromClosedOrAbortedChannelException
e
)
{
// Return an empty block list to indicate that getting data block failed this time.
// The SourceHandle will deal with this signal depending on its state.
return
new
TGetDataBlockResponse
(
new
ArrayList
<>());
}
catch
(
IllegalStateException
|
IOException
e
)
{
}
catch
(
IllegalStateException
|
IOException
e
)
{
throw
new
TException
(
e
);
throw
new
TException
(
e
);
}
}
...
...
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java
浏览文件 @
9090c5d3
...
@@ -25,6 +25,7 @@ import org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceCl
...
@@ -25,6 +25,7 @@ import org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceCl
import
org.apache.iotdb.commons.utils.TestOnly
;
import
org.apache.iotdb.commons.utils.TestOnly
;
import
org.apache.iotdb.db.conf.IoTDBDescriptor
;
import
org.apache.iotdb.db.conf.IoTDBDescriptor
;
import
org.apache.iotdb.db.queryengine.common.FragmentInstanceId
;
import
org.apache.iotdb.db.queryengine.common.FragmentInstanceId
;
import
org.apache.iotdb.db.queryengine.exception.exchange.GetTsBlockFromClosedOrAbortedChannelException
;
import
org.apache.iotdb.db.queryengine.execution.exchange.MPPDataExchangeManager.SinkListener
;
import
org.apache.iotdb.db.queryengine.execution.exchange.MPPDataExchangeManager.SinkListener
;
import
org.apache.iotdb.db.queryengine.execution.memory.LocalMemoryManager
;
import
org.apache.iotdb.db.queryengine.execution.memory.LocalMemoryManager
;
import
org.apache.iotdb.db.queryengine.metric.DataExchangeCostMetricSet
;
import
org.apache.iotdb.db.queryengine.metric.DataExchangeCostMetricSet
;
...
@@ -306,11 +307,11 @@ public class SinkChannel implements ISinkChannel {
...
@@ -306,11 +307,11 @@ public class SinkChannel implements ISinkChannel {
public
synchronized
ByteBuffer
getSerializedTsBlock
(
int
sequenceId
)
throws
IOException
{
public
synchronized
ByteBuffer
getSerializedTsBlock
(
int
sequenceId
)
throws
IOException
{
if
(
aborted
||
closed
)
{
if
(
aborted
||
closed
)
{
LOGGER
.
warn
(
LOGGER
.
debug
(
"SinkChannel still receive getting TsBlock request after being aborted={} or closed={}"
,
"SinkChannel still receive getting TsBlock request after being aborted={} or closed={}"
,
aborted
,
aborted
,
closed
);
closed
);
throw
new
IllegalState
Exception
(
"SinkChannel is aborted or closed. "
);
throw
new
GetTsBlockFromClosedOrAbortedChannel
Exception
(
"SinkChannel is aborted or closed. "
);
}
}
Pair
<
TsBlock
,
Long
>
pair
=
sequenceIdToTsBlock
.
get
(
sequenceId
);
Pair
<
TsBlock
,
Long
>
pair
=
sequenceIdToTsBlock
.
get
(
sequenceId
);
if
(
pair
==
null
||
pair
.
left
==
null
)
{
if
(
pair
==
null
||
pair
.
left
==
null
)
{
...
...
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java
浏览文件 @
9090c5d3
...
@@ -666,7 +666,7 @@ public class SourceHandle implements ISourceHandle {
...
@@ -666,7 +666,7 @@ public class SourceHandle implements ISourceHandle {
public
void
run
()
{
public
void
run
()
{
try
(
SetThreadName
sourceHandleName
=
new
SetThreadName
(
threadName
))
{
try
(
SetThreadName
sourceHandleName
=
new
SetThreadName
(
threadName
))
{
LOGGER
.
debug
(
LOGGER
.
debug
(
"[SendCloseSinkChanelEvent] to [ShuffleSinkHandle: {}, index: {}])."
,
"[SendCloseSinkChan
n
elEvent] to [ShuffleSinkHandle: {}, index: {}])."
,
remoteFragmentInstanceId
,
remoteFragmentInstanceId
,
indexOfUpstreamSinkHandle
);
indexOfUpstreamSinkHandle
);
int
attempt
=
0
;
int
attempt
=
0
;
...
@@ -680,7 +680,7 @@ public class SourceHandle implements ISourceHandle {
...
@@ -680,7 +680,7 @@ public class SourceHandle implements ISourceHandle {
break
;
break
;
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LOGGER
.
warn
(
LOGGER
.
warn
(
"[SendCloseSinkChanelEvent] to [ShuffleSinkHandle: {}, index: {}] failed.)."
,
"[SendCloseSinkChan
n
elEvent] to [ShuffleSinkHandle: {}, index: {}] failed.)."
,
remoteFragmentInstanceId
,
remoteFragmentInstanceId
,
indexOfUpstreamSinkHandle
);
indexOfUpstreamSinkHandle
);
if
(
attempt
==
MAX_ATTEMPT_TIMES
)
{
if
(
attempt
==
MAX_ATTEMPT_TIMES
)
{
...
...
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java
浏览文件 @
9090c5d3
...
@@ -88,8 +88,11 @@ public class FixedRateFragInsStateTracker extends AbstractFragInsStateTracker {
...
@@ -88,8 +88,11 @@ public class FixedRateFragInsStateTracker extends AbstractFragInsStateTracker {
}
}
for
(
FragmentInstanceId
fragmentInstanceId
:
instanceIds
)
{
for
(
FragmentInstanceId
fragmentInstanceId
:
instanceIds
)
{
InstanceStateMetrics
stateMetrics
=
instanceStateMap
.
get
(
fragmentInstanceId
);
InstanceStateMetrics
stateMetrics
=
instanceStateMap
.
get
(
fragmentInstanceId
);
if
(
stateMetrics
!=
null
if
(
stateMetrics
==
null
&&
(
stateMetrics
.
lastState
==
null
||
!
stateMetrics
.
lastState
.
isDone
()))
{
||
stateMetrics
.
lastState
==
null
||
!
stateMetrics
.
lastState
.
isDone
())
{
// FI whose state has not been updated is considered to be unfinished.(In Query with limit
// clause, it's possible that the query is finished before the state of FI being recorded.)
res
.
add
(
fragmentInstanceId
);
res
.
add
(
fragmentInstanceId
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录