Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
dee103a
fix(iceberg): close per-table FileIO on cache eviction
924060929 Aug 19, 2026
6d8e164
fix(style): fix import order in MetaCacheEntryDef
924060929 Aug 19, 2026
9468479
fix(hudi): safely close shared file system view with reference counting
924060929 Aug 19, 2026
0425c8a
fix(hudi): make filesystem view cleanup generation-safe
924060929 Aug 20, 2026
3418bcf
fix(metacache): retain external resources for active users
924060929 Aug 20, 2026
b746b1d
fix(iceberg): retain catalog resources for active tables
924060929 Aug 20, 2026
6365e14
fix(external): align resources with execution lifetime
924060929 Aug 20, 2026
187b26a
fix(external): close branch 4.1 lifecycle gaps
924060929 Aug 21, 2026
0b1a710
[fix](iceberg) close remaining runtime lifecycle gaps
924060929 Aug 21, 2026
c99db1a
[fix](hive) fence scan and session teardown races
924060929 Aug 21, 2026
ef15b9d
[fix](iceberg) close streaming and flight lifecycles
924060929 Aug 21, 2026
f42e0d0
[fix](connector) Close remaining lifecycle race windows
924060929 Aug 22, 2026
1f52695
fix: close remaining query lifecycle races
924060929 Aug 22, 2026
af899e6
[fix](external) Close remaining metadata lifecycle races
924060929 Aug 22, 2026
23ac237
[fix](external) Fence catalog alter and Flight teardown
924060929 Aug 22, 2026
ca8a689
[fix](external) fence streaming task lifecycle handoffs
924060929 Aug 23, 2026
8c4f469
[fix](external) narrow resource cleanup scope
924060929 Aug 23, 2026
2a3840d
[fix](iceberg) preserve async refresh and close HMS FileIO
924060929 Aug 24, 2026
86fc52b
[fix](fe) Reconcile Iceberg lifecycle with metadata cache governance
924060929 Aug 25, 2026
062edf6
[fix](fe) Close external metadata lifecycle races
924060929 Aug 26, 2026
a6dd59b
[fix](fe) Restore external catalog runtime state after replay
924060929 Aug 27, 2026
76ad1e5
[fix](fe) Make external cleanup failure atomic
924060929 Aug 27, 2026
3163636
[fix](fe) Close external refresh lifecycle gaps
924060929 Aug 27, 2026
ae3dfbe
[fix](fe) Close remaining external lifecycle gaps
924060929 Aug 27, 2026
21f11d0
[fix](fe) Close Iceberg and Hudi metadata resources safely
924060929 Aug 28, 2026
3dc3503
[fix](fe) Fix Iceberg lifecycle checkstyle
924060929 Aug 28, 2026
8ca0cc7
[fix](fe) Close Hadoop Iceberg catalog resources
924060929 Aug 28, 2026
acda98d
[fix](fe) Fence Iceberg and Hudi lifecycle races
924060929 Aug 28, 2026
d86ecd5
[fix](fe) Guard Iceberg operations during catalog reset
924060929 Aug 31, 2026
2088184
[fix](fe) Complete Iceberg and Hudi generation fencing
924060929 Aug 31, 2026
fac7113
[fix](fe) Retain Iceberg mutations and fence Hudi schema publication
924060929 Aug 31, 2026
fe0b502
[fix](fe) Keep Iceberg and Hudi resources generation-scoped
924060929 Sep 1, 2026
59f2a41
[fix](fe) Stop cancelled Hudi listing submissions
924060929 Sep 1, 2026
695ebf1
[fix](fe) Complete Iceberg rewrites through transaction manager
924060929 Sep 1, 2026
e378b44
[refactor](fe) Centralize Iceberg writable mutation commits
924060929 Sep 1, 2026
7963f7c
[fix](fe) Close Iceberg reset-time lifecycle gaps
924060929 Sep 1, 2026
7ccd2dd
[fix](fe) Keep Iceberg schema projection on one generation
924060929 Sep 2, 2026
b0611e1
[fix](fe) Close remaining Iceberg and Hudi lifecycle races
924060929 Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.PriorityBlockingQueue;
Expand Down Expand Up @@ -390,6 +391,7 @@ public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
public static class BlockedPolicy implements RejectedExecutionHandler {

private static final Logger LOG = LogManager.getLogger(BlockedPolicy.class);
private static final long CANCEL_CHECK_INTERVAL_NANOS = TimeUnit.MILLISECONDS.toNanos(100);

private String threadPoolName;

Expand All @@ -403,18 +405,34 @@ public BlockedPolicy(String threadPoolName, int timeoutSeconds) {
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
try {
boolean ret = executor.getQueue().offer(r, timeoutSeconds, TimeUnit.SECONDS);
if (!ret) {
throw new RejectedExecutionException("submit task failed, queue size is full: "
+ this.threadPoolName);
if (isCancelled(r) || executor.getQueue().offer(r)) {
return;
}
long remainingNanos = TimeUnit.SECONDS.toNanos(timeoutSeconds);
while (!isCancelled(r)) {
if (remainingNanos <= 0) {
throw new RejectedExecutionException("submit task failed, queue size is full: "
+ this.threadPoolName);
}
long waitNanos = Math.min(remainingNanos, CANCEL_CHECK_INTERVAL_NANOS);
long startNanos = System.nanoTime();
if (executor.getQueue().offer(r, waitNanos, TimeUnit.NANOSECONDS)) {
return;
}
remainingNanos -= System.nanoTime() - startNanos;
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
String errMsg = String.format("Task %s wait to enqueue in %s %s failed",
r.toString(), threadPoolName, executor.toString());
LOG.warn(errMsg);
throw new RejectedExecutionException(errMsg);
}
}

private boolean isCancelled(Runnable task) {
return task instanceof Future<?> && ((Future<?>) task).isCancelled();
}
}

static class LogDiscardOldestPolicy implements RejectedExecutionHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,6 @@ private void alterExternalCatalogPropsFenced(ExternalCatalog externalCatalog, Ca
throw new DdlException("Invalid catalog properties: "
+ validationException.getMessage(), validationException);
}
} else {
externalCatalog.tryModifyCatalogProps(newProps);
}
if (newProps.containsKey(METADATA_REFRESH_INTERVAL_SEC)) {
long catalogId = externalCatalog.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,16 @@ public void finishSchedule() {
}

public void stop() {
if (isStop()) {
return;
List<Closeable> resources;
synchronized (closeableResources) {
if (isStop()) {
return;
}
isStopped.set(true);
Comment thread
924060929 marked this conversation as resolved.
resources = new ArrayList<>(closeableResources);
closeableResources.clear();
}
isStopped.set(true);
closeableResources.forEach((closeable) -> {
resources.forEach((closeable) -> {
try {
closeable.close();
} catch (Exception e) {
Expand All @@ -204,16 +209,23 @@ public void stop() {
}
});
notifyAssignment();
if (exception != null) {
throw new RuntimeException(exception);
}
}

public boolean isStop() {
return isStopped.get();
}

public void addCloseable(Closeable resource) {
closeableResources.add(resource);
synchronized (closeableResources) {
if (!isStop()) {
closeableResources.add(resource);
return;
}
}
try {
resource.close();
} catch (Exception e) {
LOG.warn("close resource registered after stop error:{}", e.getMessage(), e);
}
}
}
Loading
Loading