Skip to content

[issues 5698]Handle replicator producer as generated name producer - #5701

Merged
jiazhai merged 3 commits into
apache:masterfrom
weishuisheng:issues-5698
Nov 21, 2019
Merged

jiazhai merged 3 commits into
apache:masterfrom
weishuisheng:issues-5698

Conversation

@weishuisheng

@weishuisheng weishuisheng commented Nov 19, 2019 •

Copy link
Copy Markdown
Contributor

Fixes #5698

Motivation

Since #5571 handle the generated producer name, the replicator producer was created by broker, only one producer for a replicated topic.

So, we can handle it simple by considered replicator producer as generated name producer.

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: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (yno)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

@codelipenghui codelipenghui 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.

Overall looks good to me, just left some comments about the code format

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.

seems 2 space here, please keep 1 space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

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.

add space before =, please also check other places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

@codelipenghui

Copy link
Copy Markdown
Contributor

run java8 tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Producer producer5= new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",
Producer producer5 = new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Producer producer6= new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",
Producer producer6 = new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Producer producer7= new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",
Producer producer7 = new Producer(topic, serverCnx, 2 /* producer id */, "pulsar.repl.cluster1",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return producer.isUserProvidedProducerName() && !producer.getProducerName().startsWith(replicatorPrefix);
return producer.isUserProvidedProducerName() && !producer.getProducerName().startsWith(replicatorPrefix);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

@codelipenghui

Copy link
Copy Markdown
Contributor

run java8 tests
run integration tests

@codelipenghui

Copy link
Copy Markdown
Contributor

run java8 tests

@codelipenghui

Copy link
Copy Markdown
Contributor

run integration tests

@jiazhai
jiazhai merged commit 39f37c9 into apache:master Nov 21, 2019
@sijie sijie modified the milestones: 2.4.3, 2.5.0 Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Geo replicator has ProducerBusyException

4 participants