My understanding is that the approach using ephemeral owner has the same performance and correctness guarantee as the current approach which uses epoch from the znode data.
The approach using ephemeral owner is probably more intuitive/readable because it exactly handles the root cause of `NodeExistsException | _: BadVersionException`, i.e. `checkControllerAndEpoch()` should effectively translate NodeExistsException/BadVersionException to `Code.OK` if and only if `ephemeral owner of the controller path equals to the ZK session id`. And it is also more consistent with the existing logic in `checkedEphemeralCreate()`. @hzxa21 If it sounds reasonable, maybe we can have a minor followup patch (without requiring a JIRA ticket) to improve it. [ Full content available at: https://github.com/apache/kafka/pull/5101 ] This message was relayed via gitbox.apache.org for [email protected]
