You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by sh...@apache.org on 2026/07/09 09:37:28 UTC
(iotdb) branch codex/fix-compaction-metadata-lease-teardown created (now a3c1cab517f)
This is an automated email from the ASF dual-hosted git repository.
shuwenwei pushed a change to branch codex/fix-compaction-metadata-lease-teardown
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at a3c1cab517f Fix compaction test metadata lease cleanup
This branch includes the following new commits:
new a3c1cab517f Fix compaction test metadata lease cleanup
The 1 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.
(iotdb) 01/01: Fix compaction test metadata lease cleanup
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shuwenwei pushed a commit to branch codex/fix-compaction-metadata-lease-teardown
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a3c1cab517fca3128d4970635f06f5333aa3fcef
Author: shuwenwei <s1...@gmail.com>
AuthorDate: Thu Jul 9 17:36:23 2026 +0800
Fix compaction test metadata lease cleanup
---
.../dataregion/compaction/AbstractCompactionTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/AbstractCompactionTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/AbstractCompactionTest.java
index 39b4d53ef90..89e7a640707 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/AbstractCompactionTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/AbstractCompactionTest.java
@@ -19,6 +19,7 @@
package org.apache.iotdb.db.storageengine.dataregion.compaction;
+import org.apache.iotdb.commons.conf.CommonDescriptor;
import org.apache.iotdb.commons.conf.IoTDBConstant;
import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.exception.MetadataException;
@@ -31,6 +32,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.StorageEngineException;
import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.fetcher.cache.TreeDeviceSchemaCacheManager;
+import org.apache.iotdb.db.schemaengine.lease.MetadataLeaseManager;
import org.apache.iotdb.db.storageengine.buffer.BloomFilterCache;
import org.apache.iotdb.db.storageengine.buffer.ChunkCache;
import org.apache.iotdb.db.storageengine.buffer.TimeSeriesMetadataCache;
@@ -154,6 +156,9 @@ public class AbstractCompactionTest {
private final long oldLongestExpiredTime =
IoTDBDescriptor.getInstance().getConfig().getMaxExpiredTime();
+ private final long oldMetadataLeaseFenceMs =
+ CommonDescriptor.getInstance().getConfig().getMetadataLeaseFenceMs();
+
protected static File STORAGE_GROUP_DIR =
new File(
TestConstant.BASE_OUTPUT_PATH
@@ -200,6 +205,8 @@ public class AbstractCompactionTest {
public void setUp()
throws IOException, WriteProcessException, MetadataException, InterruptedException {
+ CommonDescriptor.getInstance().getConfig().setMetadataLeaseFenceMs(Long.MAX_VALUE);
+ MetadataLeaseManager.getInstance().recoveryLeaseForTest(true);
fileCount = 0;
if (!SEQ_DIRS.exists()) {
Assert.assertTrue(SEQ_DIRS.mkdirs());
@@ -495,6 +502,8 @@ public class AbstractCompactionTest {
.getConfig()
.setInnerCompactionTaskSelectionModsFileThreshold(oldModsFileSize);
IoTDBDescriptor.getInstance().getConfig().setMaxExpiredTime(oldLongestExpiredTime);
+ CommonDescriptor.getInstance().getConfig().setMetadataLeaseFenceMs(oldMetadataLeaseFenceMs);
+ MetadataLeaseManager.getInstance().recoveryLeaseForTest(true);
TSFileDescriptor.getInstance().getConfig().setGroupSizeInByte(oldChunkGroupSize);
TSFileDescriptor.getInstance().getConfig().setMaxNumberOfPointsInPage(oldPagePointMaxNumber);