Skip to content

Conversation

@v0y4g3r
Copy link
Contributor

@v0y4g3r v0y4g3r commented Apr 13, 2023

This PR:

  • adds oio::Write::abort API to allow cancellation of an on-going append writer
  • for those writers do not support append, adds a Write::abort implementation that simply return Ok(())
  • adds delegated implementations of oio::Write::abort for all layers
  • adds oio::Write::abort implementation for S3Writer as an example

This PR does not add an equivalent API in oio::BlockingWrite, since we can always add a Drop implementation for blocking writers and delete partial objects in Drop::drop.

Related issue

#1607

@Xuanwo
Copy link
Member

Xuanwo commented Apr 14, 2023

Hi, @v0y4g3r, is this PR ready for review? Do you want to add abort API first and then add support for different services?

@v0y4g3r
Copy link
Contributor Author

v0y4g3r commented Apr 14, 2023

Hi, @v0y4g3r, is this PR ready for review? Do you want to add abort API first and then add support for different services?

Maybe I can add S3 implementation along with the Writer::abort definition in this PR so that any one who is interested in that can involve in.

@Xuanwo
Copy link
Member

Xuanwo commented Apr 14, 2023

Maybe I can add S3 implementation along with the Writer::abort definition in this PR so that any one who is interested in that can involve in.

LGTM!

@v0y4g3r v0y4g3r force-pushed the feat/writer-abort branch from 0220728 to e139bc0 Compare April 14, 2023 07:12
@v0y4g3r v0y4g3r marked this pull request as ready for review April 14, 2023 07:13
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Mostly LGTM!

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@v0y4g3r
Copy link
Contributor Author

v0y4g3r commented Apr 14, 2023

I'm wondering if we can add a service test for Write::abort?

@Xuanwo
Copy link
Member

Xuanwo commented Apr 14, 2023

I'm wondering if we can add a service test for Write::abort?

Yes, we can add abort in behavior test (by ignoring not support errors)! This is PR good to get merged. How about adding a new PR for that?

@Xuanwo Xuanwo merged commit 1ec735e into apache:main Apr 14, 2023
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