Skip to content

Adding more permits debug statements to better diagnose permit issues - #10217

Merged
eolivelli merged 1 commit into
apache:masterfrom
devinbost:permits-logging
Apr 19, 2021
Merged

Adding more permits debug statements to better diagnose permit issues#10217
eolivelli merged 1 commit into
apache:masterfrom
devinbost:permits-logging

Conversation

@devinbost

Copy link
Copy Markdown
Contributor

This PR just adds debug statements whenever the broker updates its permits in broker.service.Consumer and in PersistentDispatcherMultipleConsumers. It also adds batch sizes to some of the debug log statements.
That will help with the forensic analysis of problematic permit behavior.

@devinbost

Copy link
Copy Markdown
Contributor Author

@merlimat @eolivelli Since it's not easy to get debug logs from functions due to #3259, I added more logs to the broker instead.

@sijie sijie added this to the 2.8.0 milestone Apr 13, 2021
@sijie sijie added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 13, 2021
@merlimat

Copy link
Copy Markdown
Contributor

@devinbost There are few checkstyle violations reported in the CI jobs:

Error:  src/main/java/org/apache/pulsar/broker/service/PulsarCommandSenderImpl.java:[254] (sizes) LineLength: Line is longer than 120 characters (found 130).
5726
Error:  src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:[189,119] (whitespace) OperatorWrap: '+' should be on a new line.
5727
Error:  src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:[212,104] (whitespace) OperatorWrap: '+' should be on a new line.
5728
Error:  src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:[496,98] (whitespace) OperatorWrap: '+' should be on a new line.
5729
Error:  src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:[529,17] (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
5730
Error:  src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:[530,106] (whitespace) OperatorWrap: '+' should be on a new line.
5731
Error:  src/main/java/org/apache/pulsar/broker/service/Consumer.java:[239,21] (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
5732
Error:  src/main/java/org/apache/pulsar/broker/service/Consumer.java:[240,109] (whitespace) OperatorWrap: '+' should be on a new line.
5733
Error:  src/main/java/org/apache/pulsar/broker/service/Consumer.java:[257,9] (whitespace) WhitespaceAround: 'if' is not followed by whitespace.
5734
Error:  src/main/java/org/apache/pulsar/broker/service/Consumer.java:[258,114] (whitespace) OperatorWrap: '+' should be on a new line.
5735
Error:  src/main/java/org/apache/pulsar/broker/service/Consumer.java:[531,117] (whitespace) OperatorWrap: '+' should be on a new line.

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

Comment thread docker/build.sh Outdated
@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

2 similar comments
@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eolivelli

Copy link
Copy Markdown
Contributor

/pulsarbot run-failure-checks

@eolivelli

Copy link
Copy Markdown
Contributor

@lhotari are you okay with this PR now ?
it looks like your comment has been addressed.

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@lhotari

lhotari commented Apr 17, 2021

Copy link
Copy Markdown
Member

/pulsarbot run-failure-checks

@devinbost please rebase your changes. The master branch contains fixes to CI issues.

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@devinbost

Copy link
Copy Markdown
Contributor Author

Looks like we missed a flaky test. @lhotari
org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest created 1 new threads
2021-04-17 20:21:28,701 - INFO - [main:FastThreadLocalCleanupListener@53] - Cleaning up FastThreadLocal thread local state.
Error: Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 382.475 s <<< FAILURE! - in TestSuite
Error: testGenericObjectSink(org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest) Time elapsed: 47.627 s <<< FAILURE!
java.lang.AssertionError: Sink was restarted, probably an error occurred expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertTrue(Assert.java:45)
at org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest.testGenericObjectSink(PulsarGenericObjectSinkTest.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

[INFO]
[INFO] Results:
[INFO]
Error: Failures:
Error: org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest.testGenericObjectSink(org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest)
[INFO] Run 1: PASS
Error: Run 2: PulsarGenericObjectSinkTest.testGenericObjectSink:142 Sink was restarted, probably an error occurred expected [true] but found [false]

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

3 similar comments
@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@devinbost

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@eolivelli
eolivelli merged commit a66dd5d into apache:master Apr 19, 2021
@eolivelli

Copy link
Copy Markdown
Contributor

I am trying to cherry pick to branch-7.2 and see if it builds properly

@eolivelli eolivelli added cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.2 labels Apr 19, 2021
eolivelli pushed a commit that referenced this pull request Apr 19, 2021
@eolivelli

Copy link
Copy Markdown
Contributor

@devinbost picked to branch-2.7 as c243d18

@lhotari

lhotari commented Apr 19, 2021

Copy link
Copy Markdown
Member

Looks like we missed a flaky test. @lhotari
org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest created 1 new threads
2021-04-17 20:21:28,701 - INFO - [main:FastThreadLocalCleanupListener@53] - Cleaning up FastThreadLocal thread local state.
Error: Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 382.475 s <<< FAILURE! - in TestSuite
Error: testGenericObjectSink(org.apache.pulsar.tests.integration.io.PulsarGenericObjectSinkTest) Time elapsed: 47.627 s <<< FAILURE!
java.lang.AssertionError: Sink was restarted, probably an error occurred expected [true] but found [false]

@devinbost this is fixed in #10248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.2 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants