Skip to content

Upgrade to Netty 4.1.36, support native compilation #616

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

Closed
wants to merge 23 commits into from

Conversation

michael-simons
Copy link
Contributor

Ping @shelajev @jexp

That is an ongoing effort to

  • Use Netty 4.1.36, that brings automatic substitutions for the native GraalVM
  • Add some shims to help those with our shading

Netty added substitutions and meta data for native compilation on the
GraalVM in version 4.1.36, which should be a drop in for 4.1.22.

See the related discussion here: netty/netty#8963.
Those substitutions works also when Netty is shaded.

I confirmed this with a patched version of my Quarkus-Neo4j-extension
(see https://github.com/quarkusio/quarkus/tree/master/extensions/neo4j),
in which I can remove all the manual substitutions as well.

I also have a Helidon project (https://github.com/michael-simons/helidon-test), which now natively compiles, but get's stuck with

2019.07.20 18:22:14 WARNING org.neo4j.driver.internal.shaded.io.netty.channel.DefaultChannelId !thread!: Failed to find the current process ID from ''; using a random value: 1210464143

All necessary options have been configured that SSL works on Graal OOTB. However, when not relying on infrastructure like Quarkus, one has to configure Libssl during start like this -Djava.library.path=$GRAALVM_HOME/jre/lib -Djavax.net.ssl.trustStore=$GRAALVM_HOME/jre/lib/security/cacerts

michael-simons and others added 23 commits July 20, 2019 18:14
…abase.

As this makes the routing table map easier for server version lower than 4.0.
Otherwise, if we default to get routing table for system_db, we need to detect if it is server version lower than 4.0. If so, we can only get routing table for default_db, and then we need to reset the key in routing table map to be default_db.

TODO: Removing stale routing table from routing table map.
Also missing any integration tests for 4.0 routing driver.
…getRoutingTable`, as this procedure is not only used by cluster but also single instance.
Fixed a flaky test due to misused timeout value
Added a shortcut to specify database name on session
The tests were failing because in 4.0 we introduced a new parallel runtime which does not preserve the order of the unwind lists.
As the driver tests are testing the driver not missing any records rather than cypher semantics, we change the query to preserve order in our test instead.
Netty added substitutions and meta data for native compilation on the
GraalVM in version 4.1.36, which should be a drop in for 4.1.22.

See the related discussion here:
netty/netty#8963.

Those substitutions works also when Netty is shaded.

I confirmed this with a patched version of my Quarkus-Neo4j-extension
(see https://github.com/quarkusio/quarkus/tree/master/extensions/neo4j),
in which I can remove all the manual substitutions as well as with a
Helidon project (https://github.com/michael-simons/helidon-test).

All necessary options have been configured that SSL works on Graal OOTB.
@michael-simons michael-simons changed the title Feature/native support Upgrade to Netty 4.1.36, support native compilation Jul 20, 2019
@zhenlineo
Copy link
Contributor

Can you rebase this work on #631?

@michael-simons
Copy link
Contributor Author

Can you rebase this work on #631?

I'll probably copy it over. Did the Netty upgrade made it to master already?

@zhenlineo
Copy link
Contributor

Yes. go ahead.

@michael-simons
Copy link
Contributor Author

Closing in favour of #634 .

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