kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5693) TopicCreationPolicy and AlterConfigsPolicy overlap
Date Fri, 01 Dec 2017 10:36:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274225#comment-16274225
] 

ASF GitHub Bot commented on KAFKA-5693:
---------------------------------------

GitHub user tombentley opened a pull request:

    https://github.com/apache/kafka/pull/4281

    [WIP] KAFKA-5693 rationalise policy interfaces

    As described in KIP-201 (not yet accepted), this:
    
    * deprecates the CreateTopicPolicy and AlterConfigPolicy 
    * adds a new TopicManagementPolicy. 
    * adds validateOnly() option to AdminClient.deleteTopics() and AdminClient.deleteRecords()
    
    The existing policy tests are duplicated to test both old and new policy interfaces. A
new DeleteRecordsRequestTest (and *WithPolicy subclass) are added to further test delete records
with and without policy. A new DeleteTopicsRequestTestWithPolicy is added, subclassing the
existing (but updated) DeleteTopicsRequestTest.
    
    ### Committer Checklist (excluded from commit message)
    - [ ] Verify design and implementation 
    - [ ] Verify test coverage and CI build status
    - [ ] Verify documentation (including upgrade notes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tombentley/kafka KAFKA-5693-rationalise-policy-interfaces

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4281.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4281
    
----
commit e92fdb3e40529d275d431ba6bf1ce234da462223
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-04T10:36:12Z

    Add TopicManagementPolicy.java

commit a6c3f5e9697ed9dc29308b5126146f8a972fd0a9
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-04T15:32:48Z

    fixup

commit f18766de07f013332f9fb0778bb34bdf0ac66eaa
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-05T13:30:03Z

    Fixup TopicManagementPolicy

commit 186281d5345718ed9415543779b5fd6a28aba1a8
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-05T13:30:40Z

    Use TopicManagementPolicy in AdminManager, with back-compat with old policies. TESTS STILL
PASS

commit 23b5b3404c6fc7d90eac326cc78313499599c5ba
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-05T19:21:57Z

    Minor fix. Note the change in AdminManager was prompted by a test failure that looked
a lot like an assumed Map ordering problem

commit 728103664bf35d37b5ab57119fae128a4835a84d
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-05T19:22:34Z

    Deprecate tests for old policies and add equivalent tests for new policy

commit 6258b063e19809114df94bae30241796d35781b8
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-06T11:03:37Z

    Add validate_only to DeleteTopicsRequest and DeleteRecordsRequest

commit ae701f3a908b033943efedf53d8907a883ae570b
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-06T11:16:54Z

    Add TODO list

commit b4d933122bd1877184d2cd6340ddebd3fef1cd2f
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-06T14:48:15Z

    Add messages to responses

commit bedc161140b5e1578dfb3afe5265cdc1452152d2
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-09T08:22:27Z

    Implement support for validateOnly on the broker

commit 51e424bd9395d8b6ac1d5ca3ea5d8df32cab388f
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-09T11:16:41Z

    Policy checks for delete(topics|records) and move policy instantiation to KafkaServer

commit 5a025bd9b2a2559dd6f5b69b22ef1897a860f4d1
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-09T11:17:00Z

    fixup

commit 21f1709c9f83864d68d2f5b633c0c15a28d5bf55
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-09T11:22:14Z

    fix long lines

commit 51e9fcca3f097dab36fbfd0bf391276c104fbe03
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-09T15:37:25Z

    Add test for deleteTopics(validateOnly=true)

commit ed303a1827e20fc44356a4e662369db34db74b20
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T09:24:52Z

    Small fixup in DeleteRecordsResponse

commit efec8c875501eac54c2b05c532c87c5302daadfd
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T09:25:35Z

    Small fix in ClusterStateImpl

commit 1deba2cbd2383fe6acccdd2d8c45669b3e80bdc5
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T09:28:33Z

    Small fix in ClusterStateImpl

commit 33f1f82f53f52197968d424fd2f3984806379239
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T09:29:17Z

    Add DeleteRecordsRequestTest

commit 8fce29596fbc3472807a18f5145b674d9bd3fbcb
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T09:30:06Z

    Fix DeleteTopicsRequestTest for Errors -> ApiError and add a test with a policy.

commit feb6600f334da680584879c105677b7c89910172
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T16:45:39Z

    Version-aware responses

commit 5e7b8dd9430f5edcfeece509e16860c29ab13003
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T16:47:29Z

    Don't timeout a validateOnly DeleteTopicRequest

commit e3507e51514aef407763cd0e7415b8e19d9c7e82
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T16:49:43Z

    Handle errors pertaining to the topic specifically

commit 63ff19771bb4a0ecd0aabdd3277343925a3044f8
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-10T16:51:46Z

    Tests

commit 97550942e1582aa25e7b0bb3634aebe8655d9b78
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-11T10:48:58Z

    Add test with policy

commit 30f9246c9260993e21fa33426eeb83372cff37f9
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-10-13T09:41:57Z

    Wait for metadata in testNotLeader()

commit a3674281787702a05d625d481ffb0374405184e9
Author: Tom Bentley <tbentley@redhat.com>
Date:   2017-12-01T09:48:25Z

    fix

----


> TopicCreationPolicy and AlterConfigsPolicy overlap
> --------------------------------------------------
>
>                 Key: KAFKA-5693
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5693
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Tom Bentley
>            Priority: Minor
>              Labels: kip
>             Fix For: 1.1.0
>
>
> The administrator of a cluster can configure a {{CreateTopicPolicy}}, which has access
to the topic configs as well as other metadata to make its decision about whether a topic
creation is allowed. Thus in theory the decision could be based on a combination of of the
replication factor, and the topic configs, for example. 
> Separately there is an AlterConfigPolicy, which only has access to the configs (and can
apply to configurable entities other than just topics).
> There are potential issues with this. For example although the CreateTopicPolicy is checked
at creation time, it's not checked for any later alterations to the topic config. So policies
which depend on both the topic configs and other topic metadata could be worked around by
changing the configs after creation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message