amoro icon indicating copy to clipboard operation
amoro copied to clipboard

[Bug]: When the iceberg table is empty, clean orphan file NPE

Open XiaoGerGer opened this issue 2 years ago • 1 comments

What happened?

2023-12-13 01:54:44,591 ERROR [async-orphan-files-cleaning-executor-4] [com.netease.arctic.server.table.executor.OrphanFilesCleaningExecutor] [] - ice-01.ods_bps.ods_ebeb(tableId=677) failed to clean orphan file

java.lang.NullPointerException: null

     at com.netease.arctic.server.optimizing.maintainer.IcebergTableMaintainer.cleanOrphanFiles(IcebergTableMaintainer.java:140) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

     at com.netease.arctic.server.table.executor.OrphanFilesCleaningExecutor.execute(OrphanFilesCleaningExecutor.java:61) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

     at com.netease.arctic.server.table.executor.BaseTableExecutor.executeTask(BaseTableExecutor.java:74) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

     at com.netease.arctic.server.table.executor.BaseTableExecutor.lambda$scheduleIfNecessary$4(BaseTableExecutor.java:83) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_392]

     at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_392]

     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_392]

     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_392]

     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_392]

     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_392]

     at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392]

Affects Versions

master-snapshot [ at 2023-12-08 ]

What engines are you seeing the problem on?

No response

How to reproduce

No response

Relevant log output

2023-12-13 01:54:44,591 ERROR [async-orphan-files-cleaning-executor-4] [com.netease.arctic.server.table.executor.OrphanFilesCleaningExecutor] [] - ice-01.ods_bps.ods_wl_pcn_batchapplydetail(tableId=677) failed to clean orphan file

java.lang.NullPointerException: null

         at com.netease.arctic.server.optimizing.maintainer.IcebergTableMaintainer.cleanOrphanFiles(IcebergTableMaintainer.java:140) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

         at com.netease.arctic.server.table.executor.OrphanFilesCleaningExecutor.execute(OrphanFilesCleaningExecutor.java:61) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

         at com.netease.arctic.server.table.executor.BaseTableExecutor.executeTask(BaseTableExecutor.java:74) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

         at com.netease.arctic.server.table.executor.BaseTableExecutor.lambda$scheduleIfNecessary$4(BaseTableExecutor.java:83) ~[amoro-ams-server-0.7.0-SNAPSHOT.jar:?]

         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_392]

         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_392]

         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_392]

         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_392]

         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_392]

         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_392]

         at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392]

Anything else

No response

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

XiaoGerGer avatar Dec 13 '23 03:12 XiaoGerGer

@XiaoGerGer thanks for reporting this, from the code seems the property table is null, could you please share how to reproduce this error, thanks.

klion26 avatar Mar 27 '24 07:03 klion26

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] avatar Sep 24 '24 00:09 github-actions[bot]

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'

github-actions[bot] avatar Oct 09 '24 00:10 github-actions[bot]