Skip to content

timeout feature for runSync (per table)#823

Open
sapienza88 wants to merge 6 commits into
apache:mainfrom
sapienza88:run_sync_timeout
Open

timeout feature for runSync (per table)#823
sapienza88 wants to merge 6 commits into
apache:mainfrom
sapienza88:run_sync_timeout

Conversation

@sapienza88
Copy link
Copy Markdown
Contributor

Important Read

  • Please ensure the GitHub issue is mentioned at the beginning of the PR

What is the purpose of the pull request

(For example: This pull request implements the sync for delta format.)

Brief change log

(for example:)

  • Fixed JSON parsing error when persisting state
  • Added unit tests for schema evolution

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added TestConversionController to verify the change.
  • Manually verified the change by running a job locally.

Selim Soufargi added 2 commits May 18, 2026 21:25
Comment thread xtable-core/src/test/java/org/apache/xtable/ITConversionController.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
Comment thread xtable-utilities/src/main/java/org/apache/xtable/utilities/RunSync.java Outdated
@MethodSource("generateTestParametersForFormatsSyncModesAndPartitioning")
public void testVariousOperations(
String sourceTableFormat, SyncMode syncMode, boolean isPartitioned) {
// Disable the lock manager and heartbeat threads for both Catalog and Table configurations
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lock-impl/heartbeat disabling looks unrelated to a per-table sync timeout. Is it masking the executor/heartbeat thread leak from the RunSync change (e.g. the IT not terminating)? Please split it into its own PR or explain the connection in the description — keeping this PR scoped to the timeout feature makes it easier to review and revert.

Copy link
Copy Markdown
Contributor Author

@sapienza88 sapienza88 Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prior to adding those Iceberg configs, I had this CI error:

Error: Tests run: 45, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 886.7 s <<< FAILURE! -- in org.apache.xtable.ITConversionController

Error: org.apache.xtable.ITConversionController.testVariousOperations(String, SyncMode, boolean)[9] -- Time elapsed: 46.59 s <<< ERROR!

java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@103e0cca[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@350a7db8[Wrapped task = org.apache.iceberg.util.LockManagers$InMemoryLockManager$$Lambda$4325/0x000000010186d040@4b35e84a]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@53e4a92a[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 21]

at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055)

at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:632)

at java.base/java.util.concurrent.Executors$DelegatedScheduledExecutorService.scheduleAtFixedRate(Executors.java:785)

at org.apache.iceberg.util.LockManagers$InMemoryLockManager.acquireOnce(LockManagers.java:220)

at org.apache.iceberg.util.LockManagers$InMemoryLockManager.lambda$acquire$1(LockManagers.java:249)

at org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:413)

at org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:219)

at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:203)

at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:196)

at org.apache.iceberg.util.LockManagers$InMemoryLockManager.acquire(LockManagers.java:249)

at org.apache.iceberg.hadoop.HadoopTableOperations.renameToFinal(HadoopTableOperations.java:363)

at org.apache.iceberg.hadoop.HadoopTableOperations.commit(HadoopTableOperations.java:162)

at org.apache.iceberg.SnapshotProducer.lambda$commit$2(SnapshotProducer.java:465)

at org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:413)

at org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:219)

at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:203)

at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:196)

at org.apache.iceberg.SnapshotProducer.commit(SnapshotProducer.java:437)

at org.apache.iceberg.StreamingDelete.commit(StreamingDelete.java:24)

at org.apache.xtable.TestIcebergTable.deletePartition(TestIcebergTable.java:241)

at org.apache.xtable.TestIcebergTable.deleteSpecialPartition(TestIcebergTable.java:246)

at org.apache.xtable.ITConversionController.testVariousOperations(ITConversionController.java:294)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)

at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)

at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)

at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)

at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Selim Soufargi added 2 commits June 5, 2026 21:15
… submit() instead of delayer and runAsync + cancel(true), shutdown executor in finally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants