[Bug]: ByteBuddyDoFnInvokerFactory cache collision for DoFns with different generic types
What happened?
I discovered a bug in ByteBuddyDoFnInvokerFactory where the cache key strategy causes collisions for the same DoFn class used with different generic types.
Currently, the cache is keyed solely on the DoFn class. This causes incorrect invoker reuse when generics are erased. For example, MyDoFn
Steps to reproduce
I reproduced this behavior with the following unit test in DoFnInvokersTest.java. The test fails with an AssertionError, proving that the generated invoker classes are identical despite the different generic types.
.take issue I would like to volunteer to fix this.
Hi, I would like to work on this issue. I am a new contributor to Apache Beam. Could you please assign this issue to me or let me know if I can proceed? Thank you!
Hi, I would like to work on this issue. I am a new contributor to Apache Beam. Could you please assign this issue to me or let me know if I can proceed? Thank you!
Hi, this issue is assigned to me and a fix is already under review. Thanks!