[GitHub] [pulsar] michaeljmarshall commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
michaeljmarshall commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211577417 @jsteggink - any chance you're on an M1 Mac? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
michaeljmarshall commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211577186 The docker image does not yet support running on Arm. Arm support is being tracked here https://github.com/apache/pulsar/issues/12944. We will likely miss the 2.11.0 release since it is already in progress and we don't yet have a PR for the multi-arch build feature. However, I think there is a good chance it will make it into the 2.11.1 release (assuming I or someone else is able to complete that work). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on pull request #15640: [Autorecovery] Default reppDnsResolverClass to ZkBookieRackAffinityMapping
michaeljmarshall commented on PR #15640: URL: https://github.com/apache/pulsar/pull/15640#issuecomment-1211572486 @codelipenghui @eolivelli - I agree that this PR changes a default. However, I think the current default in the `bookkeeper.conf` should be considered a bug because it does not align with the broker default. I am fine with discussing this change on the mailing list, but I don't think that it should require a PIP. Further, I think that we should cherry pick it to all active branches of Pulsar in order to ensure that autorecovery correctly uses rack awareness. Let me know what you think, thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on issue #5881: Redelivery count implementation can bring down all the consumers
michaeljmarshall commented on issue #5881: URL: https://github.com/apache/pulsar/issues/5881#issuecomment-1211570827 > But doesn't DLQ suffer the same problem that I describe? A "bad" message will never go to the DLQ since it kills consumers before the redelivery count goes up. The DLQ implementation is only triggered after the client negatively acknowledges a message, the client calls `redeliverUnacknowledgedMessages`, or the ack timeout expires. Therefore, changing when the count is incremented does not solve this problem for the DLQ implementation. I would like to return to the original behavior for incrementing the DLQ counter (`redeliveryCount`). Here is a dev mailing list discussion https://lists.apache.org/thread/ts9d6zbtlz3y5xtv7p0c3dslk0vljpj2 and here is the PR to revert the behavior https://github.com/apache/pulsar/pull/17060. Please feel free to respond with comments. Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall opened a new pull request, #17060: [fix][broker] Revert 5895: fix redeliveryCount
michaeljmarshall opened a new pull request, #17060: URL: https://github.com/apache/pulsar/pull/17060 Reverts: #5881 ### Motivation The `redeliveryCount` was introduced in [PIP 22](https://github.com/apache/pulsar/wiki/PIP-22%3A-Pulsar-Dead-Letter-Topic). It is an extra field on a message that indicates how many times a message has been redelivered. In the original design, it was only incremented for shared subscriptions when the consumer sent `REDELIVER_UNACKNOWLEDGED_MESSAGES` to the broker. In #5881, this field's logic changed so that it is incremented each time a broker delivers a message to a consumer (after the initial delivery). The problem with this logic is that it counts messages that are sent to a consumer's `receiveQueue`, but not actually received by the client application, as "delivered" messages. This is especially problematic for the DLQ implementation because it relies on the counter to track deliveries, and this eager incrementing of the `redeliveryCount` could lead to fewer retries than an application would like. This PR returns the broker's behavior to the original state before #5881. Note that the DLQ logic is only triggered by messages that hit their ack timeout or are negatively acknowledged. This means that in some cases, a message could be delivered many times to a `receiveQueue` and once to the application and then sent to the DLQ. Given that our DLQ implementation has an intentional preference towards over delivery instead of under delivery, I think this logic should be fixed. One of the consequences of this PR is that the message filter logic for redelivering messages triggers this logic for incrementing `redeliveryCount`. See this code here: https://github.com/apache/pulsar/blob/b1a29b520d34d60e60160e3a7b9b0e26926063ee/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java#L198-L206 I'll need feedback from someone more familiar with message filtering to understand if this is a problematic change. If it is, I think we might need to revisit the logic in `filterEntriesForConsumer`. ### Modifications * Revert the relevant changes from #5895. I kept the test that was added in the PR and modified the assertion. * Fix test assertion ordering and modify expected value to align with new paradigm. ### Verifying this change This change includes modifications to tests as well as existing test coverage. ### Does this pull request potentially affect one of the following parts: This change is a break in current behavior, so I will send an email to the dev mailing list. ### Documentation - [x] `doc-not-needed` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] poorbarcode opened a new pull request, #17059: [test][broker]auto relealse connection when use proxy
poorbarcode opened a new pull request, #17059: URL: https://github.com/apache/pulsar/pull/17059 ### Modifications Append test case: When Proxy is deployed, the client automatically releases free connections. see: #16165 ### Documentation - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] gaoran10 commented on a diff in pull request #17016: [fix][broker] fix ack with txn compute ackedCount error
gaoran10 commented on code in PR #17016: URL: https://github.com/apache/pulsar/pull/17016#discussion_r943086415 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java: ## @@ -523,25 +523,31 @@ private CompletableFuture individualAckWithTransaction(CommandAck ack) { LongAdder totalAckCount = new LongAdder(); for (int i = 0; i < ack.getMessageIdsCount(); i++) { MessageIdData msgId = ack.getMessageIdAt(i); -PositionImpl position; +PositionImpl position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId()); +// acked count at least one long ackedCount = 0; -long batchSize = getBatchSize(msgId); +long batchSize = 0; Review Comment: The default value may be 1. ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java: ## @@ -523,25 +523,31 @@ private CompletableFuture individualAckWithTransaction(CommandAck ack) { LongAdder totalAckCount = new LongAdder(); for (int i = 0; i < ack.getMessageIdsCount(); i++) { MessageIdData msgId = ack.getMessageIdAt(i); -PositionImpl position; +PositionImpl position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId()); +// acked count at least one long ackedCount = 0; -long batchSize = getBatchSize(msgId); +long batchSize = 0; +if (msgId.hasBatchSize()) { +batchSize = msgId.getBatchSize(); +// ack batch messages set ackeCount = 1, if has ackSets will recompute Review Comment: ```suggestion // ack batch messages set ackeCount = batchSize, if has ackSets will recompute ``` ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java: ## @@ -523,25 +523,31 @@ private CompletableFuture individualAckWithTransaction(CommandAck ack) { LongAdder totalAckCount = new LongAdder(); for (int i = 0; i < ack.getMessageIdsCount(); i++) { MessageIdData msgId = ack.getMessageIdAt(i); -PositionImpl position; +PositionImpl position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId()); +// acked count at least one long ackedCount = 0; -long batchSize = getBatchSize(msgId); +long batchSize = 0; +if (msgId.hasBatchSize()) { +batchSize = msgId.getBatchSize(); +// ack batch messages set ackeCount = 1, if has ackSets will recompute +ackedCount = msgId.getBatchSize(); +positionsAcked.add(new MutablePair<>(position, msgId.getBatchSize())); +} else { +// ack no batch message set ackedCount = 1 +ackedCount = 1; +positionsAcked.add(new MutablePair<>(position, (int) batchSize)); +} Consumer ackOwnerConsumer = getAckOwnerConsumer(msgId.getLedgerId(), msgId.getEntryId()); if (msgId.getAckSetsCount() > 0) { long[] ackSets = new long[msgId.getAckSetsCount()]; for (int j = 0; j < msgId.getAckSetsCount(); j++) { ackSets[j] = msgId.getAckSetAt(j); } position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId(), ackSets); +// recompute ackedCount ackedCount = getAckedCountForTransactionAck(batchSize, ackSets); } else { position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId()); Review Comment: Maybe we can remove this line. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #17041: [monitoring][broker][metadata] add metadata store metrics
codelipenghui commented on PR #17041: URL: https://github.com/apache/pulsar/pull/17041#issuecomment-1211542023 @asafm Please help review this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17045: [fix][flaky-test]ManagedCursorMetricsTest.testCursorReadWriteMetrics
codelipenghui commented on code in PR #17045: URL: https://github.com/apache/pulsar/pull/17045#discussion_r943084314 ## pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ManagedCursorMetricsTest.java: ## @@ -197,9 +198,19 @@ public void testManagedCursorMetrics() throws Exception { admin.topics().delete(topicName, true); } -@Test +private ManagedCursorMXBean getManagedCursorMXBean(String topicName, String subscriptionName) +throws ExecutionException, InterruptedException { +final PersistentSubscription persistentSubscription = +(PersistentSubscription) pulsar.getBrokerService() +.getTopic(topicName, false).get().get().getSubscription(subscriptionName); +final ManagedCursorImpl managedCursor = (ManagedCursorImpl) persistentSubscription.getCursor(); +return managedCursor.getStats(); +} + +@Test(timeOut = 2 * 1000) Review Comment: We can just use the default timeout? Or any reason to set it to 2 seconds for this test? It might become flaky in the CI environment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [clean][broker] remove unused code(#17036)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 0cf2a7534cb [clean][broker] remove unused code(#17036) 0cf2a7534cb is described below commit 0cf2a7534cbcdffe7574af1ee3717fa3f7ed8ba4 Author: LinChen <1572139...@qq.com> AuthorDate: Thu Aug 11 12:12:56 2022 +0800 [clean][broker] remove unused code(#17036) --- pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java index 6e9a9442a6c..6d0e2a42f66 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java @@ -347,8 +347,6 @@ public class PulsarService implements AutoCloseable, ShutdownService { this.brokerClientSharedTimer = new HashedWheelTimer(new DefaultThreadFactory("broker-client-shared-timer"), 1, TimeUnit.MILLISECONDS); -int interval = config.getManagedLedgerStatsPeriodSeconds(); -boolean exposeTopicMetrics = config.isExposeTopicLevelMetricsInPrometheus(); // here in the constructor we don't have the offloader scheduler yet this.offloaderStats = LedgerOffloaderStats.create(false, false, null, 0); }
[GitHub] [pulsar] codelipenghui merged pull request #17036: [clean][broker] remove unused code
codelipenghui merged PR #17036: URL: https://github.com/apache/pulsar/pull/17036 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated (96d4bbb1e15 -> 2bc933ee714)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git from 96d4bbb1e15 [docs] Clarify security vulnerability process and reporting (#17039) add 2bc933ee714 [fix][broker] Increment topic stats outbound message counters after messages have been written to the TCP/IP connection (#17043) No new revisions were added by this update. Summary of changes: .../org/apache/pulsar/broker/service/Consumer.java | 21 + 1 file changed, 13 insertions(+), 8 deletions(-)
[GitHub] [pulsar] codelipenghui merged pull request #17043: [fix][broker] Increment topic stats outbound message counters and update rate after messages have been written to the TCP/IP connection
codelipenghui merged PR #17043: URL: https://github.com/apache/pulsar/pull/17043 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [docs] Clarify security vulnerability process and reporting (#17039)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 96d4bbb1e15 [docs] Clarify security vulnerability process and reporting (#17039) 96d4bbb1e15 is described below commit 96d4bbb1e15f8a04f30a3036565ab26d923e8746 Author: Lari Hotari AuthorDate: Thu Aug 11 07:11:09 2022 +0300 [docs] Clarify security vulnerability process and reporting (#17039) --- README.md| 2 ++ SECURITY.md | 12 +++- site2/docs/security-policy-and-supported-versions.md | 11 --- .../version-2.10.0/security-policy-and-supported-versions.md | 10 ++ .../version-2.10.1/security-policy-and-supported-versions.md | 10 ++ 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 274c4c552e7..80208a18d9b 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,8 @@ You can self-register at https://apache-pulsar.herokuapp.com/ To report a vulnerability for Pulsar, contact the [Apache Security Team](https://www.apache.org/security/). When reporting a vulnerability to [secur...@apache.org](mailto:secur...@apache.org), you can copy your email to [priv...@pulsar.apache.org](mailto:priv...@pulsar.apache.org) to send your report to the Apache Pulsar Project Management Committee. This is a private mailing list. +https://github.com/apache/pulsar/security/policy contains more details. + ## License Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 diff --git a/SECURITY.md b/SECURITY.md index 7bd3ead079f..ce95a05da90 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,13 @@ # Security Policy -The security policy and supported versions are outlined on the Pulsar website here: https://pulsar.apache.org/docs/security-policy-and-supported-versions/. +## Security Vulnerability Process + +The Pulsar community follows the ASF [security vulnerability handling process](https://apache.org/security/#vulnerability-handling). + +To report a new vulnerability you have discovered, please follow the [ASF security vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability). To report a vulnerability for Pulsar, contact the [Apache Security Team](https://www.apache.org/security/). When reporting a vulnerability to [secur...@apache.org](mailto:secur...@apache.org), you can copy your email to [priv...@pulsar.apache.org](mailto:priv...@pulsar.apache.org) to send your report to the Apache Pul [...] + +It is the responsibility of the security vulnerability handling project team (Apache Pulsar PMC in most cases) to make public security vulnerability announcements. You can follow announcements on the [us...@pulsar.apache.org](mailto:us...@pulsar.apache.org) mailing list. For instructions on how to subscribe, please see https://pulsar.apache.org/contact/. + +## Security Policy details and supported versions of Apache Pulsar + +The security policy and supported versions are outlined on the Pulsar website under [Security > Security Policy and Supported Versions](https://pulsar.apache.org/docs/security-policy-and-supported-versions/). diff --git a/site2/docs/security-policy-and-supported-versions.md b/site2/docs/security-policy-and-supported-versions.md index ac907e12c70..2a40c27fd48 100644 --- a/site2/docs/security-policy-and-supported-versions.md +++ b/site2/docs/security-policy-and-supported-versions.md @@ -9,16 +9,13 @@ sidebar_label: "Security Policy and Supported Versions" You can find documentation on Pulsar's available security features and how to use them here: https://pulsar.apache.org/docs/en/security-overview/. -## Security Vulnerability Announcements +## Security Vulnerability Process -The Pulsar community will announce security vulnerabilities and how to mitigate them on the [us...@pulsar.apache.org](mailto:us...@pulsar.apache.org). -For instructions on how to subscribe, please see https://pulsar.apache.org/contact/. +The Pulsar community follows the ASF [security vulnerability handling process](https://apache.org/security/#vulnerability-handling). -## Reporting Vulnerabilities +To report a new vulnerability you have discovered, please follow the [ASF security vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability). To report a vulnerability for Pulsar, contact the [Apache Security Team](https://www.apache.org/security/). When reporting a vulnerability to [secur...@apache.org](mailto:secur...@apache.org), you can copy your email to [priv...@pulsar.apache.org](mailto:priv...@pulsar.apache.org) to send your report to the Apache Pul [...] -The Pulsar community follows the ASF [vulnerability handling
[GitHub] [pulsar] codelipenghui merged pull request #17039: [docs] Clarify security vulnerability process and reporting
codelipenghui merged PR #17039: URL: https://github.com/apache/pulsar/pull/17039 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #17056: Fix offload read handle npe.
codelipenghui commented on PR #17056: URL: https://github.com/apache/pulsar/pull/17056#issuecomment-1211531736 And can we add a test to make sure the reader handle will not invalidate if we the slowest read position haven't go through it yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17056: Fix offload read handle npe.
codelipenghui commented on code in PR #17056: URL: https://github.com/apache/pulsar/pull/17056#discussion_r943080290 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java: ## @@ -2326,14 +2328,27 @@ public void checkInactiveSubscriptions() { @Override public void checkBackloggedCursors() { // activate caught up cursors which include consumers +AtomicReference slowestNonDurableReadPosition = new AtomicReference<>(); subscriptions.forEach((subName, subscription) -> { +ManagedCursor cursor = subscription.getCursor(); +if (cursor instanceof NonDurableCursorImpl) { +PositionImpl readPosition = (PositionImpl) cursor.getReadPosition(); +if (slowestNonDurableReadPosition.get() == null || readPosition.compareTo( +slowestNonDurableReadPosition.get()) < 0) { +slowestNonDurableReadPosition.set(readPosition); +} +} if (!subscription.getConsumers().isEmpty() && subscription.getCursor().getNumberOfEntries() < backloggedCursorThresholdEntries) { subscription.getCursor().setActive(); } else { subscription.getCursor().setInactive(); } }); +if (slowestNonDurableReadPosition.get() != null) { +ManagedLedger managedLedger = getManagedLedger(); Review Comment: +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17056: Fix offload read handle npe.
codelipenghui commented on code in PR #17056: URL: https://github.com/apache/pulsar/pull/17056#discussion_r943080145 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java: ## @@ -791,7 +791,8 @@ public synchronized void readEntriesFailed(ManagedLedgerException exception, Obj // Notify the consumer only if all the messages were already acknowledged consumerList.forEach(Consumer::reachedEndOfTopic); } -} else if (exception.getCause() instanceof TransactionBufferException.TransactionNotSealedException) { +} else if (exception.getCause() instanceof TransactionBufferException.TransactionNotSealedException +|| exception.getCause() instanceof ManagedLedgerException.OffloadReadHandleClosedException) { Review Comment: Looks like we don't want to handle the race condition of trimming ledgers and reading data, instead, to re-trigger the read operation? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on pull request #15406: [Java Client] Fix flaky BatchMessageTest by initializing lastBatchSendNanoTime
michaeljmarshall commented on PR #15406: URL: https://github.com/apache/pulsar/pull/15406#issuecomment-1211529705 @BewareMyPower - this is a really late review. Thank you for fixing my flaky test. I'd like to propose a slightly different implementation. Please take a look at https://github.com/apache/pulsar/pull/17058, if you're able. Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall opened a new pull request, #17058: [imp][java client] lastBatchSendNanoTime initialization
michaeljmarshall opened a new pull request, #17058: URL: https://github.com/apache/pulsar/pull/17058 ### Motivation https://github.com/apache/pulsar/pull/14185 had a minor bug in that the first message sent to the producer would always deliver because `lastBatchSendNanoTime` was not initialized correctly. In https://github.com/apache/pulsar/pull/15406, we improved the initialization, but I am concerned that it didn't completely solve the problem because the counter is initialized before grabbing the connection, which will often take longer than the `batchingMaxPublishDelayMicros`, which defaults to 1 millisecond. This PR aims to solve the underlying problem by only initializing the timer once the producer is connected to the topic. Note that this change aligns with the original behavior, which started the scheduled task once the producer connected to the topic. If possible, I hope to get this merged and cherry-picked to branch-2.11 as soon as possible. ### Modifications * Update the `batchFlushTask()` method to handle the initialization case for `lastBatchSendNanoTime`. * Remove the initialization for `lastBatchSendNanoTime` in the constructor. ### Verifying this change This test is fairly trivial to verify, but is hard to test for. I manually verified using debug logs to see that the time is correctly initialized on the first run and not afterwards. ### Documentation - [x] `doc-not-needed` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] coderzc commented on a diff in pull request #16832: [feature][broker] Support cgroup v2 by using `jdk.internal.platform.Metrics` in Pulsar Loadbalancer
coderzc commented on code in PR #16832: URL: https://github.com/apache/pulsar/pull/16832#discussion_r943076687 ## pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java: ## @@ -97,4 +101,31 @@ public void testNoNICSpeed() throws Exception { } +@Test +public void testCGroupMetrics() throws IllegalAccessException { +if (!LinuxInfoUtils.isLinux()) { +return; +} + +boolean existsCGroup = Files.exists(Paths.get("/sys/fs/cgroup")); +boolean cGroupEnabled = LinuxInfoUtils.isCGroupEnabled(); +Assert.assertEquals(cGroupEnabled, existsCGroup); + +double totalCpuLimit = LinuxInfoUtils.getTotalCpuLimit(cGroupEnabled); +log.info("totalCpuLimit: {}", totalCpuLimit); +Assert.assertTrue(totalCpuLimit > 0.0); + +if (cGroupEnabled) { + Assert.assertNotNull(FieldUtils.readStaticField(LinuxInfoUtils.class, "metrics", true)); Review Comment: Why not use reflection to get it? This is just a test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] tisonkun commented on pull request #17022: [improve][test] force initialize field to avoid polluted by mocks
tisonkun commented on PR #17022: URL: https://github.com/apache/pulsar/pull/17022#issuecomment-1211524953 ping @Shoothzj @lhotari -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on issue #17047: [Bug] Maven deployment failed on project pulsar-presto-connector-original
BewareMyPower commented on issue #17047: URL: https://github.com/apache/pulsar/issues/17047#issuecomment-1211520361 I removed the whole project and it still failed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] equanz commented on pull request #17048: [branch-2.9] Rename test file name from `*Test2.java` to `*Test.java` to run all tests correctly
equanz commented on PR #17048: URL: https://github.com/apache/pulsar/pull/17048#issuecomment-1211520156 /pulsarbot run-failure-checks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] RobertIndie commented on a diff in pull request #17004: [fix][doc] Fix wrong description of `pulsar.allocator.leak_detection` and remove 'Client memory allocator configuration' secti
RobertIndie commented on code in PR #17004: URL: https://github.com/apache/pulsar/pull/17004#discussion_r943071198 ## site2/docs/client-libraries-java.md: ## @@ -168,7 +168,7 @@ You can set the client memory allocator configurations through Java properties.< |---|---|---|---|--- `pulsar.allocator.pooled` | String | If set to `true`, the client uses a direct memory pool. If set to `false`, the client uses a heap memory without pool | true | true false `pulsar.allocator.exit_on_oom` | String | Whether to exit the JVM when OOM happens | false | true false -`pulsar.allocator.leak_detection` | String | Service URL provider for Pulsar service | Disabled | Disabled Simple Advanced Paranoid +`pulsar.allocator.leak_detection` | String | The leak detection policy for Pulsar bytebuf allocator. **Disabled**: No leak detection and no overhead. **Simple**: Instruments 1% of the allocated buffer to track for leaks. **Advanced**: Instruments 1% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer is used. **Paranoid**: Instruments 100% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer is used and introduces a significant overhead. | Disabled | Disabled Simple Advanced Paranoid Review Comment: Done. PTAL again. Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] hangc0276 commented on a diff in pull request #17056: Fix offload read handle npe.
hangc0276 commented on code in PR #17056: URL: https://github.com/apache/pulsar/pull/17056#discussion_r943068668 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java: ## @@ -2326,14 +2328,27 @@ public void checkInactiveSubscriptions() { @Override public void checkBackloggedCursors() { // activate caught up cursors which include consumers +AtomicReference slowestNonDurableReadPosition = new AtomicReference<>(); subscriptions.forEach((subName, subscription) -> { +ManagedCursor cursor = subscription.getCursor(); +if (cursor instanceof NonDurableCursorImpl) { +PositionImpl readPosition = (PositionImpl) cursor.getReadPosition(); +if (slowestNonDurableReadPosition.get() == null || readPosition.compareTo( +slowestNonDurableReadPosition.get()) < 0) { +slowestNonDurableReadPosition.set(readPosition); +} +} if (!subscription.getConsumers().isEmpty() && subscription.getCursor().getNumberOfEntries() < backloggedCursorThresholdEntries) { subscription.getCursor().setActive(); } else { subscription.getCursor().setInactive(); } }); +if (slowestNonDurableReadPosition.get() != null) { +ManagedLedger managedLedger = getManagedLedger(); Review Comment: You can directly use `ledger.updateTheSlowestNonDurableReadPosition` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] JavaXiaoJun opened a new pull request, #17057: [fix][doc]Fix fileSystemProfilePath wrong default value
JavaXiaoJun opened a new pull request, #17057: URL: https://github.com/apache/pulsar/pull/17057 ### Motivation The configuration item `fileSystemProfilePath` in` broker.conf `has the wrong default value: For File System Storage, `fileSystemProfilePath` is the file system profile path; when we use a relative path, the current dir is the pulsar root dir, not `conf/ `dir,so the correct relative path is `conf/filesystem_offload_core_site.xml` not `../conf/filesystem_offload_core_site.xml`. In addition, this configuration item in our docs also uses the wrong default values. https://pulsar.apache.org/docs/next/tiered-storage-filesystem#configure-filesystem-offloader-driver https://pulsar.apache.org/docs/next/tiered-storage-filesystem#step-3-configure-the-filesystem-offloader https://pulsar.apache.org/docs/next/tiered-storage-filesystem#step-3-configure-the-filesystem-offloader-driver ### Modifications Fix the wrong default va in `broker.conf` & docs link. ### Documentation Check the box below or label this PR directly. Need to update docs? - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [ ] `doc-not-needed` (Please explain why) - [x] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #16832: [feature][broker] Support cgroup v2 by using `jdk.internal.platform.Metrics` in Pulsar Loadbalancer
nodece commented on code in PR #16832: URL: https://github.com/apache/pulsar/pull/16832#discussion_r943064682 ## pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java: ## @@ -97,4 +101,31 @@ public void testNoNICSpeed() throws Exception { } +@Test +public void testCGroupMetrics() throws IllegalAccessException { +if (!LinuxInfoUtils.isLinux()) { +return; +} + +boolean existsCGroup = Files.exists(Paths.get("/sys/fs/cgroup")); +boolean cGroupEnabled = LinuxInfoUtils.isCGroupEnabled(); +Assert.assertEquals(cGroupEnabled, existsCGroup); + +double totalCpuLimit = LinuxInfoUtils.getTotalCpuLimit(cGroupEnabled); +log.info("totalCpuLimit: {}", totalCpuLimit); +Assert.assertTrue(totalCpuLimit > 0.0); + +if (cGroupEnabled) { + Assert.assertNotNull(FieldUtils.readStaticField(LinuxInfoUtils.class, "metrics", true)); Review Comment: I think you can add a getter method with `@VisibleForTesting` for these fields to avoid reflect. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] horizonzy opened a new pull request, #17056: Fix offload read handle npe.
horizonzy opened a new pull request, #17056: URL: https://github.com/apache/pulsar/pull/17056 ### Motivation Now, when we get ReadHanle and then use it to read data (Non-durable cursor read). Maybe the ReadHandle we get already is invalidated. There is a race condition, maybe after we get the ReadHandle, before use it to read. The method `ManagedLedgerImpl#internalTrimLedgers` invalidate this ReadHandle (Cause in this method, it just calculate by durable-cursor, but there maybe a non-durable cursor read data) so we use the invalidated offload read handle to read data, casue NPE. https://github.com/apache/pulsar/blob/96930fda8a7776aaf6e61235a1d77ffe6e564052/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L2542 ``` 07:11:40.056 [offloader-OrderedScheduler-1-0] WARN org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [admin][persistent://cme_dev/market_data_mbo_v1/345_0-partition-0] Failed to reset cursor on subscription security_data_normalizer_subscriber_v1_dlabak_m01 to position 10218543:44528:0 org.apache.pulsar.broker.service.BrokerServiceException$SubscriptionBusyException: Failed to fence subscription at org.apache.pulsar.broker.service.persistent.PersistentSubscription.resetCursor(PersistentSubscription.java:630) ~[io.streamnative-pulsar-broker-2.9.2.23.jar:2.9.2.23] at org.apache.pulsar.broker.service.persistent.PersistentSubscription.resetCursor(PersistentSubscription.java:624) ~[io.streamnative-pulsar-broker-2.9.2.23.jar:2.9.2.23] at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalResetCursorOnPosition$120(PersistentTopicsBase.java:2234) ~[io.streamnative-pulsar-broker-2.9.2.23.jar:2.9.2.23] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?] at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase$2.readEntryFailed(PersistentTopicsBase.java:2277) ~[io.streamnative-pulsar-broker-2.9.2.23.jar:2.9.2.23] at org.apache.bookkeeper.mledger.impl.EntryCacheImpl.lambda$asyncReadEntry0$1(EntryCacheImpl.java:233) ~[io.streamnative-managed-ledger-2.9.2.23.jar:2.9.2.23] at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986) ~[?:?] at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?] at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?] at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreBackedReadHandleImpl.lambda$readAsync$1(BlobStoreBackedReadHandleImpl.java:176) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) [com.google.guava-guava-30.1-jre.jar:?] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69) [com.google.guava-guava-30.1-jre.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) [com.google.guava-guava-30.1-jre.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.77.Final.jar:4.1.77.Final] at java.lang.Thread.run(Thread.java:829) [?:?] ``` ### Modifications 1.Fix the NPE. 2.Check the invalidate ledgerId is less than the slowest non-durable, reduce the npe probability. ### Documentation Check the box below or label this PR directly. Need to update docs? - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [ ] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To
[pulsar] branch master updated: [cleanup][pulsar-functions] Remove compiler warnings for return from finally (#16451)
This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 62e2a9abd02 [cleanup][pulsar-functions] Remove compiler warnings for return from finally (#16451) 62e2a9abd02 is described below commit 62e2a9abd02e99a81e6d4811046f4799f027ce7a Author: Elliot West AuthorDate: Thu Aug 11 04:08:08 2022 +0100 [cleanup][pulsar-functions] Remove compiler warnings for return from finally (#16451) ### Motivation To reduce warnings generated during compilation by cleaning up the code. ``` [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[334,9] finally clause cannot complete normally [WARNING] /Users/ewest/git/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java:[642,9] finally clause cannot complete normally ``` ### Modifications * Moved `return` from `finally` blocks * Simplified code through the use of simpler, equivalent language constructs * Made some constant fields `final` Co-authored-by: Matteo Merli --- .../pulsar/functions/worker/SchedulerManager.java | 114 - 1 file changed, 43 insertions(+), 71 deletions(-) diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java index 79712398bef..af633ca2e9b 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java @@ -19,6 +19,7 @@ package org.apache.pulsar.functions.worker; import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.concurrent.TimeUnit.NANOSECONDS; import static org.apache.pulsar.common.util.Runnables.catchingAndLoggingThrowables; import com.fasterxml.jackson.core.JsonProcessingException; import com.google.common.annotations.VisibleForTesting; @@ -31,6 +32,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; @@ -61,6 +63,7 @@ import org.apache.pulsar.client.api.MessageId; import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.PulsarClient; import org.apache.pulsar.client.api.PulsarClientException; +import org.apache.pulsar.common.functions.WorkerInfo; import org.apache.pulsar.common.util.ObjectMapperFactory; import org.apache.pulsar.common.util.Reflections; import org.apache.pulsar.functions.proto.Function; @@ -71,7 +74,6 @@ import org.apache.pulsar.functions.proto.Function.Instance; import org.apache.pulsar.functions.utils.FunctionCommon; import org.apache.pulsar.functions.worker.scheduler.IScheduler; -@Slf4j /** * The scheduler manager is used to compute scheduling of function instances * Only the leader computes new schedulings and writes assignments to the assignment topic @@ -80,6 +82,7 @@ import org.apache.pulsar.functions.worker.scheduler.IScheduler; * 2. When worker loses leadership, this class will be closed which * also closes the worker's producer to the assignments topic */ +@Slf4j public class SchedulerManager implements AutoCloseable { private final WorkerConfig workerConfig; @@ -109,7 +112,7 @@ public class SchedulerManager implements AutoCloseable { private final PulsarAdmin admin; @Getter -private Lock schedulerLock = new ReentrantLock(true); +private final Lock schedulerLock = new ReentrantLock(true); private volatile boolean isRunning = false; @@ -123,11 +126,9 @@ public class SchedulerManager implements AutoCloseable { private MessageId metadataTopicLastMessage = MessageId.earliest; -private AtomicBoolean rebalanceInProgress = new AtomicBoolean(false); -private Future currentRebalanceFuture; +private final AtomicBoolean rebalanceInProgress = new AtomicBoolean(false); -private AtomicBoolean drainInProgressFlag = new AtomicBoolean(false); -private Future currentDrainFuture; +private final AtomicBoolean drainInProgressFlag = new AtomicBoolean(false); // The list of assignments moved due to the last drain op on a leader. Used in UTs, and debugging. private List assignmentsMovedInLastDrain; @@ -136,13 +137,13 @@ public class SchedulerManager implements AutoCloseable { DrainNotInProgress, DrainInProgress, DrainCompleted -}; +} // A map to hold the status of recent drain operations. // It is of the form
[GitHub] [pulsar] zymap merged pull request #16451: [cleanup][pulsar-functions] Remove compiler warnings for return from finally
zymap merged PR #16451: URL: https://github.com/apache/pulsar/pull/16451 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [improve][functions][admin] Improve the package download process (#16365)
This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 1fe8c06ce37 [improve][functions][admin] Improve the package download process (#16365) 1fe8c06ce37 is described below commit 1fe8c06ce37092e37de3562651c56d3d6bb1b91a Author: Yong Zhang AuthorDate: Thu Aug 11 11:05:44 2022 +0800 [improve][functions][admin] Improve the package download process (#16365) * Improve the package download process --- *Motivation* Improve the package download process to handle the download body more efficient. --- .../broker/admin/v3/PackagesApiNotEnabledTest.java | 17 +++- .../pulsar/broker/admin/v3/PackagesApiTest.java| 18 +++- .../pulsar/client/admin/internal/PackagesImpl.java | 98 -- 3 files changed, 105 insertions(+), 28 deletions(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiNotEnabledTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiNotEnabledTest.java index 3fd39d30d2d..2c39fbbaf8d 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiNotEnabledTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiNotEnabledTest.java @@ -20,6 +20,10 @@ package org.apache.pulsar.broker.admin.v3; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Comparator; import org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest; import org.apache.pulsar.client.admin.PulsarAdminException; import org.apache.pulsar.packages.management.core.common.PackageMetadata; @@ -45,14 +49,23 @@ public class PackagesApiNotEnabledTest extends MockedPulsarServiceBaseTest { } @Test(timeOut = 6) -public void testPackagesOperationsWithoutPackagesServiceEnabled() { +public void testPackagesOperationsWithoutPackagesServiceEnabled() throws Exception { // download package api should return 503 Service Unavailable exception String unknownPackageName = "function://public/default/unknown@v1"; +Path tmp = Files.createTempDirectory("package-test-tmp"); try { -admin.packages().download(unknownPackageName, "/test/unknown"); +admin.packages().download(unknownPackageName, tmp.toAbsolutePath().toString() + "/unknown"); fail("should throw 503 error"); } catch (PulsarAdminException e) { assertEquals(503, e.getStatusCode()); +} finally { +Files.walk(tmp).sorted(Comparator.reverseOrder()).forEach(p -> { +try { +Files.delete(p); +} catch (IOException e) { +throw new RuntimeException(e); +} +}); } // get metadata api should return 503 Service Unavailable exception diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiTest.java index 69331c02c7d..dd082681b23 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/v3/PackagesApiTest.java @@ -32,7 +32,11 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.Collections; +import java.util.Comparator; import java.util.List; @Test(groups = "broker-admin") @@ -101,14 +105,24 @@ public class PackagesApiTest extends MockedPulsarServiceBaseTest { } @Test(timeOut = 6) -public void testPackagesOperationsFailed() { +public void testPackagesOperationsFailed() throws IOException { // download a non-existent package should return not found exception String unknownPackageName = "function://public/default/unknown@v1"; + +Path tmp = Files.createTempDirectory("package-test-tmp"); try { -admin.packages().download(unknownPackageName, "/test/unknown"); +admin.packages().download(unknownPackageName, tmp.toAbsolutePath() + "/unknown"); fail("should throw 404 error"); } catch (PulsarAdminException e) { assertEquals(404, e.getStatusCode()); +} finally { +Files.walk(tmp).sorted(Comparator.reverseOrder()).forEach(p -> { +try { +Files.delete(p); +} catch (IOException e) { +throw new RuntimeException(e); +} +}); } // get
[GitHub] [pulsar] codelipenghui closed pull request #17055: Fix the add to project CI can't work with classic project
codelipenghui closed pull request #17055: Fix the add to project CI can't work with classic project URL: https://github.com/apache/pulsar/pull/17055 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] zymap merged pull request #16365: Improve the package download process
zymap merged PR #16365: URL: https://github.com/apache/pulsar/pull/16365 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #17055: Fix the add to project CI can't work with classic project
github-actions[bot] commented on PR #17055: URL: https://github.com/apache/pulsar/pull/17055#issuecomment-1211506922 @codelipenghui Please provide a correct documentation label for your PR. Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [improve][ci] Skip other tests when there are only cpp/python related changes (#16988)
This is an automated email from the ASF dual-hosted git repository. xyz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 5cdb5911e3c [improve][ci] Skip other tests when there are only cpp/python related changes (#16988) 5cdb5911e3c is described below commit 5cdb5911e3c702313e53fce9c4e8cf9a148ff795 Author: Zike Yang AuthorDate: Thu Aug 11 11:02:37 2022 +0800 [improve][ci] Skip other tests when there are only cpp/python related changes (#16988) --- .github/changes-filter.yaml | 2 + .github/workflows/ci-go-functions-style.yaml | 12 ++-- .github/workflows/ci-go-functions-test.yaml | 8 ++- .github/workflows/pulsar-ci.yaml | 85 ++-- 4 files changed, 58 insertions(+), 49 deletions(-) diff --git a/.github/changes-filter.yaml b/.github/changes-filter.yaml index 0f01fb2caad..b14153acb82 100644 --- a/.github/changes-filter.yaml +++ b/.github/changes-filter.yaml @@ -10,3 +10,5 @@ docs: - '**/*.md' tests: - added|modified: '**/src/test/java/**/*.java' +cpp: + - 'pulsar-client-cpp/**' diff --git a/.github/workflows/ci-go-functions-style.yaml b/.github/workflows/ci-go-functions-style.yaml index 04b048467bb..d9ee7b15637 100644 --- a/.github/workflows/ci-go-functions-style.yaml +++ b/.github/workflows/ci-go-functions-style.yaml @@ -64,31 +64,33 @@ jobs: - name: Check changed files id: check_changes -run: echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}" +run: | + echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}" + echo "::set-output name=cpp_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.cpp_count) && fromJSON(steps.changes.outputs.cpp_count) > 0 }}" - name: Set up Go uses: actions/setup-go@v2 -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} with: go-version: ${{ matrix.go-version }} id: go - name: InstallTool -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} run: | cd pulsar-function-go wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.18.0 ./bin/golangci-lint --version - name: Build -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} run: | cd pulsar-function-go export GO111MODULE=on go build ./... - name: CheckStyle -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} run: | cd pulsar-function-go export GO111MODULE=on diff --git a/.github/workflows/ci-go-functions-test.yaml b/.github/workflows/ci-go-functions-test.yaml index 5ff251654da..0efc4d2ca2c 100644 --- a/.github/workflows/ci-go-functions-test.yaml +++ b/.github/workflows/ci-go-functions-test.yaml @@ -66,17 +66,19 @@ jobs: - name: Check changed files id: check_changes -run: echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}" +run: | + echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}" + echo "::set-output name=cpp_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.cpp_count) && fromJSON(steps.changes.outputs.cpp_count) > 0 }}" - name: Set up Go uses: actions/setup-go@v2 -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} with: go-version: ${{ matrix.go-version }} id: go - name: Run tests -if: ${{ steps.check_changes.outputs.docs_only != 'true' }} +if: ${{ steps.check_changes.outputs.docs_only != 'true' && steps.check_changes.outputs.cpp_only != 'true' }} run: | cd
[GitHub] [pulsar] BewareMyPower merged pull request #16988: [improve][ci] Skip unnecessary tests when there are only cpp/python related changes
BewareMyPower merged PR #16988: URL: https://github.com/apache/pulsar/pull/16988 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #17017: [improve][broker] Add close function worker
nodece commented on code in PR #17017: URL: https://github.com/apache/pulsar/pull/17017#discussion_r943056423 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java: ## @@ -411,6 +411,8 @@ public CompletableFuture closeAsync() { LOG.info("Closing PulsarService"); state = State.Closing; +functionWorkerService.ifPresent(WorkerService::stop); Review Comment: @RobertIndie > What do you mean by cli code? PulsarBrokerStarter belongs to cli code, it is called by using the `pulsar broker` command. > I see that the functionWorkerService is passed to the PulsarService by here: We support passing the functionWorkerService to PulsarService, but the function worker should be closed by PulsarService, not PulsarBrokerStarter, which is a component of PulsarService. Suppose we don't close the functionWorkerService when running the close method of PulsarService. In that case, the functionWorkerService will break the PulsarService running, because the functionWorkerService cannot request the broker service, then call the PulsarService shutdown method. So when close and shutdown methods run together, the shutdown method will break the close method, because the shutdown closes the metadata service session. It's consistent with what I described above. See the following links: - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1812 - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1703-L1707 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] 02/02: [improve][broker]Remove unnecessary lock on the stats thread (#16983)
This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch branch-2.8 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit c1e176e7db6fbda83970b3cde3b104b37c8f14c3 Author: Yong Zhang AuthorDate: Tue Aug 9 10:57:20 2022 +0800 [improve][broker]Remove unnecessary lock on the stats thread (#16983) --- *Motivation* We found there has a block between the pulsar-ordered executor and the pulsar-stats-updater executor. The pulsar-ordered executor is trying to createManagedLedgerOffloader, and the pulsar-stats-updater is getting the compactor. Both them want to get the lock. We have an improvement about the `createManagedLedgerOffloader` before. https://github.com/apache/pulsar/pull/15883 We are using `getCompactor(false)` for the stats related operations. The `getCompactor` is guarded by `synchronized`. Actually, the stats just want to get the current compactor without initializing it. We don't need to use `synchronized` to guard this operation. *Modification* Remove unnecessary `synchronized` on the `getCompactor` method. (cherry picked from commit 4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec) --- .../main/java/org/apache/pulsar/broker/PulsarService.java | 13 - .../org/apache/pulsar/broker/service/BrokerService.java | 9 +++-- .../pulsar/broker/service/persistent/PersistentTopic.java | 7 +-- .../broker/stats/prometheus/NamespaceStatsAggregator.java | 8 +--- .../apache/pulsar/broker/stats/PrometheusMetricsTest.java | 2 +- 5 files changed, 14 insertions(+), 25 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java index 760cc83b5d6..459b1d9dc67 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java @@ -1329,16 +1329,19 @@ public class PulsarService implements AutoCloseable { } public synchronized Compactor getCompactor() throws PulsarServerException { -return getCompactor(true); -} - -public synchronized Compactor getCompactor(boolean shouldInitialize) throws PulsarServerException { -if (this.compactor == null && shouldInitialize) { +if (this.compactor == null) { this.compactor = newCompactor(); } return this.compactor; } +// This method is used for metrics, which is allowed to as null +// Because it's no operation on the compactor, so let's remove the synchronized on this method +// to avoid unnecessary lock competition. +public Compactor getNullableCompactor() { +return this.compactor; +} + protected synchronized OrderedScheduler getOffloaderScheduler(OffloadPoliciesImpl offloadPolicies) { if (this.offloaderScheduler == null) { this.offloaderScheduler = OrderedScheduler.newSchedulerBuilder() diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java index e91e462f7df..34b126d6104 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java @@ -1877,12 +1877,9 @@ public class BrokerService implements Closeable, ZooKeeperCacheListener getCompactorMXBean() { -Compactor compactor = null; -try { -compactor = brokerService.pulsar().getCompactor(false); -} catch (PulsarServerException ex) { -log.warn("get compactor error", ex); -} +Compactor compactor = brokerService.pulsar().getNullableCompactor(); return Optional.ofNullable(compactor).map(c -> c.getStats()); } diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/NamespaceStatsAggregator.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/NamespaceStatsAggregator.java index 2a21a0b402a..945725f4b77 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/NamespaceStatsAggregator.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/NamespaceStatsAggregator.java @@ -25,7 +25,6 @@ import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.client.LedgerHandle; import org.apache.bookkeeper.mledger.ManagedLedger; import org.apache.bookkeeper.mledger.impl.ManagedLedgerMBeanImpl; -import org.apache.pulsar.broker.PulsarServerException; import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.service.Topic; import org.apache.pulsar.broker.service.persistent.PersistentTopic; @@ -100,12 +99,7 @@ public class NamespaceStatsAggregator { }
[pulsar] 01/02: Avoid contended synchronized block on topic load (#15883)
This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch branch-2.8 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit b047e8f97797f18c9f18ab271e16551fab1b0ab4 Author: Matteo Merli AuthorDate: Thu Jun 2 08:34:55 2022 -0700 Avoid contended synchronized block on topic load (#15883) (cherry picked from commit 7d2fdea7749d72b58def4045be3f295e0ee4f04d) --- .../org/apache/pulsar/broker/PulsarService.java| 41 -- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java index 49440be5452..760cc83b5d6 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java @@ -1222,33 +1222,38 @@ public class PulsarService implements AutoCloseable { }); } -public synchronized LedgerOffloader createManagedLedgerOffloader(OffloadPoliciesImpl offloadPolicies) +public LedgerOffloader createManagedLedgerOffloader(OffloadPoliciesImpl offloadPolicies) throws PulsarServerException { try { if (StringUtils.isNotBlank(offloadPolicies.getManagedLedgerOffloadDriver())) { checkNotNull(offloadPolicies.getOffloadersDirectory(), "Offloader driver is configured to be '%s' but no offloaders directory is configured.", offloadPolicies.getManagedLedgerOffloadDriver()); -Offloaders offloaders = offloadersCache.getOrLoadOffloaders( -offloadPolicies.getOffloadersDirectory(), config.getNarExtractionDirectory()); -LedgerOffloaderFactory offloaderFactory = offloaders.getOffloaderFactory( -offloadPolicies.getManagedLedgerOffloadDriver()); -try { -return offloaderFactory.create( -offloadPolicies, -ImmutableMap.of( - LedgerOffloader.METADATA_SOFTWARE_VERSION_KEY.toLowerCase(), PulsarVersion.getVersion(), - LedgerOffloader.METADATA_SOFTWARE_GITSHA_KEY.toLowerCase(), PulsarVersion.getGitSha(), - LedgerOffloader.METADATA_PULSAR_CLUSTER_NAME.toLowerCase(), config.getClusterName() -), -schemaStorage, -getOffloaderScheduler(offloadPolicies)); -} catch (IOException ioe) { -throw new PulsarServerException(ioe.getMessage(), ioe.getCause()); +synchronized (this) { +Offloaders offloaders = offloadersCache.getOrLoadOffloaders( +offloadPolicies.getOffloadersDirectory(), config.getNarExtractionDirectory()); + +LedgerOffloaderFactory offloaderFactory = offloaders.getOffloaderFactory( +offloadPolicies.getManagedLedgerOffloadDriver()); +try { +return offloaderFactory.create( +offloadPolicies, +ImmutableMap.of( + LedgerOffloader.METADATA_SOFTWARE_VERSION_KEY.toLowerCase(), +PulsarVersion.getVersion(), + LedgerOffloader.METADATA_SOFTWARE_GITSHA_KEY.toLowerCase(), +PulsarVersion.getGitSha(), + LedgerOffloader.METADATA_PULSAR_CLUSTER_NAME.toLowerCase(), +config.getClusterName() +), +schemaStorage, getOffloaderScheduler(offloadPolicies), this.offloaderStats); +} catch (IOException ioe) { +throw new PulsarServerException(ioe.getMessage(), ioe.getCause()); +} } } else { -LOG.info("No ledger offloader configured, using NULL instance"); +LOG.debug("No ledger offloader configured, using NULL instance"); return NullLedgerOffloader.INSTANCE; } } catch (Throwable t) {
[pulsar] branch branch-2.8 updated (723149ec440 -> c1e176e7db6)
This is an automated email from the ASF dual-hosted git repository. yong pushed a change to branch branch-2.8 in repository https://gitbox.apache.org/repos/asf/pulsar.git from 723149ec440 Fix client memory limit currentUsage leak and semaphore release duplicated in ProducerImpl (#16985) new b047e8f9779 Avoid contended synchronized block on topic load (#15883) new c1e176e7db6 [improve][broker]Remove unnecessary lock on the stats thread (#16983) The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/pulsar/broker/PulsarService.java| 54 +- .../pulsar/broker/service/BrokerService.java | 9 ++-- .../broker/service/persistent/PersistentTopic.java | 7 +-- .../stats/prometheus/NamespaceStatsAggregator.java | 8 +--- .../pulsar/broker/stats/PrometheusMetricsTest.java | 2 +- 5 files changed, 37 insertions(+), 43 deletions(-)
[GitHub] [pulsar] codelipenghui opened a new pull request, #17055: Fix the add to project CI can't work with classic project
codelipenghui opened a new pull request, #17055: URL: https://github.com/apache/pulsar/pull/17055 From the source code of actions/add-to-project https://github.com/actions/add-to-project/blob/33e78e774384e272ef5071febf7585f394542eca/src/add-to-project.ts#L6-L8 Looks like it can't support to add the issue/pr to the link of https://github.com/apache/pulsar/projects/11 Change to the project under apache org. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] Demogorgon314 commented on issue #16978: Flaky-test: FilterEntryTest.testEntryFilterRescheduleMessageDependingOnConsumerSharedSubscription
Demogorgon314 commented on issue #16978: URL: https://github.com/apache/pulsar/issues/16978#issuecomment-1211500030 Yes, I will try to fix it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #17017: [improve][broker] Add close function worker
nodece commented on code in PR #17017: URL: https://github.com/apache/pulsar/pull/17017#discussion_r943056423 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java: ## @@ -411,6 +411,8 @@ public CompletableFuture closeAsync() { LOG.info("Closing PulsarService"); state = State.Closing; +functionWorkerService.ifPresent(WorkerService::stop); Review Comment: @RobertIndie > What do you mean by cli code? PulsarBrokerStarter belongs to cli code, it is called by using the `pulsar broker` command. > I see that the functionWorkerService is passed to the PulsarService by here: We support passing the functionWorkerService to PulsarService, but the function worker should be closed by PulsarService, not PulsarBrokerStarter, which is a component of PulsarService. Suppose we don't close the functionWorkerService when running the close method of PulsarService. In that case, the functionWorkerService will break the PulsarService running, because the functionWorkerService cannot request the broker service, then call the PulsarService shutdown method. So when close and shutdown methods run together, the shutdown method will break the close method, because the shutdown closes the metadata service session. See the following links: - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1812 - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1703-L1707 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #17017: [improve][broker] Add close function worker
nodece commented on code in PR #17017: URL: https://github.com/apache/pulsar/pull/17017#discussion_r943056423 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java: ## @@ -411,6 +411,8 @@ public CompletableFuture closeAsync() { LOG.info("Closing PulsarService"); state = State.Closing; +functionWorkerService.ifPresent(WorkerService::stop); Review Comment: @RobertIndie > What do you mean by cli code? PulsarBrokerStarter belongs to cli code, it is called by using the `pulsar broker`. > I see that the functionWorkerService is passed to the PulsarService by here: We support passing the functionWorkerService to PulsarService, but the function worker should be closed by PulsarService, not PulsarBrokerStarter, which is a component of PulsarService. Suppose we don't close the functionWorkerService when running the close method of PulsarService. In that case, the functionWorkerService will break the PulsarService running, because the functionWorkerService cannot request the broker service, then call the PulsarService shutdown method. So when close and shutdown methods run together, the shutdown method will break the close method, because the shutdown closes the metadata service session. See the following links: - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1812 - https://github.com/apache/pulsar/blob/4d5ecba9394515e7dbf19fd01739c1e1dc90e5ec/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1703-L1707 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] 01/01: Update project-flaky-test.yml
This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch codelipenghui-patch-1 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit 226865388fa7cbc96517f9b6cc9296a918a3fdb1 Author: Penghui Li AuthorDate: Thu Aug 11 10:46:00 2022 +0800 Update project-flaky-test.yml --- .github/workflows/project-flaky-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/project-flaky-test.yml b/.github/workflows/project-flaky-test.yml index fe9261d4137..71589677162 100644 --- a/.github/workflows/project-flaky-test.yml +++ b/.github/workflows/project-flaky-test.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/add-to-project@v0.3.0 with: - project-url: https://github.com/apache/pulsar/projects/11 + project-url: https://github.com/orgs/apache/projects/66 github-token: ${{ secrets.GITHUB_TOKEN }} labeled: flaky-tests label-operator: OR
[pulsar] branch codelipenghui-patch-1 created (now 226865388fa)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a change to branch codelipenghui-patch-1 in repository https://gitbox.apache.org/repos/asf/pulsar.git at 226865388fa Update project-flaky-test.yml This branch includes the following new commits: new 226865388fa Update project-flaky-test.yml The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[GitHub] [pulsar] c0090555 commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
c0090555 commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211498173 @michaeljmarshall I am running in the root directory of a MacBook Pro with M1 chip. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] nodece commented on a diff in pull request #17017: [improve][broker] Add close function worker
nodece commented on code in PR #17017: URL: https://github.com/apache/pulsar/pull/17017#discussion_r943056423 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java: ## @@ -411,6 +411,8 @@ public CompletableFuture closeAsync() { LOG.info("Closing PulsarService"); state = State.Closing; +functionWorkerService.ifPresent(WorkerService::stop); Review Comment: @RobertIndie > What do you mean by cli code? PulsarBrokerStarter belongs to cli code, it is called by using the `pulsar broker`. > I see that the functionWorkerService is passed to the PulsarService by here: We support passing the functionWorkerService to PulsarService, but the function worker should be closed by PulsarService, not PulsarBrokerStarter, which is a component of PulsarService. If we don't close the functionWorkerService when running the close method of PulsarService, the functionWorkerService will break the PulsarService running, because the functionWorkerService cannot request the broker service, then call the PulsarService shutdown method. So when close and shutdown methods run together, the shutdown method will break close method. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on pull request #17001: Fix swagger annotation for analyzeBacklog endpoint
michaeljmarshall commented on PR #17001: URL: https://github.com/apache/pulsar/pull/17001#issuecomment-1211496647 @lhotari - PTAL -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on issue #16978: Flaky-test: FilterEntryTest.testEntryFilterRescheduleMessageDependingOnConsumerSharedSubscription
codelipenghui commented on issue #16978: URL: https://github.com/apache/pulsar/issues/16978#issuecomment-1211496295 @Demogorgon314 Great finds, are you working on this issue? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #17054: [fix][test] Stop worker services when tearing down PulsarFunctionTlsTest
github-actions[bot] commented on PR #17054: URL: https://github.com/apache/pulsar/pull/17054#issuecomment-1211495153 @RobertIndie Please provide a correct documentation label for your PR. Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui closed issue #16693: Flaky-test: CPP BasicEndToEndTest.testpatternMultiTopicsHttpConsumerPubSub
codelipenghui closed issue #16693: Flaky-test: CPP BasicEndToEndTest.testpatternMultiTopicsHttpConsumerPubSub URL: https://github.com/apache/pulsar/issues/16693 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui closed issue #16704: Flaky-test: TxnLogBufferedWriterTest.testFlushThresholds
codelipenghui closed issue #16704: Flaky-test: TxnLogBufferedWriterTest.testFlushThresholds URL: https://github.com/apache/pulsar/issues/16704 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui closed issue #16270: [branch-2.10]Flaky-test: PulsarDebeziumOracleSourceTest.testDebeziumOracleDbSource
codelipenghui closed issue #16270: [branch-2.10]Flaky-test: PulsarDebeziumOracleSourceTest.testDebeziumOracleDbSource URL: https://github.com/apache/pulsar/issues/16270 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on issue #16270: [branch-2.10]Flaky-test: PulsarDebeziumOracleSourceTest.testDebeziumOracleDbSource
codelipenghui commented on issue #16270: URL: https://github.com/apache/pulsar/issues/16270#issuecomment-1211494008 Close this one since #13953 is tracking the issue -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] RobertIndie opened a new pull request, #17054: [fix][test] Stop worker services when tearing down PulsarFunctionTlsTest
RobertIndie opened a new pull request, #17054: URL: https://github.com/apache/pulsar/pull/17054 ### Motivation The function worker service in the PulsarFunctionTlsTest hasn't been stopped when tearing down. ### Modifications * Stop worker services when tearing down PulsarFunctionTlsTest ### Documentation Check the box below or label this PR directly. Need to update docs? - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #15401: Standalone broker on MacOS often fail to start after workstation sleep or reboot
github-actions[bot] commented on issue #15401: URL: https://github.com/apache/pulsar/issues/15401#issuecomment-1211490047 The issue had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #15907: [feature][functions]Support auth for function go
github-actions[bot] commented on PR #15907: URL: https://github.com/apache/pulsar/pull/15907#issuecomment-1211489683 The pr had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #15906: [Doc] website about pulsar java client
github-actions[bot] commented on issue #15906: URL: https://github.com/apache/pulsar/issues/15906#issuecomment-1211489694 The issue had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #15966: PIP-175: Extend time based release process
github-actions[bot] commented on issue #15966: URL: https://github.com/apache/pulsar/issues/15966#issuecomment-1211489660 The issue had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #16294: s3ManagedLedgerOffloadReadBufferSizeInBytes not work when set in broker
github-actions[bot] commented on issue #16294: URL: https://github.com/apache/pulsar/issues/16294#issuecomment-1211489438 The issue had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #16527: Due to missing Python GIL management, Python clients constructed with a non-default Logger fail to clean up their threads and often seg
github-actions[bot] commented on issue #16527: URL: https://github.com/apache/pulsar/issues/16527#issuecomment-1211489324 The issue had no activity for 30 days, mark with Stale label. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] coderzc commented on pull request #16832: [feature][broker] Support cgroup v2 by using `jdk.internal.platform.Metrics` in Pulsar Loadbalancer
coderzc commented on PR #16832: URL: https://github.com/apache/pulsar/pull/16832#issuecomment-1211489247 /pulsarbot run-failure-checks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] RobertIndie commented on a diff in pull request #17017: [improve][broker] Add close function worker
RobertIndie commented on code in PR #17017: URL: https://github.com/apache/pulsar/pull/17017#discussion_r943049080 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java: ## @@ -411,6 +411,8 @@ public CompletableFuture closeAsync() { LOG.info("Closing PulsarService"); state = State.Closing; +functionWorkerService.ifPresent(WorkerService::stop); Review Comment: What do you mean by cli code? I see that the functionWorkerService is passed to the PulsarService by here: https://github.com/apache/pulsar/blob/96930fda8a7776aaf6e61235a1d77ffe6e564052/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java#L204 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #16408: [fix][broker] Support loadBalancerSheddingIntervalMinutes dynamic configuration
lordcheng10 commented on PR #16408: URL: https://github.com/apache/pulsar/pull/16408#issuecomment-1211485614 /pulsarbot run-failure-checks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #17035: [fix][broker]After the broker is restarted, the cache dynamic configuration is invalid
lordcheng10 commented on PR #17035: URL: https://github.com/apache/pulsar/pull/17035#issuecomment-1211485548 /pulsarbot run-failure-checks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #17036: [clean][broker] remove unused code
lordcheng10 commented on PR #17036: URL: https://github.com/apache/pulsar/pull/17036#issuecomment-1211485519 /pulsarbot run-failure-checks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on pull request #13644: Rename test file name from `*Test2.java` to `*Test.java` to run all tests correctly
mattisonchao commented on PR #13644: URL: https://github.com/apache/pulsar/pull/13644#issuecomment-1211484789 Hi @equanz I got your new PR, thank you a lot! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on pull request #17053: [branch-2.10][fix][broker]Prevent StackOverFlowException in SHARED subscription
mattisonchao commented on PR #17053: URL: https://github.com/apache/pulsar/pull/17053#issuecomment-1211480673 Move the label to this PR, because we can cherry-pick it easily. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
michaeljmarshall commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211480623 > docker run -it -p 6650:6650 -p 8080:8080 --platform linux/amd64/v8 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:2.10.1 bin/pulsar standalone This command worked for me on MacOS. Are you running on linux? What are the permissions of the volumes? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on pull request #17018: [cleanup][broker] Follow up on #16968 to restore some behavior in PersistentDispatcherMultipleConsumers class
mattisonchao commented on PR #17018: URL: https://github.com/apache/pulsar/pull/17018#issuecomment-1211479399 Move label `release/2.10.2``release/2.9.4` and `release/2.8.5` to PR #17053 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on pull request #16968: [fix][broker]Prevent `StackOverFlowException` in SHARED subscription
mattisonchao commented on PR #16968: URL: https://github.com/apache/pulsar/pull/16968#issuecomment-1211478229 Move label `release/2.9.4` and `release/2.8.5` to PR #17053 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] coderzc commented on a diff in pull request #17046: [fix][broker] Fix calculate avg message per entry
coderzc commented on code in PR #17046: URL: https://github.com/apache/pulsar/pull/17046#discussion_r943044364 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java: ## @@ -290,13 +290,16 @@ public Future sendMessages(final List entries, EntryBatch return writePromise; } int unackedMessages = totalMessages; -// Note -// Must ensure that the message is written to the pendingAcks before sent is first, because this consumer -// is possible to disconnect at this time. -if (pendingAcks != null) { -for (int i = 0; i < entries.size(); i++) { -Entry entry = entries.get(i); -if (entry != null) { +int totalEntries = 0; + +for (int i = 0; i < entries.size(); i++) { +Entry entry = entries.get(i); +if (entry != null) { +totalEntries++; +// Note +// Must ensure that the message is written to the pendingAcks before sent is first, +// because this consumer is possible to disconnect at this time. +if (pendingAcks != null) { Review Comment: Make sure it can enter the loop. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #17053: [fix][broker]Prevent StackOverFlowException in SHARED subscription
github-actions[bot] commented on PR #17053: URL: https://github.com/apache/pulsar/pull/17053#issuecomment-1211477567 @mattisonchao Please provide a correct documentation label for your PR. Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] mattisonchao opened a new pull request, #17053: [fix][broker]Prevent StackOverFlowException in SHARED subscription
mattisonchao opened a new pull request, #17053: URL: https://github.com/apache/pulsar/pull/17053 ### Motivation Cherry-pick original PR #16968 ### Modifications - Cherry-pick original PR #16968 ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Documentation - [x] `doc-not-needed` (Please explain why) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] Technoboy- commented on a diff in pull request #17046: [fix][broker] Fix calculate avg message per entry
Technoboy- commented on code in PR #17046: URL: https://github.com/apache/pulsar/pull/17046#discussion_r943041562 ## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java: ## @@ -290,13 +290,16 @@ public Future sendMessages(final List entries, EntryBatch return writePromise; } int unackedMessages = totalMessages; -// Note -// Must ensure that the message is written to the pendingAcks before sent is first, because this consumer -// is possible to disconnect at this time. -if (pendingAcks != null) { -for (int i = 0; i < entries.size(); i++) { -Entry entry = entries.get(i); -if (entry != null) { +int totalEntries = 0; + +for (int i = 0; i < entries.size(); i++) { +Entry entry = entries.get(i); +if (entry != null) { +totalEntries++; +// Note +// Must ensure that the message is written to the pendingAcks before sent is first, +// because this consumer is possible to disconnect at this time. +if (pendingAcks != null) { Review Comment: Why move `pendingAcks` here ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch branch-2.11 updated: [improve][admin] Not allow to terminate system topic. (#17006)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a commit to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/branch-2.11 by this push: new 5009bebf230 [improve][admin] Not allow to terminate system topic. (#17006) 5009bebf230 is described below commit 5009bebf230431eb2ca6337f9c831ad24ff1e99b Author: Jiwei Guo AuthorDate: Thu Aug 11 09:40:52 2022 +0800 [improve][admin] Not allow to terminate system topic. (#17006) --- .../pulsar/broker/admin/impl/PersistentTopicsBase.java| 5 + .../org/apache/pulsar/broker/admin/AdminApi2Test.java | 15 +++ 2 files changed, 20 insertions(+) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java index 4b635f205e3..de11d49d773 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java @@ -102,6 +102,7 @@ import org.apache.pulsar.common.compression.CompressionCodec; import org.apache.pulsar.common.compression.CompressionCodecProvider; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.PartitionedManagedLedgerInfo; +import org.apache.pulsar.common.naming.SystemTopicNames; import org.apache.pulsar.common.naming.TopicDomain; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; @@ -3688,6 +3689,10 @@ public class PersistentTopicsBase extends AdminResource { throw new RestException(Status.METHOD_NOT_ALLOWED, "Termination of a partitioned topic is not allowed"); } +if (SystemTopicNames.isSystemTopic(topicName)) { +throw new RestException(Status.METHOD_NOT_ALLOWED, +"Termination of a system topic is not allowed"); +} }) .thenCompose(__ -> getTopicReferenceAsync(topicName)) .thenCompose(topic -> { diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java index 1fedcbf7318..410ad097f6a 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java @@ -28,6 +28,7 @@ import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.expectThrows; import static org.testng.Assert.fail; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -2533,4 +2534,18 @@ public class AdminApi2Test extends MockedPulsarServiceBaseTest { ListNamespaceTopicsOptions.builder().mode(Mode.NON_PERSISTENT).build()); Assert.assertTrue(notPersistentTopics.contains(nonPersistentTopic)); } + +@Test +private void testTerminateSystemTopic() throws Exception { +final String topic = "persistent://prop-xyz/ns1/testTerminateSystemTopic"; +admin.topics().createNonPartitionedTopic(topic); +final String eventTopic = "persistent://prop-xyz/ns1/__change_events"; +admin.topicPolicies().setMaxConsumers(topic, 2); +Awaitility.await().untilAsserted(() -> { +Assert.assertEquals(admin.topicPolicies().getMaxConsumers(topic), Integer.valueOf(2)); +}); +PulsarAdminException ex = expectThrows(PulsarAdminException.class, +() -> admin.topics().terminateTopic(eventTopic)); +assertTrue(ex instanceof PulsarAdminException.NotAllowedException); +} }
[GitHub] [pulsar] Technoboy- merged pull request #17006: [improve][admin] Not allow to terminate system topic.
Technoboy- merged PR #17006: URL: https://github.com/apache/pulsar/pull/17006 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [improve][admin] Not allow to terminate system topic. (#17006)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 96930fda8a7 [improve][admin] Not allow to terminate system topic. (#17006) 96930fda8a7 is described below commit 96930fda8a7776aaf6e61235a1d77ffe6e564052 Author: Jiwei Guo AuthorDate: Thu Aug 11 09:40:52 2022 +0800 [improve][admin] Not allow to terminate system topic. (#17006) --- .../pulsar/broker/admin/impl/PersistentTopicsBase.java| 5 + .../org/apache/pulsar/broker/admin/AdminApi2Test.java | 15 +++ 2 files changed, 20 insertions(+) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java index 4b635f205e3..de11d49d773 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java @@ -102,6 +102,7 @@ import org.apache.pulsar.common.compression.CompressionCodec; import org.apache.pulsar.common.compression.CompressionCodecProvider; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.PartitionedManagedLedgerInfo; +import org.apache.pulsar.common.naming.SystemTopicNames; import org.apache.pulsar.common.naming.TopicDomain; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; @@ -3688,6 +3689,10 @@ public class PersistentTopicsBase extends AdminResource { throw new RestException(Status.METHOD_NOT_ALLOWED, "Termination of a partitioned topic is not allowed"); } +if (SystemTopicNames.isSystemTopic(topicName)) { +throw new RestException(Status.METHOD_NOT_ALLOWED, +"Termination of a system topic is not allowed"); +} }) .thenCompose(__ -> getTopicReferenceAsync(topicName)) .thenCompose(topic -> { diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java index 1fedcbf7318..410ad097f6a 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java @@ -28,6 +28,7 @@ import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.expectThrows; import static org.testng.Assert.fail; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -2533,4 +2534,18 @@ public class AdminApi2Test extends MockedPulsarServiceBaseTest { ListNamespaceTopicsOptions.builder().mode(Mode.NON_PERSISTENT).build()); Assert.assertTrue(notPersistentTopics.contains(nonPersistentTopic)); } + +@Test +private void testTerminateSystemTopic() throws Exception { +final String topic = "persistent://prop-xyz/ns1/testTerminateSystemTopic"; +admin.topics().createNonPartitionedTopic(topic); +final String eventTopic = "persistent://prop-xyz/ns1/__change_events"; +admin.topicPolicies().setMaxConsumers(topic, 2); +Awaitility.await().untilAsserted(() -> { +Assert.assertEquals(admin.topicPolicies().getMaxConsumers(topic), Integer.valueOf(2)); +}); +PulsarAdminException ex = expectThrows(PulsarAdminException.class, +() -> admin.topics().terminateTopic(eventTopic)); +assertTrue(ex instanceof PulsarAdminException.NotAllowedException); +} }
[GitHub] [pulsar] Technoboy- closed issue #15891: "Topic policies cache have not init" randomly happen on different topics in the same namespace
Technoboy- closed issue #15891: "Topic policies cache have not init" randomly happen on different topics in the same namespace URL: https://github.com/apache/pulsar/issues/15891 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #17019: [fix][client] Release semaphore before discarding messages in batchMessageContainer
github-actions[bot] commented on PR #17019: URL: https://github.com/apache/pulsar/pull/17019#issuecomment-1211468232 @RobertIndie Please provide a correct documentation label for your PR. Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] 01/03: [fix][client] Release semaphore before discarding messages in batchMessageContainer (#17019)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a commit to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit 4b3b2f74ca68a2f08714978b4027ddcf6c0806b4 Author: Zike Yang AuthorDate: Thu Aug 11 09:24:30 2022 +0800 [fix][client] Release semaphore before discarding messages in batchMessageContainer (#17019) --- .../src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java index b5756e61b2c..210fc14eb66 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java @@ -2030,9 +2030,9 @@ public class ProducerImpl extends ProducerBase implements TimerTask, Conne } final int numMessagesInBatch = batchMessageContainer.getNumMessagesInBatch(); final long currentBatchSize = batchMessageContainer.getCurrentBatchSize(); -batchMessageContainer.discard(ex); semaphoreRelease(numMessagesInBatch); client.getMemoryLimitController().releaseMemory(currentBatchSize); +batchMessageContainer.discard(ex); } @Override
[pulsar] 02/03: [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a commit to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit c7ff6d4136692a7b7e4ef58d2bba9d630fe90545 Author: Heesung Sohn <103456639+heesung...@users.noreply.github.com> AuthorDate: Wed Aug 10 17:25:35 2022 -0700 [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937) --- .../impl/LeastResourceUsageWithWeight.java | 2 +- .../loadbalance/impl/ModularLoadManagerImpl.java | 10 +-- .../broker/loadbalance/impl/ThresholdShedder.java | 76 +++--- .../loadbalance/impl/ThresholdShedderTest.java | 6 ++ .../data/loadbalancer/LocalBrokerData.java | 20 ++ 5 files changed, 100 insertions(+), 14 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java index 2e717500e64..9493fefbad2 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java @@ -90,7 +90,7 @@ public class LeastResourceUsageWithWeight implements ModularLoadManagerStrategy ServiceConfiguration conf) { final double historyPercentage = conf.getLoadBalancerHistoryResourcePercentage(); Double historyUsage = brokerAvgResourceUsageWithWeight.get(broker); -double resourceUsage = brokerData.getLocalData().getMaxResourceUsageWithWeight( +double resourceUsage = brokerData.getLocalData().getMaxResourceUsageWithWeightWithinLimit( conf.getLoadBalancerCPUResourceWeight(), conf.getLoadBalancerMemoryResourceWeight(), conf.getLoadBalancerDirectMemoryResourceWeight(), diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java index 9444737fb79..0c86602695a 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java @@ -448,8 +448,9 @@ public class ModularLoadManagerImpl implements ModularLoadManager { long timeSinceLastReportWrittenToStore = System.currentTimeMillis() - localData.getLastUpdate(); if (timeSinceLastReportWrittenToStore > updateMaxIntervalMillis) { log.info("Writing local data to metadata store because time since last" -+ " update exceeded threshold of {} minutes", -conf.getLoadBalancerReportUpdateMaxIntervalMinutes()); ++ " update exceeded threshold of {} minutes. ResourceUsage:[{}]", +conf.getLoadBalancerReportUpdateMaxIntervalMinutes(), +localData.printResourceUsage()); // Always update after surpassing the maximum interval. return true; } @@ -463,9 +464,10 @@ public class ModularLoadManagerImpl implements ModularLoadManager { percentChange(lastData.getNumBundles(), localData.getNumBundles(); if (maxChange > conf.getLoadBalancerReportUpdateThresholdPercentage()) { log.info("Writing local data to metadata store because maximum change {}% exceeded threshold {}%; " -+ "time since last report written is {} seconds", maxChange, ++ "time since last report written is {} seconds. ResourceUsage:[{}]", maxChange, conf.getLoadBalancerReportUpdateThresholdPercentage(), -timeSinceLastReportWrittenToStore / 1000.0); +timeSinceLastReportWrittenToStore / 1000.0, +localData.printResourceUsage()); return true; } return false; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java index 586a2fe1012..05c69062663 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java @@ -53,16 +53,38 @@ public class ThresholdShedder implements LoadSheddingStrategy { private final Multimap selectedBundlesCache = ArrayListMultimap.create(); private static final double ADDITIONAL_THRESHOLD_PERCENT_MARGIN = 0.05; private static final double MB = 1024 * 1024; +
[pulsar] branch branch-2.11 updated (7c0a7f91546 -> a2769124689)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a change to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git from 7c0a7f91546 [improve][test] Avoid hacky modify static final field (#17005) new 4b3b2f74ca6 [fix][client] Release semaphore before discarding messages in batchMessageContainer (#17019) new c7ff6d41366 [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937) new a2769124689 [test]Fix Flaky-test: BrokerServiceTest.testLookupThrottlingForClientByClient (#16540) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../impl/LeastResourceUsageWithWeight.java | 2 +- .../loadbalance/impl/ModularLoadManagerImpl.java | 10 +-- .../broker/loadbalance/impl/ThresholdShedder.java | 76 +++--- .../loadbalance/impl/ThresholdShedderTest.java | 6 ++ .../pulsar/broker/service/BrokerServiceTest.java | 71 .../apache/pulsar/client/impl/ProducerImpl.java| 2 +- .../data/loadbalancer/LocalBrokerData.java | 20 ++ 7 files changed, 160 insertions(+), 27 deletions(-)
[pulsar] 03/03: [test]Fix Flaky-test: BrokerServiceTest.testLookupThrottlingForClientByClient (#16540)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a commit to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git commit a2769124689892bd5153f9b5b2e5ac20c1121038 Author: Xiaoyu Hou AuthorDate: Thu Aug 11 00:06:54 2022 +0800 [test]Fix Flaky-test: BrokerServiceTest.testLookupThrottlingForClientByClient (#16540) --- .../pulsar/broker/service/BrokerServiceTest.java | 71 ++ 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java index faa5de072aa..1fb63470456 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java @@ -61,6 +61,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import lombok.Cleanup; import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.mledger.ManagedLedgerConfig; @@ -88,10 +89,13 @@ import org.apache.pulsar.client.api.PulsarClient; import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.api.SubscriptionType; +import org.apache.pulsar.client.impl.ClientCnx; import org.apache.pulsar.client.impl.ConnectionPool; import org.apache.pulsar.client.impl.PulsarServiceNameResolver; import org.apache.pulsar.client.impl.auth.AuthenticationTls; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; +import org.apache.pulsar.common.api.proto.CommandLookupTopicResponse; +import org.apache.pulsar.common.api.proto.CommandPartitionedTopicMetadataResponse; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.NamespaceName; import org.apache.pulsar.common.naming.TopicName; @@ -966,8 +970,6 @@ public class BrokerServiceTest extends BrokerTestBase { */ @Test public void testLookupThrottlingForClientByClient() throws Exception { -// This test looks like it could be flakey, if the broker responds -// quickly enough, there may never be concurrency in requests final String topicName = "persistent://prop/ns-abc/newTopic"; PulsarServiceNameResolver resolver = new PulsarServiceNameResolver(); @@ -979,7 +981,30 @@ public class BrokerServiceTest extends BrokerTestBase { EventLoopGroup eventLoop = EventLoopUtil.newEventLoopGroup(20, false, new DefaultThreadFactory("test-pool", Thread.currentThread().isDaemon())); long reqId = 0xdeadbeef; -try (ConnectionPool pool = new ConnectionPool(conf, eventLoop)) { +// Using an AtomicReference in order to reset a new CountDownLatch +AtomicReference latchRef = new AtomicReference<>(); +latchRef.set(new CountDownLatch(1)); +try (ConnectionPool pool = new ConnectionPool(conf, eventLoop, () -> new ClientCnx(conf, eventLoop) { +@Override +protected void handleLookupResponse(CommandLookupTopicResponse lookupResult) { +try { +latchRef.get().await(); +} catch (InterruptedException e) { +// ignore +} +super.handleLookupResponse(lookupResult); +} + +@Override +protected void handlePartitionResponse(CommandPartitionedTopicMetadataResponse lookupResult) { +try { +latchRef.get().await(); +} catch (InterruptedException e) { +// ignore +} +super.handlePartitionResponse(lookupResult); +} +})) { // for PMR // 2 lookup will succeed long reqId1 = reqId++; @@ -990,12 +1015,18 @@ public class BrokerServiceTest extends BrokerTestBase { long reqId2 = reqId++; ByteBuf request2 = Commands.newPartitionMetadataRequest(topicName, reqId2); CompletableFuture f2 = pool.getConnection(resolver.resolveHost()) -.thenCompose(clientCnx -> clientCnx.newLookup(request2, reqId2)); +.thenCompose(clientCnx -> { +CompletableFuture future = clientCnx.newLookup(request2, reqId2); +// pending other responses in `ClientCnx` until now +latchRef.get().countDown(); +return future; +}); f1.get(); f2.get(); // 3 lookup will fail +latchRef.set(new CountDownLatch(1)); long reqId3 = reqId++; ByteBuf
[pulsar] branch master updated (5f5d53b405f -> 21dc668e2ca)
This is an automated email from the ASF dual-hosted git repository. technoboy pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git from 5f5d53b405f [feat][ci] Add flaky test issues and PRs to flaky test project (#17038) add 21dc668e2ca [fix][client] Release semaphore before discarding messages in batchMessageContainer (#17019) No new revisions were added by this update. Summary of changes: .../src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[GitHub] [pulsar] Technoboy- merged pull request #17019: [fix][client] Release semaphore before discarding messages in batchMessageContainer
Technoboy- merged PR #17019: URL: https://github.com/apache/pulsar/pull/17019 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] Technoboy- closed issue #17014: Flaky-test: ProducerSemaphoreTest.testBatchMessageSendTimeoutProducerSemaphoreRelease
Technoboy- closed issue #17014: Flaky-test: ProducerSemaphoreTest.testBatchMessageSendTimeoutProducerSemaphoreRelease URL: https://github.com/apache/pulsar/issues/17014 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar-site] branch asf-site-next updated: Updated site at revision 8a0c182c
This is an automated email from the ASF dual-hosted git repository. urfree pushed a commit to branch asf-site-next in repository https://gitbox.apache.org/repos/asf/pulsar-site.git The following commit(s) were added to refs/heads/asf-site-next by this push: new 6909d3265b7 Updated site at revision 8a0c182c 6909d3265b7 is described below commit 6909d3265b7819795dc3567fd39e643770c23678 Author: Pulsar Site Updater AuthorDate: Thu Aug 11 00:49:51 2022 + Updated site at revision 8a0c182c --- content/index.html | 2 +- content/swagger/master/swagger.json| 132 ++-- content/swagger/master/swaggerfunctions.json | 96 +++--- content/swagger/master/swaggerlookup.json | 34 ++--- content/swagger/master/swaggerpackages.json| 34 ++--- content/swagger/master/swaggersink.json| 34 ++--- content/swagger/master/swaggersource.json | 34 ++--- content/swagger/master/swaggertransactions.json| 34 ++--- content/swagger/master/v2/swagger.json | 138 ++--- content/swagger/master/v2/swaggerlookup.json | 34 ++--- content/swagger/master/v3/swaggerfunctions.json| 96 +++--- content/swagger/master/v3/swaggerpackages.json | 34 ++--- content/swagger/master/v3/swaggersink.json | 34 ++--- content/swagger/master/v3/swaggersource.json | 34 ++--- content/swagger/master/v3/swaggertransactions.json | 34 ++--- 15 files changed, 402 insertions(+), 402 deletions(-) diff --git a/content/index.html b/content/index.html index d491daf37b5..18313a021af 100644 --- a/content/index.html +++ b/content/index.html @@ -23,7 +23,7 @@ !function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}()) -Skip to main content Pulsar Summit San Francisco 2022 will take place on August 18th, 2022. https://pulsar-summit.org/;>Register now and help us make i [...] +Skip to main content Pulsar Summit San Francisco 2022 will take place on August 18th, 2022. https://pulsar-summit.org/;>Register now and help us make i [...] http://www.apache.org/; target="_blank" rel="noopener noreferrer" class="footer__link-item">Foundationhttps://www.apache.org/events/current- [...] Apache Pulsar is available under the https://www.apache.org/licenses/LICENSE-2.0; target="_blank">Apache License, version 2.0. diff --git a/content/swagger/master/swagger.json b/content/swagger/master/swagger.json index 2ac639aa157..5fdd80948e0 100644 --- a/content/swagger/master/swagger.json +++ b/content/swagger/master/swagger.json @@ -22037,7 +22037,7 @@ "peerAddress" : { "$ref" : "#/definitions/SocketAddress" }, -"commandData" : { +"subscription" : { "type" : "string" }, "tlsCertificates" : { @@ -22049,7 +22049,7 @@ "httpAuthType" : { "type" : "string" }, -"subscription" : { +"commandData" : { "type" : "string" } } @@ -22099,10 +22099,6 @@ "type" : "string", "enum" : [ "producer_request_hold", "producer_exception", "consumer_backlog_eviction" ] }, -"limit" : { - "type" : "integer", - "format" : "int64" -}, "limitSize" : { "type" : "integer", "format" : "int64" @@ -22110,6 +22106,10 @@ "limitTime" : { "type" : "integer", "format" : "int32" +}, +"limit" : { + "type" : "integer", + "format" : "int64" } } }, @@ -22639,12 +22639,12 @@ "annotationIntrospector" : { "$ref" : "#/definitions/AnnotationIntrospector" }, -"nodeFactory" : { - "$ref" : "#/definitions/JsonNodeFactory" -}, "defaultPropertyInclusion" : { "$ref" : "#/definitions/Value" }, +"nodeFactory" : { + "$ref" : "#/definitions/JsonNodeFactory" +}, "deserializationFeatures" : { "type" : "integer", "format" : "int32" @@ -22676,12 +22676,12 @@ "typeFactory" : { "$ref" : "#/definitions/TypeFactory" }, -"handlerInstantiator" : { - "$ref" : "#/definitions/HandlerInstantiator" -}, "propertyNamingStrategy" : { "$ref" : "#/definitions/PropertyNamingStrategy" }, +"handlerInstantiator" : { + "$ref" : "#/definitions/HandlerInstantiator" +}, "dateFormat" : {
[pulsar] branch master updated: [feat][ci] Add flaky test issues and PRs to flaky test project (#17038)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new 5f5d53b405f [feat][ci] Add flaky test issues and PRs to flaky test project (#17038) 5f5d53b405f is described below commit 5f5d53b405f88eec240dc8a3b23381205ac47d57 Author: Penghui Li AuthorDate: Thu Aug 11 08:40:23 2022 +0800 [feat][ci] Add flaky test issues and PRs to flaky test project (#17038) --- .github/workflows/project-flaky-test.yml | 42 1 file changed, 42 insertions(+) diff --git a/.github/workflows/project-flaky-test.yml b/.github/workflows/project-flaky-test.yml new file mode 100644 index 000..fe9261d4137 --- /dev/null +++ b/.github/workflows/project-flaky-test.yml @@ -0,0 +1,42 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: 'Add flaky test issues and PRs to flaky test project' + +on: + issues: +types: + - opened + - labeled + pull_request: +types: + - opened + - labeled + +jobs: + add-to-project: +name: Add flaky test issues and PRs to flaky test project +runs-on: ubuntu-latest +steps: + - uses: actions/add-to-project@v0.3.0 +with: + project-url: https://github.com/apache/pulsar/projects/11 + github-token: ${{ secrets.GITHUB_TOKEN }} + labeled: flaky-tests + label-operator: OR
[GitHub] [pulsar] codelipenghui merged pull request #17038: [feat][ci] Add flaky test issues and PRs to flaky test project
codelipenghui merged PR #17038: URL: https://github.com/apache/pulsar/pull/17038 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar] branch master updated: [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937)
This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git The following commit(s) were added to refs/heads/master by this push: new eb833e6ffed [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937) eb833e6ffed is described below commit eb833e6ffed472a82e4b2ea5ce6271c59246e119 Author: Heesung Sohn <103456639+heesung...@users.noreply.github.com> AuthorDate: Wed Aug 10 17:25:35 2022 -0700 [fix][load-balancer] skip mis-configured resource usage(>100%) in load computation (#16937) --- .../impl/LeastResourceUsageWithWeight.java | 2 +- .../loadbalance/impl/ModularLoadManagerImpl.java | 10 +-- .../broker/loadbalance/impl/ThresholdShedder.java | 76 +++--- .../loadbalance/impl/ThresholdShedderTest.java | 6 ++ .../data/loadbalancer/LocalBrokerData.java | 20 ++ 5 files changed, 100 insertions(+), 14 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java index 2e717500e64..9493fefbad2 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java @@ -90,7 +90,7 @@ public class LeastResourceUsageWithWeight implements ModularLoadManagerStrategy ServiceConfiguration conf) { final double historyPercentage = conf.getLoadBalancerHistoryResourcePercentage(); Double historyUsage = brokerAvgResourceUsageWithWeight.get(broker); -double resourceUsage = brokerData.getLocalData().getMaxResourceUsageWithWeight( +double resourceUsage = brokerData.getLocalData().getMaxResourceUsageWithWeightWithinLimit( conf.getLoadBalancerCPUResourceWeight(), conf.getLoadBalancerMemoryResourceWeight(), conf.getLoadBalancerDirectMemoryResourceWeight(), diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java index 9444737fb79..0c86602695a 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java @@ -448,8 +448,9 @@ public class ModularLoadManagerImpl implements ModularLoadManager { long timeSinceLastReportWrittenToStore = System.currentTimeMillis() - localData.getLastUpdate(); if (timeSinceLastReportWrittenToStore > updateMaxIntervalMillis) { log.info("Writing local data to metadata store because time since last" -+ " update exceeded threshold of {} minutes", -conf.getLoadBalancerReportUpdateMaxIntervalMinutes()); ++ " update exceeded threshold of {} minutes. ResourceUsage:[{}]", +conf.getLoadBalancerReportUpdateMaxIntervalMinutes(), +localData.printResourceUsage()); // Always update after surpassing the maximum interval. return true; } @@ -463,9 +464,10 @@ public class ModularLoadManagerImpl implements ModularLoadManager { percentChange(lastData.getNumBundles(), localData.getNumBundles(); if (maxChange > conf.getLoadBalancerReportUpdateThresholdPercentage()) { log.info("Writing local data to metadata store because maximum change {}% exceeded threshold {}%; " -+ "time since last report written is {} seconds", maxChange, ++ "time since last report written is {} seconds. ResourceUsage:[{}]", maxChange, conf.getLoadBalancerReportUpdateThresholdPercentage(), -timeSinceLastReportWrittenToStore / 1000.0); +timeSinceLastReportWrittenToStore / 1000.0, +localData.printResourceUsage()); return true; } return false; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java index 586a2fe1012..05c69062663 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java @@ -53,16 +53,38 @@ public class ThresholdShedder implements LoadSheddingStrategy {
[GitHub] [pulsar] codelipenghui merged pull request #16937: [fix][load-balancer] skip mis-configured resource usage(>100%) in load balancer
codelipenghui merged PR #16937: URL: https://github.com/apache/pulsar/pull/16937 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[pulsar-site] branch main updated: Docs sync done from apache/pulsar(#e826d84)
This is an automated email from the ASF dual-hosted git repository. urfree pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/pulsar-site.git The following commit(s) were added to refs/heads/main by this push: new 8a0c182c794 Docs sync done from apache/pulsar(#e826d84) 8a0c182c794 is described below commit 8a0c182c79483a96245a47fadd4caf0d939dc42f Author: Pulsar Site Updater AuthorDate: Thu Aug 11 00:01:57 2022 + Docs sync done from apache/pulsar(#e826d84) --- site2/website-next/static/swagger/restApiVersions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site2/website-next/static/swagger/restApiVersions.json b/site2/website-next/static/swagger/restApiVersions.json index 8d35bd4d0b0..97491c6ff90 100644 --- a/site2/website-next/static/swagger/restApiVersions.json +++ b/site2/website-next/static/swagger/restApiVersions.json @@ -390,7 +390,7 @@ ] } ], -"2.9.1": [ +"2.9.2": [ { "version": "v2", "fileName": [ @@ -407,7 +407,7 @@ ] } ], -"2.9.2": [ +"2.9.1": [ { "version": "v2", "fileName": [
[GitHub] [pulsar] dwctua commented on issue #10306: [Transactions]. Transaction is not aborted after timeout
dwctua commented on issue #10306: URL: https://github.com/apache/pulsar/issues/10306#issuecomment-1211402604 I'm getting the same error in 2.10 when running as standalone mode locally. but it is happening randomly without a clear pattern. Is a way to reset the transaction status so re-run won't fail? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
michaeljmarshall commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211357431 Thanks for reaching out. Sorry I missed the original comment. I'll take a closer look later tonight. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] c0090555 commented on issue #15647: [2.10.0] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper
c0090555 commented on issue #15647: URL: https://github.com/apache/pulsar/issues/15647#issuecomment-1211339478 @jsteggink @michaeljmarshall Hi, It seems I am having the same issue when running 2.10.1 standalone version on docker: ``` docker run -it -p 6650:6650 -p 8080:8080 --platform linux/amd64/v8 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:2.10.1 bin/pulsar standalone 2022-08-10T22:12:18,912+ [main] INFO org.apache.zookeeper.server.persistence.FileTxnSnapLog - zookeeper.snapshot.trust.empty : true 2022-08-10T22:12:18,913+ [main] ERROR org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble - Exception while instantiating ZooKeeper org.apache.zookeeper.server.persistence.FileTxnSnapLog$DatadirException: Cannot write to data directory data/standalone/zookeeper/version-2 at org.apache.zookeeper.server.persistence.FileTxnSnapLog.(FileTxnSnapLog.java:140) ~[org.apache.zookeeper-zookeeper-3.6.3.jar:3.6.3] at org.apache.zookeeper.server.ZooKeeperServer.(ZooKeeperServer.java:441) ~[org.apache.zookeeper-zookeeper-3.6.3.jar:3.6.3] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:200) [org.apache.pulsar-pulsar-zookeeper-utils-2.10.1.jar:2.10.1] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:443) [org.apache.pulsar-pulsar-zookeeper-utils-2.10.1.jar:2.10.1] at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:269) [org.apache.pulsar-pulsar-broker-2.10.1.jar:2.10.1] at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:139) [org.apache.pulsar-pulsar-broker-2.10.1.jar:2.10.1] 2022-08-10T22:12:18,979+ [main] ERROR org.apache.pulsar.PulsarStandaloneStarter - Failed to start pulsar service. java.io.IOException: org.apache.zookeeper.server.persistence.FileTxnSnapLog$DatadirException: Cannot write to data directory data/standalone/zookeeper/version-2 at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:214) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.10.1.jar:2.10.1] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:443) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.10.1.jar:2.10.1] at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:269) ~[org.apache.pulsar-pulsar-broker-2.10.1.jar:2.10.1] at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:139) [org.apache.pulsar-pulsar-broker-2.10.1.jar:2.10.1] Caused by: org.apache.zookeeper.server.persistence.FileTxnSnapLog$DatadirException: Cannot write to data directory data/standalone/zookeeper/version-2 at org.apache.zookeeper.server.persistence.FileTxnSnapLog.(FileTxnSnapLog.java:140) ~[org.apache.zookeeper-zookeeper-3.6.3.jar:3.6.3] at org.apache.zookeeper.server.ZooKeeperServer.(ZooKeeperServer.java:441) ~[org.apache.zookeeper-zookeeper-3.6.3.jar:3.6.3] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:200) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.10.1.jar:2.10.1] ... 3 more ``` Is there any fix on this? Thanks a lot! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #16377: [refactor][java-client] Reduce code duplication in admin client
lhotari commented on PR #16377: URL: https://github.com/apache/pulsar/pull/16377#issuecomment-1211177608 Nice cleanup! Good work @andrasbeni -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #17039: [docs] Clarify security vulnerability process and reporting
lhotari commented on PR #17039: URL: https://github.com/apache/pulsar/pull/17039#issuecomment-1211147317 > I'm bothered that we have versioned docs about security policies and supported versions. It makes no sense. I would suggest a further PR removes all of these and instead in the versioned menus refers to the common and most current version. @dave2wave Yes, that's a problem. I created #17052 to track it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org