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

Fix NPE for task when global domain disabled #3228

Merged
merged 2 commits into from
May 1, 2020
Merged

Fix NPE for task when global domain disabled #3228

merged 2 commits into from
May 1, 2020

Conversation

vancexu
Copy link
Contributor

@vancexu vancexu commented Apr 30, 2020

What changed?
Fix NPE

Why?
Came into this NPE while testing on staging.
This NPE happens when config clusterMetadata set enableGlobalDomain to false.

How did you test it?
staging test

Potential risks
no

@vancexu vancexu requested a review from yux0 April 30, 2020 21:44
@@ -2695,7 +2695,7 @@ func (e *historyEngineImpl) NotifyNewReplicationTasks(
tasks []persistence.Task,
) {

if len(tasks) > 0 {
if len(tasks) > 0 && e.replicatorProcessor != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be a bug is the processor is nil?

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is this processor always set when engine initializes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

only set when global domain is enabled. notify replication for non-global cluster is the bug, processor being nil is not a bug.

@vancexu vancexu merged commit 2082e05 into master May 1, 2020
@vancexu vancexu deleted the fixrepnil branch May 1, 2020 18:51
mkolodezny pushed a commit to mkolodezny/cadence that referenced this pull request May 11, 2020
yux0 pushed a commit to yux0/cadence that referenced this pull request May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants