Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 5676][C++ client] Expose redelivery count #5677

Merged
merged 11 commits into from
Nov 22, 2019

Conversation

frejonb
Copy link
Contributor

@frejonb frejonb commented Nov 17, 2019

Fixes #5676

Motivation

Expose the redelivery count in the C++ client.

Modifications

Exposed the redelivery count from the broker in Message and MessageImpl. Set the counter when receiving messages. Added test.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added test to check the counter increases on NAck

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): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: don't know

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? not documented yet
  • 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

@jiazhai
Copy link
Member

jiazhai commented Nov 19, 2019

retest this please

@merlimat
Copy link
Contributor

run java8 tests
run cpp tests

@frejonb
Copy link
Contributor Author

frejonb commented Nov 19, 2019

@merlimat is there a way to debug why Jenkins is breaking at testPartitionedReceiveAsyncFailedConsumer? it works on my machine ™.

@codelipenghui
Copy link
Contributor

run cpp tests

@merlimat
Copy link
Contributor

is there a way to debug why Jenkins is breaking at testPartitionedReceiveAsyncFailedConsumer? it works on my machine ™.

Running the tests inside a Docker container (especially from MacOS) is a good way to slow it down make it similar to ASF Jenkins environment: pulsar-client-cpp/docker-tests.sh

@merlimat
Copy link
Contributor

@frejonb ^^

@codelipenghui
Copy link
Contributor

run cpp tests

@frejonb
Copy link
Contributor Author

frejonb commented Nov 20, 2019

@merlimat it looks like Jenkins is failing in different tests in the BasicEndToEnd suite. I tried running the tests in docker but I'm getting

➜  pulsar-client-cpp/docker-tests.sh
---- Testing Pulsar C++ client using image apachepulsar/pulsar-build:ubuntu-16.04 (type --help for more options)
ubuntu-16.04: Pulling from apachepulsar/pulsar-build
Digest: sha256:d03f66e312923a5e84936d92cfa0af6c95977e5cd4ecd4edb42aa808d543eeab
Status: Image is up to date for apachepulsar/pulsar-build:ubuntu-16.04
doing start standalone ...
starting standalone, logging to /tmp/pulsar-test-dist/logs/pulsar-standalone-c0edc72f1b2c.log
[AppClassLoader@18b4aac2] info AspectJ Weaver Version 1.9.2 built on Wednesday Oct 24, 2018 at 15:43:33 GMT
[AppClassLoader@18b4aac2] info register classloader sun.misc.Launcher$AppClassLoader@18b4aac2
[AppClassLoader@18b4aac2] info using configuration file:/tmp/pulsar-test-dist/lib/org.apache.pulsar-pulsar-zookeeper-utils-2.5.0-SNAPSHOT.jar!/META-INF/aop.xml
[AppClassLoader@18b4aac2] info using configuration file:/tmp/pulsar-test-dist/lib/org.apache.pulsar-pulsar-zookeeper-2.5.0-SNAPSHOT.jar!/META-INF/aop.xml
[AppClassLoader@18b4aac2] info register aspect org.apache.pulsar.broker.zookeeper.aspectj.ClientCnxnAspect
[AppClassLoader@18b4aac2] info register aspect org.apache.pulsar.zookeeper.FinalRequestProcessorAspect
[AppClassLoader@18b4aac2] info register aspect org.apache.pulsar.zookeeper.ZooKeeperServerAspect
-- Wait for Pulsar service to be ready
-- Pulsar service is ready -- Configure permissions
-- Ready to start tests
/pulsar/pulsar-client-cpp/tests /pulsar/pulsar-client-cpp
---- Run unit tests in parallel
Traceback (most recent call last):
  File "/gtest-parallel/gtest-parallel", line 18, in <module>
    sys.exit(gtest_parallel.main())
  File "/gtest-parallel/gtest_parallel.py", line 801, in main
    tasks = find_tests(binaries, additional_args, options, times)
  File "/gtest-parallel/gtest_parallel.py", line 582, in find_tests
    stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@sijie
Copy link
Member

sijie commented Nov 20, 2019

run cpp tests

@jiazhai
Copy link
Member

jiazhai commented Nov 21, 2019

run cpp tests.

@sijie
Copy link
Member

sijie commented Nov 21, 2019

run cpp tests

@frejonb
Copy link
Contributor Author

frejonb commented Nov 22, 2019

@sijie I had to explicitly set subscriptionRedeliveryTrackerEnabled=true in order to get the redelivery counts. Could this be causing the issues? sadly I cannot do local testing since the docker container doesn't seem to be working #5677 (comment)

@frejonb
Copy link
Contributor Author

frejonb commented Nov 22, 2019

@sijie I managed to get docker tests running, I'll debug the problem.

@frejonb
Copy link
Contributor Author

frejonb commented Nov 22, 2019

run cpp tests

@frejonb
Copy link
Contributor Author

frejonb commented Nov 22, 2019

run integration tests

@sijie sijie merged commit a00791d into apache:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C++ client] Expose redelivery count
5 participants