Details
Description
Once future replica fetches log end offset, the intended logic is to finish the move (and rename the future dir to current replica dir, etc). However, the check in Partition.maybeReplaceCurrentWithFutureReplica compares the whole LogOffsetMetadata vs. log end offset. The resulting behavior is that the re-assignment will not finish for topic partitions that were cleaned/ compacted such that base offset of the last segment is different for the current and future replica.
The proposed fix is to compare only log end offsets of the current and future replica.