Skip to content

buffer: centralize VarHandle byte[] access in VarHandleByteBufferAccess#15670

Merged
normanmaurer merged 1 commit into
4.2from
buffer/centralize-varhandle-array-access
Sep 17, 2025
Merged

buffer: centralize VarHandle byte[] access in VarHandleByteBufferAccess#15670
normanmaurer merged 1 commit into
4.2from
buffer/centralize-varhandle-array-access

Conversation

@yawkat

@yawkat yawkat commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

Motivation:

Follow-up to #15661. Move signature-polymorphic VarHandle calls out of HeapByteBufUtil to avoid class verification issues on older Android runtimes when VarHandle is disabled.

Modifications:

  • Add byte[] getters/setters to VarHandleByteBufferAccess that wrap PlatformDependent.*ArrayView() VarHandles.
  • Use these methods from HeapByteBufUtil when VarHandle is enabled, preserving existing bitwise fallbacks otherwise.
  • Remove direct signature-polymorphic calls from HeapByteBufUtil.

Result:

No direct references to signature-polymorphic VarHandle methods remain in HeapByteBufUtil. Behavior is unchanged when VarHandle is disabled.


AI-generated PR again, FYI

Motivation:
Follow-up to #15661. Move signature-polymorphic VarHandle calls out of HeapByteBufUtil to avoid class verification issues on older Android runtimes when VarHandle is disabled.

Modifications:
- Add byte[] getters/setters to VarHandleByteBufferAccess that wrap PlatformDependent.*ArrayView() VarHandles.
- Use these methods from HeapByteBufUtil when VarHandle is enabled, preserving existing bitwise fallbacks otherwise.
- Remove direct signature-polymorphic calls from HeapByteBufUtil.

Result:
No direct references to signature-polymorphic VarHandle methods remain in HeapByteBufUtil. Behavior is unchanged when VarHandle is disabled.
@normanmaurer normanmaurer merged commit 5a24e23 into 4.2 Sep 17, 2025
18 of 19 checks passed
@normanmaurer normanmaurer deleted the buffer/centralize-varhandle-array-access branch September 17, 2025 06:23
@normanmaurer normanmaurer added this to the 4.2.7.Final milestone Sep 17, 2025
@normanmaurer

Copy link
Copy Markdown
Member

@ajith211 can you please try 4.2.7.Final-SNAPSHOT again now that this one was merged ?

@normanmaurer

Copy link
Copy Markdown
Member

Related to #15654

@ajith211

Copy link
Copy Markdown

@ajith211 can you please try 4.2.7.Final-SNAPSHOT again now that this one was merged ?

Somehow artifactory download is taking bit longer time than earlier during build. Will update you after generating the integrated build

@ajith211

Copy link
Copy Markdown

@normanmaurer @yawkat Good news. With latest 4.2.7.Final-SNAPSHOT, we can see issue is resolved.
Note: Can see a delay in the processing compared to earlier 4.2.5 version. But I am not sure whether it's due to Netty or not. Will wait for 4.2.7 release and do additional regression before pointing to Netty.
Thank you for taking this issue on priority and giving intermediate snapshot versions for verification.
Kindly share 4.2.7 release schedule.

@franz1981

Copy link
Copy Markdown
Contributor

@yawkat thanks 🙏

@normanmaurer

Copy link
Copy Markdown
Member

@normanmaurer @yawkat Good news. With latest 4.2.7.Final-SNAPSHOT, we can see issue is resolved. Note: Can see a delay in the processing compared to earlier 4.2.5 version. But I am not sure whether it's due to Netty or not. Will wait for 4.2.7 release and do additional regression before pointing to Netty. Thank you for taking this issue on priority and giving intermediate snapshot versions for verification. Kindly share 4.2.7 release schedule.

End of next week

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.

4 participants