-
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
Batch delete requests for exchange spooling on S3 and Azure #12511
Conversation
errorprone:
|
...system/src/main/java/io/trino/plugin/exchange/filesystem/s3/S3FileSystemExchangeStorage.java
Outdated
Show resolved
Hide resolved
.../main/java/io/trino/plugin/exchange/filesystem/azure/AzureBlobFileSystemExchangeStorage.java
Outdated
Show resolved
Hide resolved
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.
LGTM
private FileSystemExchangeUtil() {} | ||
|
||
// Helper function that translates exception and transform future type to avoid abstraction leak | ||
public static ListenableFuture<Void> transformFuture(ListenableFuture<?> listenableFuture) |
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.
I wonder if it is possible to give this method a better name. How about calling the method translateFailures
? (I know that it also transforms the future into a ListenableFuture<Void>
future, but that's probably a less important aspect of it that can be safely omitted without significantly decreasing readability )
import static com.google.common.util.concurrent.MoreExecutors.directExecutor; | ||
import static io.airlift.concurrent.MoreFutures.asVoid; | ||
|
||
public final class FileSystemExchangeUtil |
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.
nit: Generally we are trying to avoid *Util
classes as they tend to end up being a dump site of a bunch of loosely related hardly reusable code. I would recommend calling it FileSystemExchangeFutures
. It will make it more obvious of what methods this class may contain and potentially increase the likelihood of the methods being used / reused.
a4685c0
to
a679c0b
Compare
CI: #12535 |
@@ -0,0 +1,41 @@ | |||
/* |
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.
commit message typo sppoling
Description
Improvement.
trino-filesystem-exchange
This will help reduce the number of delete request sent to S3/Azure by batching them.
Related issues, pull requests, and links
Depend on #12360
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: