You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Liuxuxin (Jira)" <ji...@apache.org> on 2022/03/31 09:33:00 UTC
[jira] [Commented] (IOTDB-2811) [delete sg + compaction] compacting: false does not exist either, do nothing. Set system to read-only
[ https://issues.apache.org/jira/browse/IOTDB-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515197#comment-17515197 ]
Liuxuxin commented on IOTDB-2811:
---------------------------------
If user deletes the storage group when it is executing compaction, the {{CompactionExceptionHandler}} may fail to handle exception because it find that both source files and target files are lost. Consequently, the system will be set to *read-only* because the {{CompactionExceptionHandler}} takes it as a very serious situation.
The solution is to collect the {{Future}} object when the compaction task is submitted to thread pool, and cancel the executing of compaction task before deleting a storage group.
> [delete sg + compaction] compacting: false does not exist either, do nothing. Set system to read-only
> ------------------------------------------------------------------------------------------------------
>
> Key: IOTDB-2811
> URL: https://issues.apache.org/jira/browse/IOTDB-2811
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Core/Compaction
> Affects Versions: 0.14.0-SNAPSHOT
> Reporter: 刘珍
> Assignee: Liuxuxin
> Priority: Major
> Labels: pull-request-available
> Attachments: log_all.zip
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> rel/0.13 e10325f04e6d631799002dd76d12dd019cf72dc0
> 内部跑SQL功能测试:
> aligned_timeseries
> continuous_query
> issues
> maintenance_command
> privilege
> shell_scripts
> template
> trigger
> ttl
> udf
> 合并线程Set system to read-only(整个日志见附件) :
> 2022-03-25 17:01:47,597 [pool-7-IoTDB-Compaction-2] ERROR o.a.i.d.e.c.i.s.SizeTieredCompactionTask:196 - root.test.g_0-0 [Compaction] Throwable is caught during execution of SizeTieredCompaction, {}
> java.lang.NullPointerException: null
> at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:143)
> at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:123)
> at org.apache.iotdb.db.engine.compaction.inner.utils.MultiTsFileDeviceIterator.<init>(MultiTsFileDeviceIterator.java:63)
> at org.apache.iotdb.db.engine.compaction.inner.utils.InnerSpaceCompactionUtils.compact(InnerSpaceCompactionUtils.java:71)
> at org.apache.iotdb.db.engine.compaction.inner.sizetiered.SizeTieredCompactionTask.doCompaction(SizeTieredCompactionTask.java:119)
> at org.apache.iotdb.db.engine.compaction.task.AbstractCompactionTask.call(AbstractCompactionTask.java:68)
> at org.apache.iotdb.db.engine.compaction.task.AbstractCompactionTask.call(AbstractCompactionTask.java:45)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> 2022-03-25 17:01:47,597 [pool-7-IoTDB-Compaction-2] WARN o.a.i.d.e.c.i.s.SizeTieredCompactionTask:200 - root.test.g_0-0 [Compaction] Start to handle exception
> 2022-03-25 17:01:47,597 [pool-7-IoTDB-Compaction-2] INFO o.a.i.d.e.c.i.InnerSpaceCompactionExceptionHandler:85 - root.test.g_0-0 [Compaction][ExceptionHandler] some source files [file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722177-3064-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722257-3067-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722295-3068-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722342-3070-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722378-3071-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722426-3073-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722472-3074-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722533-3076-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722585-3077-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722633-3079-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722718-3082-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722768-3083-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722815-3085-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722857-3086-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722916-3088-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723012-3091-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723059-3092-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723102-3093-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723148-3095-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723185-3096-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723269-3099-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723316-3101-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723350-3102-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723400-3104-0-1.tsfile, compactionCandidate: false, compacting: true, file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198723437-3105-0-1.tsfile, compactionCandidate: false, compacting: true] is lost
> 2022-03-25 17:01:47,597 [pool-7-IoTDB-Compaction-2] WARN o.a.i.d.e.c.i.InnerSpaceCompactionExceptionHandler:92 - root.test.g_0-0 [Compaction][ExceptionHandler] target file file is ./sbin/../data/data/sequence/root.test.g_0/0/0/1648198722177-3064-1-1.inner, compactionCandidate: false, compacting: false does not exist either, do nothing.{color:#DE350B}* Set system to read-only *{color}
> 2022-03-25 17:01:47,597 [pool-7-IoTDB-Compaction-2] ERROR o.a.i.d.e.c.i.InnerSpaceCompactionExceptionHandler:106 - root.test.g_0-0 [Compaction][ExceptionHandler] Failed to handle exception, set allowCompaction to false
> 2022-03-25 17:01:47,600 [pool-7-IoTDB-Compaction-6] ERROR o.a.i.t.f.f.LocalFSFactory:118 - Failed to move file from /data/iotdb/iotdb-sql/iotdb-sql/iotdb/db1/./sbin/../data/data/sequence/root.test.g_0/0/0/1648198733100-3420-1-1.inner to /data/iotdb/iotdb-sql/iotdb-sql/iotdb/db1/./sbin/../data/data/sequence/root.test.g_0/0/0/1648198733100-3420-1-1.tsfile.
> ja
--
This message was sent by Atlassian Jira
(v8.20.1#820001)