Skip to content

Conversation

@claudevdm
Copy link
Collaborator

Reverts #36897

Causing failed integration tests on beam import (NPE when adding to ImmutableList, ArrayList supported nulls?)

@github-actions github-actions bot added the java label Dec 5, 2025
@claudevdm
Copy link
Collaborator Author

R: @Abacn

@claudevdm
Copy link
Collaborator Author

R: @scwhittle

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @claudevdm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request reverts a previous change (#36897) that aimed to reduce weighing overhead for caching blocks. The revert is necessary because the original change introduced a bug causing failed integration tests, specifically a NullPointerException when adding to ImmutableList during beam import. By reverting, the PR restores the previous, stable behavior of weight calculation and block management, addressing the integration test failures.

Highlights

  • Reversion of Weight Calculation Logic: The pull request reverts changes to how weights are accumulated, specifically moving back from a custom Math.addExact implementation with overflow handling to LongMath.saturatedAdd for WeightedList and BlocksPrefix.
  • Restoration of ImmutableList Usage: The PR restores the use of ImmutableList for managing block values in StateFetchingIterators, undoing the previous shift to WeightedList for this purpose. This includes reverting changes to Block initialization and value accumulation logic.
  • Removal of WeightedList for Block Management: The previous PR attempted to use WeightedList more extensively for managing block contents and their weights. This revert removes that integration, going back to ImmutableList.Builder and manual weight tracking in StateFetchingIterators.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@shunping
Copy link
Collaborator

shunping commented Dec 6, 2025

It seems that the Precommit Java PVR Loopback workflow is failing because of it (https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_PVR_Prism_Loopback.yml?page=3&query=branch%3Amaster+).

Copy link
Collaborator

@shunping shunping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@claudevdm claudevdm merged commit e927f2d into master Dec 7, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants