You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/28 12:24:42 UTC
[GitHub] [pulsar] saosir opened a new pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
saosir opened a new pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072
*(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
Fixes #<xyz>
*(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
Master Issue: #<xyz>
### Motivation
*Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
### Modifications
*Describe the modifications you've done.*
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
- The rest endpoints: (yes / no)
- The admin cli options: (yes / no)
- Anything that affects deployment: (yes / no / don't know)
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755035183
> > why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages at first timeout.
> > https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
>
> I think It's just a mistake. I guess the original author intended to do:
>
> ```c++
> int blankPartitions = (timeoutMs_ / tickDurationInMs_) + ((timeoutMs_ % tickDurationInMs_ == 0) ? 0 : 1);
> for (int i = 0; i < blankPartitions; i++) {
> ```
see #9134
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755020822
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754692058
Agree with you, java-client has same problem:
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageTracker.java#L116-L119
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754663469
https://github.com/saosir/pulsar/blob/2c3e33be7d6f1e8beea4f6bf1382d03b91c4cb87/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L85
why `blankPartitions + 1`? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir removed a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir removed a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755118504
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
When tracking and remove a msgId in `UnAckedMessageTrackerEnabled`, do we need to clean up the batchIndex of `MessageId`?
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L93-L102
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L109-L118
When sending batchMessage ack, only the ack of the last message in batchMessage will be removed from `UnAckedMessageTrackerEnabled`
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/ConsumerImpl.cc#L808-L817
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie merged pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755129583
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755118504
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754454297
@sijie I think a unit tests is required for this change, but the recent changes don't contain a test.
@saosir could you add a test to verify the redelivery request won't be sent repeatedly?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754524414
@BewareMyPower I hava a question.
Why default router policy of `PartitionedProducer` is `SinglePartition` in pulsar-client-cpp
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/ProducerConfigurationImpl.h#L56
but in pulsar-client-java is `RoundRobinPartition`
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerBuilderImpl.java#L317-L319
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751701775
@BewareMyPower 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-752029071
@saosir Yeah, your concern is right.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir removed a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir removed a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755115344
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754524414
@BewareMyPower I have a question.
Why default router policy of `PartitionedProducer` is `SinglePartition` in pulsar-client-cpp
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/ProducerConfigurationImpl.h#L56
but in pulsar-client-java is `RoundRobinPartition`
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerBuilderImpl.java#L317-L319
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754486867
> The code itself looks good to me. However, introducing `FRIEND_TEST` to code under `lib/` is not a good way.
>
> Currently, users could define `-DBUILD_TESTS=OFF` in the CMake build phase to skip tests and build libraries only. However, after changes of this PR, the build will fail because it added an extra dependency (GTest) to `lib/` subdirectory.
>
> I think you can find an alternative way of `FRIEND_TEST` or use a conditional macro to hide the gtest codes under `lib/`. Though you can also just add the GTest dependency in CMakeLists.txt, it's not recommended because the source code without tests should not depend on GTest.
How about add Gtest header `gtest/gtest_prod.h` to dir `pulsar-client-cpp/include`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754681663
> why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages at first timeout.
>
> https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
I think It's just a mistake. I guess the original author intended to do:
```c++
int blankPartitions = (timeoutMs_ / tickDurationInMs_) + ((timeoutMs_ % tickDurationInMs_ == 0) ? 0 : 1);
for (int i = 0; i < blankPartitions; i++) {
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
@BewareMyPower Is it necessary to reset the batchIndex of `MessageId` when tracking a message . Because only the ack of the last message in batchMessage will be removed from `UnAckedMessageTrackerEnabled`
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/ConsumerImpl.cc#L808-L817
But the param `msgId` of add `UnAckedMessageTrackerEnabled#add` and `UnAckedMessageTrackerEnabled#remove` may contain batchIndex
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L93-L102
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L109-L118
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754471239
https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
I will submit another pr to deal with this problem later.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754464346
@BewareMyPower Test cases have been added, and the test cases use gtest to access private member variables. I don’t know if this is appropriate.
Help review it, 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754535801
@saosir I'm also not sure why it's the default routing mode. It could make pulsar beginners confused like I've experienced before. But considering the change of default behavior may affect existed applications, I'd like to keep it as default.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
sijie commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754114693
@BewareMyPower Can you review this PR again?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754573152
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755115344
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754471239
https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir removed a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir removed a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-755035183
> > why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages at first timeout.
> > https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
>
> I think It's just a mistake. I guess the original author intended to do:
>
> ```c++
> int blankPartitions = (timeoutMs_ / tickDurationInMs_) + ((timeoutMs_ % tickDurationInMs_ == 0) ? 0 : 1);
> for (int i = 0; i < blankPartitions; i++) {
> ```
see #9134
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir removed a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir removed a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751914484
ok
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751914484
ok
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754486867
> The code itself looks good to me. However, introducing `FRIEND_TEST` to code under `lib/` is not a good way.
>
> Currently, users could define `-DBUILD_TESTS=OFF` in the CMake build phase to skip tests and build libraries only. However, after changes of this PR, the build will fail because it added an extra dependency (GTest) to `lib/` subdirectory.
>
> I think you can find an alternative way of `FRIEND_TEST` or use a conditional macro to hide the gtest codes under `lib/`. Though you can also just add the GTest dependency in CMakeLists.txt, it's not recommended because the source code without tests should not depend on GTest.
How about add Gtest header 'gtest/gtest_prod.h' to dir `pulsar-client-cpp/include`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754663469
why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages at first timeout.
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754466194
@saosir It's not a problem to access private members in tests. I'll take a look.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754589173
@saosir You can add this file to `pom.xml`'s excludes:
```xml
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<configuration>
<licenseSets>
<licenseSet>
<header>${pulsar.basedir}/src/license-header.txt</header>
<excludes>
<!-- TODO: add it 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754663469
why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send redelivery messages
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
@BewareMyPower Is it necessary to reset the batchIndex of `MessageId` when tracking a message . Because only the ack of the last message in batchMessage will be removed from `UnAckedMessageTrackerEnabled`
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/ConsumerImpl.cc#L808-L817
But the param `msgId` of add `UnAckedMessageTrackerEnabled#add` may contain batchIndex
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L93-L102
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir removed a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir removed a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754573152
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] BewareMyPower commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754503462
> How about add Gtest header `gtest/gtest_prod.h` to dir `pulsar-client-cpp/include`
Yeah, it's a simple and good solution.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir commented on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754586753
> > How about add Gtest header `gtest/gtest_prod.h` to dir `pulsar-client-cpp/include`
>
> Yeah, it's a simple and good solution.
CI will check license header, but `gtest/gtest_prod.h` contain google license cause it fail.
> Failed to execute goal com.mycila:license-maven-plugin:4.0.rc2:check (default) on project pulsar: Some files do not have the expected license header
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] saosir edited a comment on pull request #9072: [C++] Fix Consumer send redeliverMessages repeatedly
Posted by GitBox <gi...@apache.org>.
saosir edited a comment on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-751923349
Is it necessary to reset the batchIndex of `MessageId` when tracking a message . Because only the ack of the last message in batchMessage will be removed from `UnAckedMessageTrackerEnabled`
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/ConsumerImpl.cc#L808-L817
But the param `msgId` of add `UnAckedMessageTrackerEnabled#add` and `UnAckedMessageTrackerEnabled#remove` may contain batchIndex
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L93-L102
https://github.com/apache/pulsar/blob/b09c0d7ef077c9f284023d5213f4d16f8847550c/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L109-L118
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org