- 14 8月, 2020 1 次提交
-
-
由 xiaolong.ran 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
- 12 8月, 2020 4 次提交
-
-
由 Sijie Guo 提交于
* Fix allowTopicOperationAsync logic (#1355) *Modifications* - We should use the original role to verify if it is allowed for a given topic operation - use the original authentication data - Authz provider doesn't have to be aware of proxyRole - Fix authorization test * Refactor authorize logic to provide a uniform authorization behavior (cherry picked from commit 48f5a2f6)
-
由 Sanjeev Kulkarni 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 Jia Zhai 提交于
### Motivation User reports a valgrind error for `client::createReader` method: ``` ==23308== 284,826 (160 direct, 284,666 indirect) bytes in 1 blocks are definitely lost in loss record 113 of 113 ==23308== at 0x4C2A593: operator new(unsigned long) (vg_replace_malloc.c:344) ==23308== by 0x5303B4A: allocate (new_allocator.h:104) ==23308== by 0x5303B4A: allocate (alloc_traits.h:351) ==23308== by 0x5303B4A: __shared_count<pulsar::InternalState<pulsar::Result, pulsar::Reader>, std::allocator<pulsar::InternalState<pulsar::Result, pulsar::Reader> > > (shared_ptr_base.h:499) ==23308== by 0x5303B4A: __shared_ptr<std::allocator<pulsar::InternalState<pulsar::Result, pulsar::Reader> > > (shared_ptr_base.h:957) ==23308== by 0x5303B4A: shared_ptr<std::allocator<pulsar::InternalState<pulsar::Result, pulsar::Reader> > > (shared_ptr.h:316) ==23308== by 0x5303B4A: allocate_shared<pulsar::InternalState<pulsar::Result, pulsar::Reader>, std::allocator<pulsar::InternalState<pulsar::Result, pulsar::Reader> > > (shared_ptr.h:598) ==23308== by 0x5303B4A: make_shared<pulsar::InternalState<pulsar::Result, pulsar::Reader> > (shared_ptr.h:614) ==23308== by 0x5303B4A: Promise (Future.h:91) ==23308== by 0x5303B4A: pulsar::Client::createReader(std::string const&, pulsar::MessageId const&, pulsar::ReaderConfiguration const&, pulsar::Reader&) (Client.cc:142) ==23308== by 0x401DDB: main (pulsarReader.cpp:92) ==23308== ``` It seems the `ReaderImpl` has been tracked twice when call WaitForCallbackValue. this PR is to fix the issue. ### Modifications - fix WaitForCallbackValue which is changed in PR #3484. - add test for the reference issue. ### Verifying this change ut passed. valgrind found no issue: ``` ==14758== LEAK SUMMARY: ==14758== definitely lost: 0 bytes in 0 blocks ==14758== indirectly lost: 0 bytes in 0 blocks ==14758== possibly lost: 0 bytes in 0 blocks ==14758== still reachable: 12,621 bytes in 145 blocks ==14758== suppressed: 0 bytes in 0 blocks ==14758== ==14758== For lists of detected and suppressed errors, rerun with: -s ==14758== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` (cherry picked from commit 0e67fc59)
-
由 Sijie Guo 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
- 11 8月, 2020 1 次提交
-
- 10 8月, 2020 1 次提交
-
-
由 冉小龙 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org> ### Motivation The `issuer_url` in the current cpp example needs to be suffixed with `/oauth/token`, otherwise it cannot be recognized correctly and the following error will be returned: ``` OAuth2 auth data: 2020-08-10 15:21:06.117 ERROR [0x10ff855c0] AuthOauth2:243 | Response failed for issuerurl https://cloud.streamnative.dev/oauth2/token. response Code 404 passedin: { "grant_type": "client_credentials", "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "audience": "urn:sn:pulsar:pi-ns:pi-name" } libc++abi.dylib: terminating with uncaught exception of type char const* ``` ### Modifications Add a fixed suffix of `/oauth/token` to issuer_url ### Verifying this change Fix test cases as follows: - testOauth2CredentialFile - testOauth2WrongSecret - testOauth2 (cherry picked from commit c88ba50e)
-
- 06 8月, 2020 2 次提交
-
-
由 xiaolong.ran 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 冉小龙 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org> ### Modifications Run `mvn apache-rat:check` to verify the license headers in the `apache-pulsar-2.6.1-src.tar.gz` package, found that the `README.md` file in oauth2 lacks a license header Add license header for readme file of oauth2. (cherry picked from commit 3e9db09c)
-
- 05 8月, 2020 8 次提交
-
-
由 Matteo Merli 提交于
(cherry picked from commit dba0b65a)
-
由 冉小龙 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 sijia-w 提交于
* Update functions-worker.md * Update functions-worker.md * Update site2/docs/functions-worker.md Co-authored-by: NJennifer Huang <47805623+Jennifer88huang@users.noreply.github.com> (cherry picked from commit d3076f21)
-
由 wangjialing218 提交于
get advertised listener name from lookup options add test case Co-authored-by: Nwangjialing <wangjialing@cmss.chinamobile.com> (cherry picked from commit 109c8bfc)
-
由 Sergii Zhevzhyk 提交于
Fixes #7711 ### Motivation A client can have more permissions than its original role allows and it is a security violation. ### Modifications Use the original role (if available) instead of the proxy role to check if a client is allowed to consume or produce messages. (cherry picked from commit 5546c5fe)
-
- 04 8月, 2020 2 次提交
-
-
由 Fangbin Sun 提交于
### Motivation Some user may face the following `Temporary Redirect` issue when the request topic not owned by the current broker: ``` 19:21:48.215 [pulsar-web-42-5] ERROR org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [admin] Failed to get list of subscriptions for persistent://default_tenant/default_namespace/default_topic-partition-0 javax.ws.rs.WebApplicationException: HTTP 307 Temporary Redirect at org.apache.pulsar.broker.web.PulsarWebResource.validateTopicOwnership(PulsarWebResource.java:599) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.validateReadOperationOnTopic(PersistentTopicsBase.java:245) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalGetSubscriptionsForNonPartitionedTopic(PersistentTopicsBase.java:874) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalGetSubscriptions(PersistentTopicsBase.java:825) at org.apache.pulsar.broker.admin.v2.PersistentTopics.getSubscriptions(PersistentTopics.java:461) 09:41:45.485 [pulsar-web-42-7] WARN org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [admin] [persistent://public/default/test-partition-1] Failed to create subscription consumer-test at message id -1:-1:-1 javax.ws.rs.WebApplicationException: HTTP 307 Temporary Redirect at org.apache.pulsar.broker.web.PulsarWebResource.validateTopicOwnership(PulsarWebResource.java:599) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.validateAdminAccessForSubscriber(PersistentTopicsBase.java:283) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalCreateSubscriptionForNonPartitionedTopic(PersistentTopicsBase.java:1752) at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalCreateSubscription(PersistentTopicsBase.java:1673) at org.apache.pulsar.broker.admin.v2.PersistentTopics.createSubscription(PersistentTopics.java:816) ``` As discussed in https://github.com/apache/pulsar/issues/7189, it is better to use debug level when this happens. ### Modifications Change some `WebApplicationException` log level from error/warn to debug in `PersistentTopicsBase`. (cherry picked from commit 8061c547)
-
- 30 7月, 2020 3 次提交
-
-
由 Joshua Decosta 提交于
# Fixes #7693 Motivation When trying to chase down a bug in my custom AuthenticationProvider I found that when attempting to consume a topic that I wasn't authorized on would fail to produce an unauthorized response while using the pulsar-client. I noticed that the canConsumeAsync within AuthorizationService canLookUpAsync doesn't pass along the AuthenticationDataSource when it should. My code relied on that to be passed down each time and thus my methods would never return. # Modifications I've added the AuthenticationDataSource to the canConsumeAsync method. (cherry picked from commit c7dc7824)
-
由 Kristi 提交于
### Motivation I was doing the kubernetes getting started tutorial, and got stuck when trying to connect to the pulsar-mini-proxy service. I realized I needed to run `minikube service pulsar-mini-proxy -n pulsar` in order to expose the service ports outside of minikube. Environment: OSX Catalina 10.15.3 with minikube v1.12.1 using kubernetes 1.18.3 with docker driver ### Modifications documentation update for kubernetes getting started tutorial Co-authored-by: NHuanliMeng <48120384+Huanli-Meng@users.noreply.github.com> Co-authored-by: NKristi Tsukida <ktsukida@quantcast.com> Co-authored-by: NHuanliMeng <48120384+Huanli-Meng@users.noreply.github.com> (cherry picked from commit 3b41dced)
-
由 lipenghui 提交于
### Motivation Fix deduplication cursor does not delete after disabling message deduplication. The issue occurs when enabling the message deduplication at the broker.conf and then disable it and restart the broker. The dedup cursor will not be deleted. (cherry picked from commit 2bba620f)
-
- 29 7月, 2020 18 次提交
-
-
由 Matteo Merli 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 Jennifer Huang 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 Jennifer Huang 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 HuanliMeng 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 rushsky518 提交于
(cherry picked from commit f2532c85)
-
由 Yong Zhang 提交于
* [doc] Add pulsar-client-go oauth2 authentication document --- *Motivation* Add pulsar-client-go oauth2 authentication usage document. * Address comments (cherry picked from commit 24fa8cfc)
-
由 Jia Zhai 提交于
Signed-off-by: Nxiaolong.ran <rxl@apache.org>
-
由 Fangbin Sun 提交于
### Motivation Currently, CLI tools `pulsar-client` and `pulsar-perf` cann't specify required listener name when using `advertisedListeners`. ### Modifications Add option `--listener-name` for `pulsar-client` and `pulsar-perf`. (cherry picked from commit 4f5b39a1)
-
由 Yang Yang 提交于
### Motivation Add support of `tlsAllowInsecureConnection` config to the command-line tool `pulsar-perf`, to support `produce/consume/read` performance tests to clusters with insecure tls connections. ### Modifications Parse option `tlsAllowInsecureConnection` from program arguments or the config file when executing `produce/consume/read` performance tests. (cherry picked from commit 9b178c81)
-
由 lipenghui 提交于
### Motivation Fix batch index filter issue in Consumer. The previous logic is wrong at https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1344, this should be opposite. (cherry picked from commit e9a0fd1e)
-
由 Lagranmoon 提交于
(cherry picked from commit 19d17de2)
-
由 feynmanlin 提交于
### Motivation CompletableFuture<Messages<T>> from Consumer.batchReceiveAsync() not completed exceptionnally when closing Consumer. ### Modifications pendingBatchReceives was not cleaned up when the connection was closed, so I added pendingBatchReceives cleanup. (cherry picked from commit 48156ad9)
-
由 Fangbin Sun 提交于
### Modifications Correct `BrokerServiceUrlTls` when `tls` is not enabled. (cherry picked from commit fcb0dc04)
-
由 Matteo Merli 提交于
(cherry picked from commit 396ecebe)
-
由 Jia Zhai 提交于
### Motivation Add support to read credentials from file, make it align with java client. ### Modifications - Add support to read credentials from file, make it align with java client. - add a test for it. Co-authored-by: Nxiaolong.ran <rxl@apache.org> (cherry picked from commit 42d17c85)
-
由 feynmanlin 提交于
### Motivation Support configuring DeleteInactiveTopic setting in namespace policy ### Modifications Only the two parameters `brokerDeleteInactiveTopicsMode` and `brokerDeleteInactiveTopicsMaxInactiveDurationSeconds` support namespace policy. The parameters are changed to Map structure, the key is the namespace, and the value is the parameter value. Such as: namespace1=delete_when_no_subscriptions, namespace2=delete_when_no_subscriptions. In addition, there is a key name called `default`. If it is set, other namespaces that do not specify parameters will use this parameter. Such as: default=delete_when_no_subscriptions (cherry picked from commit 00e30895)
-