Skip to content

KAFKA-19411: Fix deleteAcls bug which allows more deletions than max records per user op #19974

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

Merged
merged 4 commits into from
Jun 24, 2025

Conversation

ahuang98
Copy link
Contributor

@ahuang98 ahuang98 commented Jun 16, 2025

If there are more deletion filters after we initially hit the
MAX_RECORDS_PER_USER_OP bound, we will add an additional deletion
record ontop of that for each additional filter.

The current error message returned to the client is not useful either,
adding logic so client doesn't just get UNKNOWN_SERVER_EXCEPTION with
no details returned.

@github-actions github-actions bot added triage PRs from the community kraft small Small PRs labels Jun 16, 2025
@ahuang98 ahuang98 changed the title Fix deleteAcls bug which allows more deletions than max records per user op KAFKA-19411: Fix deleteAcls bug which allows more deletions than max records per user op Jun 16, 2025
@cmccabe
Copy link
Contributor

cmccabe commented Jun 16, 2025

Thanks for this fix! One problem I see is that this will allow the deletion to partly go through, until we run out of records. It would be better for the deletion to fail completely or succeed completely...

new RemoveAccessControlEntryRecord().setId(id), (short) 0));
if (records.size() > MAX_RECORDS_PER_USER_OP) {
// check size limitation first before adding additional records
if (records.size() == MAX_RECORDS_PER_USER_OP) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Using >= would be more future-proof I think...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack!

@github-actions github-actions bot removed the triage PRs from the community label Jun 18, 2025
Copy link
Contributor

@cmccabe cmccabe left a comment

Choose a reason for hiding this comment

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

LGTM

@cmccabe cmccabe merged commit 3460ded into apache:trunk Jun 24, 2025
23 checks passed
cmccabe pushed a commit that referenced this pull request Jun 24, 2025
…records per user op (#19974)

If there are more deletion filters after we initially hit the
`MAX_RECORDS_PER_USER_OP` bound, we will add an additional deletion
record ontop of that for each additional filter.

The current error message returned to the client is not useful either,
adding logic so client doesn't just get `UNKNOWN_SERVER_EXCEPTION` with
no details returned.
cmccabe pushed a commit that referenced this pull request Jun 24, 2025
…records per user op (#19974)

If there are more deletion filters after we initially hit the
`MAX_RECORDS_PER_USER_OP` bound, we will add an additional deletion
record ontop of that for each additional filter.

The current error message returned to the client is not useful either,
adding logic so client doesn't just get `UNKNOWN_SERVER_EXCEPTION` with
no details returned.
cmccabe pushed a commit that referenced this pull request Jun 24, 2025
…records per user op (#19974)

If there are more deletion filters after we initially hit the
`MAX_RECORDS_PER_USER_OP` bound, we will add an additional deletion
record ontop of that for each additional filter.

The current error message returned to the client is not useful either,
adding logic so client doesn't just get `UNKNOWN_SERVER_EXCEPTION` with
no details returned.

Conflicts:
- In AclControlManagerTest.java, use !isPresent instead of isEmpty so that this will work with java 8.
cmccabe pushed a commit that referenced this pull request Jun 24, 2025
…records per user op (#19974)

If there are more deletion filters after we initially hit the
`MAX_RECORDS_PER_USER_OP` bound, we will add an additional deletion
record ontop of that for each additional filter.

The current error message returned to the client is not useful either,
adding logic so client doesn't just get `UNKNOWN_SERVER_EXCEPTION` with
no details returned.

Conflicts:
- In AclControlManagerTest.java, use !isPresent instead of isEmpty so that this will work with java 8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants