apache / amoro

Apache Amoro (incubating) is a Lakehouse management system built on open data lake formats.
https://amoro.apache.org/
Apache License 2.0
837 stars 276 forks source link

[Improvement]: AMS frequently print warning logs of 'Unclosed ResolvingFileIO' #2024

Closed wangtaohz closed 1 week ago

wangtaohz commented 11 months ago

Search before asking

What would you like to be improved?

When Table and FileIO objects in AMS are cleaned up by garbage collection, an warning log will be printed.

image

How should we improve?

Close the FileIO after using it or ignore the logs

Are you willing to submit PR?

Subtasks

No response

Code of Conduct

wangtaohz commented 11 months ago

As a temporary solution, we can add the following configuration to the conf/log4j.xml of AMS.

    <Loggers>
        ...
        ...

        <!-- close the WARN logs of org.apache.iceberg.io.ResolvingFileIO -->
        <Logger name="org.apache.iceberg.io.ResolvingFileIO" level="error" additivity="false">
            <AppenderRef ref="infoFileAppender"/>
        </Logger>

        ...
        ...
    </Loggers>
baiyangtx commented 11 months ago

Maybe we should close the fileIo ASAP ?

wangtaohz commented 11 months ago

Maybe we should close the fileIo ASAP ?

I have tried but I couldn't find an elegant way to close FileIO ASAP, as it requires explicitly calling the close method on the FileIO after the Table object has been used, which is unfriendly to the user of the Table object.

github-actions[bot] commented 3 weeks ago

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.