-
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
Update airbase to 140 #17740
Update airbase to 140 #17740
Conversation
plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/split/HudiBackgroundSplitLoader.java
Outdated
Show resolved
Hide resolved
@martint these are the only violations after Guava dropped |
b0e8fd8
to
7d9e25c
Compare
7d9e25c
to
71f6086
Compare
@@ -62,6 +62,7 @@ public HudiBackgroundSplitLoader( | |||
this.hudiSplitFactory = new HudiSplitFactory(tableHandle, hudiSplitWeightProvider); | |||
} | |||
|
|||
@SuppressWarnings("CheckReturnValue") |
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.
why exactly? (the links from commit desc do not explain)
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.
According to the FutureCombiner javadoc and error-prone FutureReturnValueIgnored:
Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.
The problem
Methods that return java.util.concurrent.Future and its subclasses generally indicate errors by returning a future that eventually fails.
If you don’t check the return value of these methods, you will never find out if they threw an exception.
Nested futures can also result in missed cancellation signals or suppressed exceptions - see [Avoiding Nested Futures](https://github.com/google/guava/wiki/ListenableFutureExplained#avoid-nested-futures) for details.
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.
Document why it's correct to do this suppression. Ask Hudi people if we don't know
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've hooked the same listener on this combined future as in other places.
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.
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 % Lukasz's comment. suppressions should have reasons ideally so that people can revisit them
...tor-legacy/src/test/java/io/trino/plugin/raptor/legacy/util/TestPrioritizedFifoExecutor.java
Outdated
Show resolved
Hide resolved
This change makes it possible to build project with project.build.targetJdk 21. Additionally suppress error-prone `CheckReturnValue` violations with Guava 32.0.0 These are the result of following changes: - google/guava@a7f6b08 - google/guava@0ef6688
71f6086
to
ddb7b09
Compare
@@ -70,7 +70,8 @@ public void testCounter() | |||
futures.add(executor.submit(() -> { | |||
try { | |||
// wait for the go signal | |||
awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES); | |||
@SuppressWarnings("CheckReturnValue") | |||
boolean ignored = awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES); |
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.
why ignore?
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.
To leave the behavior as it was before.
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 is a test, so it would not be unsafe to just improve it
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.
Agreed, I would make all these assertTrue(...)
@@ -74,7 +74,7 @@ public void start() | |||
.map(partition -> Futures.submit(() -> loadSplits(partition), executor)) | |||
.peek(this::hookErrorListener) | |||
.collect(Collectors.toList()); | |||
Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor()); | |||
hookErrorListener(Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor())); |
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.
@wendigo Shouldn't the hook on line 81 be sufficient?
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.
It’s about ignoring return value of the combiner call. What would you propose instead adding a hook?
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.
@codope here we add a hook for asyncQueue::finish
potential failures
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.
Got it, thanks
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’ve migrated this change to other PR. Seems to work just fine
Superseded by #17770 |
This change makes it possible to build project with
project.build.targetJdk
21.The only remaining maven infrastructure bit that doesn't work under JDK 21 is error-prone but the current HEAD fixes those problems so it's a matter of updating error-prone when the next version is released.
This also brings Guava to version
32.0.0
(https://github.com/google/guava/releases/tag/v32.0.0)