KAFKA-13850: Show missing record type in MetadataShell#12103
KAFKA-13850: Show missing record type in MetadataShell#12103showuon merged 4 commits intoapache:trunkfrom
Conversation
There was a problem hiding this comment.
Just as KIP-778 described, each ACL is shown in /acl/id/ in its JSON form. however, I should mention here that their schema in ZkNode is more hierarchical:
get /kafka/kafka-acl/${resourceType}/${resourceName}
{
"version":1,
"acls":[
{
"principal":"User:kafka",
"permissionType":"Allow",
"operation":"Read",
"host":"1.1.1.1"
}
]
}
e4867cb to
7c6f19e
Compare
|
ping @mumrah |
|
@jsancio , I think we should make this fix into v3.3, otherwise, the metadata shell is basically broken. WDYT? |
showuon
left a comment
There was a problem hiding this comment.
@dengziming , thanks for the fix, left some comments.
There was a problem hiding this comment.
nit: since this is just for test, we can use Uuid.ZERO_UUID for testing, to avoid random strings here.
There was a problem hiding this comment.
This is a little overkill here, we are using random strings in a lot of test cases and it won't reduce the code quality, and Uuid.ZERO_UUID may have some special meaning in different cases.
There was a problem hiding this comment.
Sorry, could you let me know where we mentioned featureLevel == 0 means delete it? I checked the record schema, it didn't mention this:
There was a problem hiding this comment.
Firstly we have a RemoveFeatureLevelRecord.json but we removed it in #12207 and we use 0-0 to represent not supported:
There was a problem hiding this comment.
Thanks for sharing! What a magic 0, haha! Could we add a simple note into FeatureLevelRecord.json? Something like:
{ "name": "FeatureLevel", "type": "int16", "versions": "0+",
"about": "The current finalized feature level of this feature for the cluster. 0 means feature not enabled." }
dengziming
left a comment
There was a problem hiding this comment.
Thank you @showuon for reviewing, I will fix them soon, I have checked all the record types and their fields, except some records we don't support now, for example, USER_SCRAM_CREDENTIAL_RECORD
There was a problem hiding this comment.
Firstly we have a RemoveFeatureLevelRecord.json but we removed it in #12207 and we use 0-0 to represent not supported:
7c6f19e to
9054a4a
Compare
| // limitations under the License. | ||
|
|
||
| { | ||
| "apiKey": 6, |
There was a problem hiding this comment.
Could we not delete this file in this PR? I think it'd be better we raise another JIRA or PR to delete it. I'm not 100% sure we will use it or not. Let's focus on missing record type in this PR. WDYT?
There was a problem hiding this comment.
Yeah, this makes sense, it's reasonable to keep it.
showuon
left a comment
There was a problem hiding this comment.
LGTM! Please revert the AccessControlRecord.json change. Thanks.
|
Thank you! Let's wait for the jenkins build. @jsancio , I'm going to backport this patch to 3.3 tomorrow if you have no objection. Thanks. |
|
Failed tests are un-related: |
AccessControlEntryRecord and RemoveAccessControlEntryRecord are added in KIP-801, FeatureLevelRecord was added in KIP-778, and BrokerRegistrationChangeRecord was added in KIP-841, and NoOpRecord was added in KIP-835, I added these 5 record types in MetadataShell. Reviewers: Luke Chen <showuon@gmail.com>
|
backport to 3.3 |
|
Sorry for the delay @dengziming, yes this is needed for 3.3. Thanks! |
This is a partial backport of [KAFKA-13270](https://issues.apache.org/jira/browse/KAFKA-13270) which sets the JUTE_MAXBUFFER configuration to 4MB unless otherwise specified.
This is a partial backport of [KAFKA-13270](https://issues.apache.org/jira/browse/KAFKA-13270) which sets the JUTE_MAXBUFFER configuration to 4MB unless otherwise specified.
More detailed description of your change
Currently, 8 record types are missing in MetadataShell:
Summary of testing strategy (including rationale)
Unit tests
Committer Checklist (excluded from commit message)