Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7266

Don't attempt to delete parent directory on S3

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.4.0, 1.3.2
    • Component/s: Core
    • Labels:
      None

      Description

      Currently, every attempted release of an S3 state object also checks if the "parent directory" is empty and then tries to delete it.

      Not only is that unnecessary on S3, but it is prohibitively expensive and for example causes S3 to throttle calls by the JobManager on checkpoint cleanup.

      The FileState must only attempt parent directory cleanup when operating against real file systems, not when operating against object stores.

        Issue Links

          Activity

          Hide
          srichter Stefan Richter added a comment -

          One comment about the "not necessary on S3" part: during the release 1.3.2 testing, I observed that I can see some empty directory entries remaining in S3. I added a screenshot in the testing document here. If this is not a problem, can the issue be closed or is the merge into 1.4 still pending?

          Show
          srichter Stefan Richter added a comment - One comment about the "not necessary on S3" part: during the release 1.3.2 testing, I observed that I can see some empty directory entries remaining in S3. I added a screenshot in the testing document here . If this is not a problem, can the issue be closed or is the merge into 1.4 still pending?
          Hide
          StephanEwen Stephan Ewen added a comment -

          We could try and improve that by not dong the mkdirs() call in the stream factory for each state element. That might help with that, but I would consider this to not be a release blocker.

          I would try and solve that in a more holistic way in 1.4.0, by extending the FileSystem abstraction and post-state release hooks in the Checkpoint Coordinator (so that there is one call to drop the directory marker file, if we cannot find a way for it to not be created in the first place.

          Show
          StephanEwen Stephan Ewen added a comment - We could try and improve that by not dong the mkdirs() call in the stream factory for each state element. That might help with that, but I would consider this to not be a release blocker. I would try and solve that in a more holistic way in 1.4.0, by extending the FileSystem abstraction and post-state release hooks in the Checkpoint Coordinator (so that there is one call to drop the directory marker file, if we cannot find a way for it to not be created in the first place.
          Hide
          srichter Stefan Richter added a comment -

          I agree that we should not block the release on this. Just wanted to have this recorded with this issue, so that we can improve it for the future.

          Show
          srichter Stefan Richter added a comment - I agree that we should not block the release on this. Just wanted to have this recorded with this issue, so that we can improve it for the future.
          Hide
          aljoscha Aljoscha Krettek added a comment -

          This is actually resolved on release-1.3 for the s3 filesystem.

          Show
          aljoscha Aljoscha Krettek added a comment - This is actually resolved on release-1.3 for the s3 filesystem.

            People

            • Assignee:
              StephanEwen Stephan Ewen
              Reporter:
              StephanEwen Stephan Ewen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development