Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/trino-cli/src/main/java/io/trino/cli/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public boolean run()
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
exiting.set(true);
interruptor.interrupt();
awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS);
// Terminal closing restores terminal settings and releases underlying system resources
closeTerminal();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks

Copy link
Contributor Author

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

return null;
},
directExecutor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Member

Choose a reason for hiding this comment

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

why ignore?

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Member

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(...)


assertFalse(futures.get(taskNumber).isDone());

Expand All @@ -90,7 +91,8 @@ public void testCounter()

// signal go and wait for tasks to complete
startLatch.countDown();
awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);

assertEquals(counter.get(), totalTasks);
// since this is a fifo executor with one thread and completeLatch is decremented inside the future,
Expand Down Expand Up @@ -142,7 +144,8 @@ private void testBound(int maxThreads, int totalTasks)

// signal go and wait for tasks to complete
startLatch.countDown();
awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);

assertFalse(failed.get());
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>139</version>
<version>140</version>
</parent>

<groupId>io.trino</groupId>
Expand Down