Skip to content

[Java Client] Remove unnecessary stats incremement#12229

Merged
merlimat merged 1 commit intoapache:masterfrom
michaeljmarshall:cleanup-client-stats
Sep 30, 2021
Merged

[Java Client] Remove unnecessary stats incremement#12229
merlimat merged 1 commit intoapache:masterfrom
michaeljmarshall:cleanup-client-stats

Conversation

@michaeljmarshall
Copy link
Member

Motivation

The Java client currently increments a stat with the size of pending messages queue. This would make sense, except for the fact that the queue is cleared right before getting the size. Further, the stat in question is incremented within the failPendingMessages method, which is called right before the removed line.

Modifications

  • Remove the line stats.incrementSendFailed();, since it is unnecessary.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

This change does not affect any public behavior.

Documentation

No docs need updating.

@michaeljmarshall
Copy link
Member Author

/pulsarbot run-failure-checks

1 similar comment
@michaeljmarshall
Copy link
Member Author

/pulsarbot run-failure-checks

@michaeljmarshall
Copy link
Member Author

@merlimat @BewareMyPower - PTAL, thanks!

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

+1

@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Sep 30, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 30, 2021
@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Sep 30, 2021
@merlimat merlimat merged commit 9d30914 into apache:master Sep 30, 2021
@michaeljmarshall michaeljmarshall deleted the cleanup-client-stats branch January 8, 2022 02:53
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs release/2.9.0 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants