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

[feat] [broker] PIP-188: Support option to disconnect clients that not support cluster migration feature #20084

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Apr 13, 2023

Motivation

As discussed at PIP-188 and in PR #19605
In ordered to achieve cluster migration, all clients need to be upgraded to the version which handles cluster migration redirection. So, Broker can't complete migration if clients are not upgrade to the supported version. Therefore, it's really important to find out if any unsupported client is connected or don't allow any unsupported client to connect if we want to start the cluster migration process. Therefore, we will add a flag to allow the broker to reject all client connections which are initiated from unsupported clients. The broker will not allow connection from clients which don't support cluster migration redirection handling if the clientMinVersionAllowed broker flag is enabled.

Modifications

Add flag clientMinVersionAllowed to allow brokers to ocreate connections with only those clients that support cluster migration handling feature to avoid incomplete cluster migration process.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@rdhabalia rdhabalia added this to the 3.1.0 milestone Apr 13, 2023
@rdhabalia rdhabalia self-assigned this Apr 13, 2023
@rdhabalia rdhabalia added the doc-not-needed Your PR changes do not impact docs label Apr 13, 2023
@rdhabalia rdhabalia changed the title PIP-188: Support option to disconnect clients that not support cluster migration feature [feat] [broker] PIP-188: Support option to disconnect clients that not support cluster migration feature Apr 13, 2023
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label May 14, 2023
@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Jul 31, 2023
@zzzming
Copy link
Contributor

zzzming commented Sep 18, 2023

@eolivelli This PR is needed for client proto version enforcement

@github-actions github-actions bot removed the Stale label Sep 19, 2023
Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

Overall, looks good. Two minor comments.

+ "might be required by broker to apply globally on all topics."
+ "(eg: all clients must be on V20 to perform cloud migration)"
)
private int clientMinVersionAllowed = -1;
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to add proto or protocol to the name to disambiguate it from the library version?

doc = "Minimum client version allowed by broker else broker will reject connection."
+ "(It's useful when client lib doesn't support specific feature and feature "
+ "might be required by broker to apply globally on all topics."
+ "(eg: all clients must be on V20 to perform cloud migration)"
Copy link
Member

Choose a reason for hiding this comment

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

Since it's an int, should we just say 20, not V20?

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

I have left a minor suggestion

log.info("[{}] client with version {} must be upgraded to {}", remoteAddress, clientProtoVersion,
clientMinVersionAllowed);
final ByteBuf msg = Commands.newError(-1, ServerError.UnsupportedVersionError,
"Upgrade version to " + clientMinVersionAllowed + " or higher");
Copy link
Contributor

Choose a reason for hiding this comment

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

What about 'upgrade your client to a version that supports protocol version ...'
Otherwise it seems that you have to upgrade to Pulsar 20

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Oct 20, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
@lhotari lhotari removed this from the 4.1.0 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants