charlesconnell opened a new pull request, #7418: URL: https://github.com/apache/hbase/pull/7418
Java offers `VarHandle` to facilitate fast access to memory, in place of the `Unsafe#get*` and `Unsafe#put*` methods. It can be used as almost a drop-in replacement, and the performance is similar. `VarHandle` was introduced in Java 9. HBase 2.x supports Java 8, so we cannot use `VarHandle` in 2.x releases, but we can prepare to use it in 3.x releases, which target Java 17. This will eliminate most uses of `Unsafe` in HBase. Most remaining uses of `Unsafe` are for copying memory regions. There is an alternative available for that, `MemorySegment`, that is available in Java 22 and higher, but we'll tackle that much later. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
