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

transport-native-* should be usable when sun.misc.Unsafe can not be used. #8229

Closed
normanmaurer opened this issue Aug 27, 2018 · 0 comments · Fixed by #8231
Closed

transport-native-* should be usable when sun.misc.Unsafe can not be used. #8229

normanmaurer opened this issue Aug 27, 2018 · 0 comments · Fixed by #8231
Assignees

Comments

@normanmaurer
Copy link
Member

normanmaurer commented Aug 27, 2018

As JDK11 is on its way (which will be the LTS release) we should ensure that our native transports can be used even when sun.misc.Unsafe is not present.

@normanmaurer normanmaurer self-assigned this Aug 27, 2018
normanmaurer added a commit that referenced this issue Aug 28, 2018
… the system

Motivation:

We should be able to use the native transports (epoll / kqueue) even when sun.misc.Unsafe is not present on the system. This is especially important as Java11 will be released soon and does not allow access to it by default.

Modifications:

- Correctly disable usage of sun.misc.Unsafe when -PnoUnsafe is used while running the build
- Correctly increment metric when UnpooledDirectByteBuf is allocated. This was uncovered once -PnoUnsafe usage was fixed.
- Implement fallbacks in all our native transport code for when sun.misc.Unsafe is not present.

Result:

Fixes #8229.
normanmaurer added a commit that referenced this issue Aug 29, 2018
#8231)

* Allow to use native transports when sun.misc.Unsafe is not present on the system

Motivation:

We should be able to use the native transports (epoll / kqueue) even when sun.misc.Unsafe is not present on the system. This is especially important as Java11 will be released soon and does not allow access to it by default.

Modifications:

- Correctly disable usage of sun.misc.Unsafe when -PnoUnsafe is used while running the build
- Correctly increment metric when UnpooledDirectByteBuf is allocated. This was uncovered once -PnoUnsafe usage was fixed.
- Implement fallbacks in all our native transport code for when sun.misc.Unsafe is not present.

Result:

Fixes #8229.
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 a pull request may close this issue.

1 participant