[ 
https://issues.apache.org/jira/browse/HELIX-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16023466#comment-16023466
 ] 

ASF GitHub Bot commented on HELIX-657:
--------------------------------------

GitHub user jiajunwang opened a pull request:

    https://github.com/apache/helix/pull/95

    [HELIX-657] Fix unexpected idealstate overwrite when persist assignme…

    …nt is on.
    
    1. Change persist method from set to update in PersistAssignmentStage.
    The new updater only overwrites map and list fields that the controller 
will update during PersistAssignmentStage.
    All the other updates from other sources that are made during controller 
read and write will be kept, as long as those fields are not purposely updated 
by the controller.
    If current node does not exist, new updater return null.
    2. Update accessors who relies on updater to check new data before applying 
the change. If the returned new data is null, should skip updating or creating.
    
    Also, add a test case for PersistAssignmentStage to cover the change.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiajunwang/helix bugfix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/helix/pull/95.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #95
    
----
commit 091337c4249f37fd3235c9cf630a861a6abee557
Author: Jiajun Wang <[email protected]>
Date:   2017-05-24T01:02:24Z

    [HELIX-657] Fix unexpected idealstate overwrite when persist assignment is 
on.
    
    1. Change persist method from set to update in PersistAssignmentStage.
    The new updater only overwrites map and list fields that the controller 
will update during PersistAssignmentStage.
    All the other updates from other sources that are made during controller 
read and write will be kept, as long as those fields are not purposely updated 
by the controller.
    If current node does not exist, new updater return null.
    2. Update accessors who relies on updater to check new data before applying 
the change. If the returned new data is null, should skip updating or creating.
    
    Also, add a test case for PersistAssignmentStage to cover the change.

----


> Fix unexpected idealstate overwrite when persist assignment is on
> -----------------------------------------------------------------
>
>                 Key: HELIX-657
>                 URL: https://issues.apache.org/jira/browse/HELIX-657
>             Project: Apache Helix
>          Issue Type: Bug
>          Components: helix-core
>            Reporter: Jiajun Wang
>
> We have identified an issue that resource idealstate may be unexpectedly 
> overwritten when persist assignment is on.
> Basically, we are using "set" so any change made between reading and writing 
> will be over written.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to