Skip to content

[Issue 10046] Update chuckedMessageRate to chunkedMessageRate without breaking public api - #10223

Merged
codelipenghui merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-chuck-to-chunk-typo
Apr 15, 2021
Merged

[Issue 10046] Update chuckedMessageRate to chunkedMessageRate without breaking public api#10223
codelipenghui merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-chuck-to-chunk-typo

Conversation

@michaeljmarshall

@michaeljmarshall michaeljmarshall commented Apr 14, 2021

Copy link
Copy Markdown
Member

Fixes #10046

Motivation

As described in #10046, there is a typo where chuck is used instead of chunk in several locations, including in the public API. This PR fixes that typo without introducing any breaking changes. Instead, it adds some new methods while deprecating ones that contain typos.

Modifications

  1. Update several internal pulsar references. Given that these are private, there is no need to worry about breaking changes.
  2. Update ConsumerBuilder interface by first deprecating the maxPendingChuckedMessage method and adding the maxPendingChunkedMessage method. We'll need to choose when to actually remove the deprecated method.
  3. Update SubscriptionStats to return both chuckedMessageRate and chunkedMessageRate. Given that this POJO is sent as JSON, the only way to give users the chance to transition is to deliver both fields.
  4. Update ConsumerStats to return both chuckedMessageRate and chunkedMessageRate. Given that this POJO is sent as JSON, the only way to give users the chance to transition is to deliver both fields.
  5. Update ConsumerConfigurationData by changing the private variable from maxPendingChuckedMessage to maxPendingChunkedMessage. Then, add the previously generated getter and setter for maxPendingChuckedMessage that actually update maxPendingChunkedMessage.

Verifying this change

I updated several tests but didn't add any. I'm not sure what the protocol is for these types of changes. The public API is not changing, and in the case of deprecated methods, any affected tests are updated to use the new methods.

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: yes
  • 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: no

The changes to the public API are only additive.

Documentation

There is updated documentation associated with this change. If we want to merge this change to the 2.7 branch, we'll want to update that documentation as well.

@michaeljmarshall michaeljmarshall changed the title [Issue 10050] Update chuckedMessageRate to chunkedMessageRate without breaking public api [Issue 10046] Update chuckedMessageRate to chunkedMessageRate without breaking public api Apr 14, 2021
@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 14, 2021
@merlimat merlimat added this to the 2.8.0 milestone Apr 14, 2021
@michaeljmarshall
michaeljmarshall force-pushed the fix-chuck-to-chunk-typo branch from 7ba748e to bae81ef Compare April 15, 2021 06:25
@michaeljmarshall

Copy link
Copy Markdown
Member Author

Needed to rebase to resolve conflicts. Only updated the pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageChunkingTest.java file.

@codelipenghui
codelipenghui merged commit ef9f300 into apache:master Apr 15, 2021
codelipenghui pushed a commit that referenced this pull request Apr 19, 2021
…ngChunkedMessage (#10253)

In #10223, I fixed many references to `chuck` that should have been `chunk`. I missed one documentation reference. This PR fixes that.

(Note that the old 2.6.x and 2.7.x documentation still reference `chuck` because that is what the java client's API uses. Moving forward, we will use `chunk`, as #10223 demonstrates.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[Question] chuckedMessageRate vs chunkedMessageRate - Is chucked a typo?

3 participants