[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-28 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-828642579 Not needed since #10413 was merged. -- 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

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-27 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-828148394 I opened a separate PR #10413 to make the `readMoreEntries` method `synchronized`. -- This is an automated message from the Apache Git Service. To respond to the message, ple

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-27 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-828134630 Another location where the `readEntries` call is explicitly wrapped in a synchronized block https://github.com/apache/pulsar/blob/875262a0ae2fba82a6dd7d46dd2467d675b0d9c3/pu

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-27 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-828120292 Currently PersistentStreamingDispatcherMultipleConsumers.readMoreEntries method isn't synchronized: https://github.com/apache/pulsar/blob/f2d72c9fc13a33df584ec1bd96a4c14

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-09 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-816852652 I'm closing this PR since as @merlimat pointed out, all mutations are already safe since they are done in `synchronized` methods in `PersistentDispatcherMultipleConsumers` clas

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-09 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-816738791 /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 th

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-09 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-816658084 /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 th

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-09 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-816656107 btw. This problem was only in the `PersistentDispatcherMultipleConsumers` class. Similar code in `NonPersistentDispatcherMultipleConsumers` didn't have the issue: https://gith

[GitHub] [pulsar] lhotari commented on pull request #10180: Use AtomicIntegerFieldUpdater to mutate volatile int totalAvailablePermits in PersistentDispatcherMultipleConsumers class

2021-04-09 Thread GitBox
lhotari commented on pull request #10180: URL: https://github.com/apache/pulsar/pull/10180#issuecomment-816611708 This PR was co-authored with @devinbost . Thanks for @devinbost for pinpointing the code location around `totalAvailablePermits` in `PersistentDispatcherMultipleConsumers` clas