Hi devs,

It is a long time issue that OpCode.check can cause client
disconnection and server unusable or even database corruption. It has
been reported twice in ZOOKEEPER-2623[1] and ZOOKEEPER-4680[2]. Both
are reported by third-party client authors.

I opened pr-1988[3](merged now) to make OpCode.check a pure read
operation and return nothing to match OpResult.CheckResult in
MultiResponse. But I am rethinking this when investigating
ZOOKEEPER-4750[4] and wonder whether UNIMPLEMENTED is more appropriate
for reasons:
1. OpCode.check was designed to function inside OpCode.multi but not
individually.
2. We have OpCode.exists, it covers the OpCode.check behavior
pr-1988[3] introduced.
3. It could confuse us when inspecting logs and metrics if we record
operation statistics somewhere. This probably introduces a long term
maintenance burden.

So I am here to seek a consensus on this. I prefer to UNIMPLEMENTED
even pr-1988[3] has been merged.

@anmolnar might want to backport this to 3.8 and 3.9 series. I am
supportive of backport. So I think we probably should align before
backporting.

Any thoughts ?

[1]: https://issues.apache.org/jira/browse/ZOOKEEPER-2623
[2]: https://issues.apache.org/jira/browse/ZOOKEEPER-4680
[3]: https://github.com/apache/zookeeper/pull/1988
[4]: https://issues.apache.org/jira/browse/ZOOKEEPER-4750

Reply via email to