RFR: 8351996: Behavioral updates for ClassValue::remove [v6]

Chen Liang liach at openjdk.org
Mon Apr 28 01:09:58 UTC 2025


On Sun, 27 Apr 2025 05:28:56 GMT, John R Rose <jrose at openjdk.org> wrote:

>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>> 
>>  - Cannot test for recursion eagerly - add test case
>>  - More spec, eager exception, finish with existing, thanks John
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/classvalue-compute-remove
>>  - docs
>>  - Remove the throwing behavior due to shallow reentrancy
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/classvalue-compute-remove
>>  - Add more tests to avoid critical errors like the last one
>>  - Major typo
>>  - Use identity of thread, some optimizations for single thread case
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/classvalue-compute-remove
>>  - ... and 2 more: https://git.openjdk.org/jdk/compare/d401c31f...edd19537
>
> One thing I didn't note in the javadoc, but which might be significant, is that `computeValue` calls can be restarted for unpredictable reasons.  I gave some of them in the javadoc, but not all.  I did not document the possibility of crosstalk between <CV,C> pairs.  Another pair <CV,C2> might do a remove and update the internal CV version.  The purpose of htis is to flush the CV cache.  But it also creates an interference with ongoing computation of `computeValue` for the original <CV,C> pair.  Maybe we should treat such crosstalk as a bug.

@rose00 I ran the no-promise-removal version in tiers 1-3 and added a new test case (verified to fail on mainline with 2 computeValue invocations) for this fix. Can you review the current state of this patch and also the CSR for specification wording updates? https://bugs.openjdk.org/browse/JDK-8352433

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24043#issuecomment-2833757711


More information about the core-libs-dev mailing list