-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance TrinoFileSystem#deleteFiles with files failure count #16006
Enhance TrinoFileSystem#deleteFiles with files failure count #16006
Conversation
@@ -1231,12 +1236,13 @@ private void executeExpireSnapshots(ConnectorSession session, IcebergTableExecut | |||
long expireTimestampMillis = session.getStart().toEpochMilli() - retention.toMillis(); | |||
TrinoFileSystem fileSystem = fileSystemFactory.create(session); | |||
List<String> pathsToDelete = new ArrayList<>(); | |||
AtomicLong failedToDelete = new AtomicLong(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't have to be thread safe, if that delete function was called from multi thread it probably wouldn't work as pathsToDelete
is not thread safe.
… to int Return number of files that failed to delete.
Return number of files that failed to delete.
afb1f78
to
a8e21e0
Compare
This still requires answer to #15981 (comment) question
|
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Apart from throwing runtime exception with message @findepi should we close this PR? |
Description
I am proposing to enhance TrinoFileSystem#deleteFiles to track the number of files that failed to delete.
Failure count is needed for the case when we want to throw
BulkDeletionFailureException
in #15981See Comments here
#15981 (comment)
#15981 (comment)
Release notes
(X) This is not user-visible or docs only and no release notes are required.