You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michael Han (JIRA)" <ji...@apache.org> on 2018/08/22 23:33:00 UTC

[jira] [Comment Edited] (ZOOKEEPER-3124) Remove special logic to handle cversion and pzxid in DataTree.processTxn

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

Michael Han edited comment on ZOOKEEPER-3124 at 8/22/18 11:32 PM:
------------------------------------------------------------------

[~lvfangmin] That code was actually added ZOOKEEPER-1046. I think it fixes the issue of incorrect cversion of parent caused by deleting some of its children after taking snapshot (so the deleted nodes never made into the snapshot which caused problems later while replying tx logs); rather than adding children after snapshot is serialized. [~fournc] had a [detailed analysis|https://issues.apache.org/jira/browse/ZOOKEEPER-1046?focusedCommentId=13020441&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-13020441] on this. Does that make sense for you?

 

The comment in the path that finally landed sounds confusing to me as well.

ZOOKEEPER-1269  just moved the same code from one place to the other.


was (Author: hanm):
[~lvfangmin] That code was actually added ZOOKEEPER-1046. I think it fixes the issue of incorrect cversion of parent caused by deleting some of its children after taking snapshot (so the deleted nodes never made into the snapshot which caused problems later while replying tx logs); rather than adding children after snapshot is serialized. [~fournc] had a detailed analysis on this. Does that make sense for you?

 

The comment in the path that finally landed sounds confusing to me as well.

ZOOKEEPER-1269  just moved the same code from one place to the other.

> Remove special logic to handle cversion and pzxid in DataTree.processTxn
> ------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3124
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3124
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Fangmin Lv
>            Assignee: Fangmin Lv
>            Priority: Major
>             Fix For: 3.6.0
>
>
> There is special logic in the DataTree.processTxn to handle the NODEEXISTS when createNode, which is used to handle the cversion and pzxid not being updated due to fuzzy snapshot: 
> https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/server/DataTree.java#L962-L994. 
> But is this a real issue, or is it still an issue for now?
> In the current code, when serializing a parent node, we'll lock on it, and take a children snapshot at that time. If the child added after the parent is serialized to disk, then it won't be written out, so we shouldn't hit the issue where the child is in the snapshot but parent cversion and pzxid is not changed.
>  
>  
> I checked the JIRA ZOOKEEPER-1269 which added this code, it won't hit this issue as well, I'm not sure why we added this, am I missing anything? Can we just get rid of it?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)