[pulsar-broker] Fix response when set offload policies#6951
Merged
codelipenghui merged 1 commit intoapache:masterfrom May 19, 2020
Merged
[pulsar-broker] Fix response when set offload policies#6951codelipenghui merged 1 commit intoapache:masterfrom
codelipenghui merged 1 commit intoapache:masterfrom
Conversation
Contributor
Author
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
May 14, 2020
Contributor
codelipenghui
left a comment
There was a problem hiding this comment.
Looks good to me. Just left a minor comment.
|
|
||
| policies.offload_policies = offloadPolicies; | ||
| String updatedOffloadPolicies = jsonMapper().writeValueAsString(policies.offload_policies); | ||
| globalZk().setData(path, jsonMapper().writeValueAsBytes(policies), nodeStat.getVersion(), |
Contributor
There was a problem hiding this comment.
Suggested change
| globalZk().setData(path, jsonMapper().writeValueAsBytes(policies), nodeStat.getVersion(), | |
| globalZk().setData(path, updatedOffloadPolicies, nodeStat.getVersion(), |
Contributor
Author
There was a problem hiding this comment.
Thanks, the variable updatedOffloadPolicies here is just used to print logs and byte [] policies is written to znode.
Contributor
Author
|
/pulsarbot run-failure-checks |
sijie
approved these changes
May 18, 2020
jiazhai
approved these changes
May 19, 2020
Member
|
/pulsarbot run-failure-checks |
nicolo-paganin
pushed a commit
to oncodeit/pulsar
that referenced
this pull request
May 22, 2020
### Motivation The response should be completed in the zookeeper callback when calling `setData()` asynchronously in `internalSetOffloadPolicies`, otherwise it will always return success. ### Modifications Complete `internalSetOffloadPolicies` response in the zookeeper callback.
nicolo-paganin
pushed a commit
to oncodeit/pulsar
that referenced
this pull request
May 22, 2020
### Motivation The response should be completed in the zookeeper callback when calling `setData()` asynchronously in `internalSetOffloadPolicies`, otherwise it will always return success. ### Modifications Complete `internalSetOffloadPolicies` response in the zookeeper callback.
cdbartholomew
pushed a commit
to kafkaesque-io/pulsar
that referenced
this pull request
May 23, 2020
### Motivation The response should be completed in the zookeeper callback when calling `setData()` asynchronously in `internalSetOffloadPolicies`, otherwise it will always return success. ### Modifications Complete `internalSetOffloadPolicies` response in the zookeeper callback.
cdbartholomew
added a commit
to kafkaesque-io/pulsar
that referenced
this pull request
May 25, 2020
This reverts commit 7620238.
Huanli-Meng
pushed a commit
to Huanli-Meng/pulsar
that referenced
this pull request
May 27, 2020
### Motivation The response should be completed in the zookeeper callback when calling `setData()` asynchronously in `internalSetOffloadPolicies`, otherwise it will always return success. ### Modifications Complete `internalSetOffloadPolicies` response in the zookeeper callback.
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
### Motivation The response should be completed in the zookeeper callback when calling `setData()` asynchronously in `internalSetOffloadPolicies`, otherwise it will always return success. ### Modifications Complete `internalSetOffloadPolicies` response in the zookeeper callback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The response should be completed in the zookeeper callback when calling
setData()asynchronously ininternalSetOffloadPolicies, otherwise it will always return success.Modifications
Complete
internalSetOffloadPoliciesresponse in the zookeeper callback.