Skip to content

Commit 1f53f03

Browse files
authored
Upgrade agrona version (#1281)
1 parent cb44f1e commit 1f53f03

File tree

3 files changed

+6
-11
lines changed
  • manager/src/main/java/io/aklivity/zilla/manager/internal/commands/install
  • runtime/engine/src/main/java/io/aklivity/zilla/runtime/engine/internal/poller

3 files changed

+6
-11
lines changed

manager/src/main/java/io/aklivity/zilla/manager/internal/commands/install/ZpmInstall.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ private void generateLauncher() throws IOException
753753
"JAVA_OPTIONS=\"$JAVA_OPTIONS -Dzilla.directory=$ZILLA_DIRECTORY\"",
754754
String.format(String.join(" ", Arrays.asList(
755755
"exec $ZILLA_DIRECTORY/%s/bin/java",
756-
"--add-opens java.base/sun.nio.ch=org.agrona.core",
757756
"$JAVA_OPTIONS",
758757
"-m io.aklivity.zilla.runtime.command/io.aklivity.zilla.runtime.command.internal.ZillaMain \"$@\"")),
759758
imageDir)));

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<checkstyle.config.location>io/aklivity/zilla/conf/checkstyle/configuration.xml</checkstyle.config.location>
5656
<checkstyle.suppressions.location>io/aklivity/zilla/conf/checkstyle/suppressions.xml</checkstyle.suppressions.location>
5757
<antlr4.version>4.13.0</antlr4.version>
58-
<agrona.version>1.21.1</agrona.version>
58+
<agrona.version>1.23.1</agrona.version>
5959
<slf4j.version>1.7.36</slf4j.version>
6060
<junit.version>5.10.2</junit.version>
6161
<byteman.version>4.0.23</byteman.version>
@@ -430,7 +430,7 @@
430430
<artifactId>maven-surefire-plugin</artifactId>
431431
<version>3.0.0-M5</version>
432432
<configuration>
433-
<argLine>@{jacoco.java.option} -Xshare:off --add-opens java.base/sun.nio.ch=ALL-UNNAMED</argLine>
433+
<argLine>@{jacoco.java.option} -Xshare:off</argLine>
434434
</configuration>
435435
</plugin>
436436
<plugin>
@@ -443,7 +443,7 @@
443443
<artifactId>maven-failsafe-plugin</artifactId>
444444
<version>3.0.0-M4</version>
445445
<configuration>
446-
<argLine>@{jacoco.java.option} -Xshare:off --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Djdk.attach.allowAttachSelf=true</argLine>
446+
<argLine>@{jacoco.java.option} -Xshare:off -Djdk.attach.allowAttachSelf=true</argLine>
447447
</configuration>
448448
<executions>
449449
<execution>

runtime/engine/src/main/java/io/aklivity/zilla/runtime/engine/internal/poller/Poller.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
import java.nio.channels.ClosedChannelException;
2121
import java.nio.channels.SelectableChannel;
2222
import java.nio.channels.SelectionKey;
23-
import java.util.function.ToIntFunction;
23+
import java.util.function.Consumer;
2424
import java.util.stream.Stream;
2525

2626
import org.agrona.LangUtil;
2727
import org.agrona.nio.TransportPoller;
2828

2929
public final class Poller extends TransportPoller
3030
{
31-
private final ToIntFunction<SelectionKey> selectHandler;
31+
private final Consumer<SelectionKey> selectHandler;
3232

3333
public Poller()
3434
{
@@ -41,14 +41,10 @@ public int doWork()
4141

4242
try
4343
{
44-
if (selector.selectNow() != 0)
45-
{
46-
workDone = selectedKeySet.forEach(selectHandler);
47-
}
44+
workDone += selector.selectNow(selectHandler);
4845
}
4946
catch (Throwable ex)
5047
{
51-
selectedKeySet.reset();
5248
LangUtil.rethrowUnchecked(ex);
5349
}
5450

0 commit comments

Comments
 (0)