Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-2623: [ADDENDUM] Forbid OpCode.check outside OpCode.multi #2104

Conversation

kezhuw
Copy link
Member

@kezhuw kezhuw commented Jan 9, 2024

Individual OpCode.check will get UnimplementedException.

JIRA: ZOOKEEPER-2623
Discussion thread: https://lists.apache.org/thread/vl816jfrklvqz29coz5qnwpom9q41pcg

This pr reworks/reverts #1988, which return an empty response for individual OpCode.check, for the following reasons:

  • The individual OpCode.check is covered by OpCode.exists.
  • In certain situation, we may want to differentiate the two(individual or not), say statistics. This could cause maintenance burden for us.
  • Exposing opcode without explicit API is probably not a good.

Open this pr for easy evaluation. I will reply the discussion thread for reference.

I plan to open a draft backport on branch-3.9 to ease code review if we are willing to go this direction.

@kezhuw
Copy link
Member Author

kezhuw commented Jan 9, 2024

I have opened #2105 onto branch-3.9 without commits from #1988 so to make it clean for reviewing.

Individual `OpCode.check` will get `UnimplementedException`.
@kezhuw kezhuw force-pushed the ZOOKEEPER-2623-addendum-forbid-opcode-check-outside-multi branch from dc22ba8 to 6d1725b Compare May 21, 2024 07:00
Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

Comment on lines 298 to +299
case OpCode.check:
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the effective change beyond the revert. According to https://lists.apache.org/thread/vl816jfrklvqz29coz5qnwpom9q41pcg.

@kezhuw
Copy link
Member Author

kezhuw commented Jun 24, 2024

@anmolnar @tisonkun Shall we merge this ?

@kezhuw kezhuw merged commit 66f9cc3 into apache:master Aug 5, 2024
13 checks passed
kezhuw added a commit to kezhuw/zookeeper that referenced this pull request Aug 12, 2024
Individual `OpCode.check` will get `UnimplementedException`.

This is a squashed backport of several commits from master:
1. b31f776 (apache#1988)
2. dc99bd7 (apache#2067)
3. 66f9cc3 (apache#2104)
kezhuw added a commit to kezhuw/zookeeper that referenced this pull request Aug 12, 2024
Individual `OpCode.check` will get `UnimplementedException`.

This is a squashed backport of several commits from master:
1. b31f776 (apache#1988)
2. dc99bd7 (apache#2067)
3. 66f9cc3 (apache#2104)
kezhuw added a commit to kezhuw/zookeeper that referenced this pull request Aug 12, 2024
Individual `OpCode.check` will get `UnimplementedException`.

This is a squashed backport of several commits from master:
1. b31f776 (apache#1988)
2. dc99bd7 (apache#2067)
3. 66f9cc3 (apache#2104)
kezhuw added a commit that referenced this pull request Aug 13, 2024
Individual `OpCode.check` will get `UnimplementedException`.

This is a squashed backport of several commits from master:
1. b31f776 (#1988)
2. dc99bd7 (#2067)
3. 66f9cc3 (#2104)
kezhuw added a commit that referenced this pull request Aug 13, 2024
Individual `OpCode.check` will get `UnimplementedException`.

This is a squashed backport of several commits from master:
1. b31f776 (#1988)
2. dc99bd7 (#2067)
3. 66f9cc3 (#2104)
@kezhuw kezhuw deleted the ZOOKEEPER-2623-addendum-forbid-opcode-check-outside-multi branch October 14, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants