Details
-
Bug
-
Status: Open
-
Not a Priority
-
Resolution: Unresolved
-
1.0.0
-
None
Description
MutableObjectIterator.next(reuse) has the following contract (according to StephanEwen's comment [1]):
1. The caller may not hold onto reuse any more
2. The iterator implementor may not hold onto the returned object any more.
This should be documented in its javadoc (with "WARNING" so that people don't overlook it).
Additionally, since this was a "secret contract" up to now, all the 270 usages of MutableObjectIterator.next(reuse) should be checked for violations. A few that are suspicious at first glance, are in CrossDriver, UnionWithTempOperator, MutableHashTable.ProbeIterator.next, ReusingBuildFirstHashJoinIterator.callWithNextKey. (The violating calls in the reduce drivers are being fixed by https://github.com/apache/flink/pull/1626 )