The current buffer logic for items emitted during checkpointing is faulty in the sense that the buffer is partitioned on the output keys of the operator. The key may be changed or even be dropped. Thus, the original key partitioning will not be maintained which will cause checkpointing to fail.
An alternative solution would be BEAM-6733, but we may want to keep the current buffering logic in place. The proposed solution here is to remove the keyed buffering. The output buffer may then always be redistributed round-robin upon restoring from a checkpoint. Note that this is fine because no assumption can be made about the distribution of output elements of an operation.