You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Houliang Qi (Jira)" <ji...@apache.org> on 2021/02/04 02:58:00 UTC
[jira] [Created] (IOTDB-1147) Concurrent bug error in FlushManager
may cause NoSuchElementException error
Houliang Qi created IOTDB-1147:
----------------------------------
Summary: Concurrent bug error in FlushManager may cause NoSuchElementException error
Key: IOTDB-1147
URL: https://issues.apache.org/jira/browse/IOTDB-1147
Project: Apache IoTDB
Issue Type: Bug
Components: Core/Engine
Reporter: Houliang Qi
Fix For: 0.12.0
Attachments: image-2021-02-04-10-57-43-980.png, image-2021-02-04-10-57-53-288.png
When we flush one tsfile, we put the TsFileProcessor to the FlushManager, and use another thread pool to do the flush task of the memtables in this TsFileProcessor.
Howerver, the following codes is not thread safe, because when the first code
_tsFileProcessorQueue.isEmpty()_ is called, it may be return false, but instantly it maybe become empty due to consumed by the flush thread pool, so when called
t_sFileProcessorQueue.getFirst().getStorageGroupName()_ it may cause NoSuchElementException error.
!image-2021-02-04-10-52-19-911.png!
The error are as follows:
!image-2021-02-04-10-56-04-613.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)