charlesconnell opened a new pull request, #8757:
URL: https://github.com/apache/hbase/pull/8757

   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 use it in 3.x releases, which target Java 17. This will eliminate many 
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 later.
   
   I originally opened this a year ago as 
https://github.com/apache/hbase/pull/7418. I was asked to wait until after the 
3.0.0 release, and so now that that is released, I'm coming back to this.


-- 
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]

Reply via email to