fixed a race condition caused by the code in zookeeper_process() and free_completions() setting sc->complete to 1 without synchronization; fixed zoo_get() not updating buffer_len value with the actuall buffer length on return; added missing enter_critical/leave_critical calls to the async ZK operations.
fixed a race condition caused by the code in zookeeper_process() and free_completions() setting sc->complete to 1 without synchronization; fixed zoo_get() not updating buffer_len value with the actuall buffer length on return; added missing enter_critical/leave_critical calls to the async ZK operations.

git-svn-id: 488b3bf40f260ac8d5bff5f7b2d8e19ee7724ae8@670876 13f79535-47bb-0310-9956-ffa450edef68

mapr/zookeeper,Randgalt/zookeeper,dongming/zookeeper,freezhan/zookeeper,fengjingchao/zookeeper,ch3lo/zookeeper,zhuochenKIDD/zookeeper,tausten/zookeeper,ch3lo/zookeeper,leonardofoderaro/zookeeper,ouyangkongtong/zookeeper,breed/zookeeper,AkihiroSuda/zookeeper,Ormod/zookeeper,mapr/zookeeper,isdom/zookeeper,Tony-Zhang03/zookeeper,mapr/zookeeper,leesir/zookeeper,p2y/zookeeper,ch3lo/zookeeper,airtimemedia/zookeeper,tausten/zookeeper,rakeshadr/zk-branch-3.4,jango2015/zookeeper,chaozh/zookeeper,zhuochenKIDD/zookeeper,zhuochenKIDD/zookeeper,sanjeevtripurari/zookeeper,cnauroth/zookeeper,softliumin/zookeeper,CliffYuan/zookeeper,aeternallife/zookeeper,Ormod/zookeeper,breed/zookeeper,chaozh/zookeeper,apurtell/zookeeper,intel-hadoop/zookeeper-rhino,AkihiroSuda/zookeeper,xujianhai/zookeeper,Giten2004/zookeeper,mlc0202/zookeeper,Giten2004/zookeeper,gigold/zookeeper,anchel/zookeeper,ewhauser/zookeeper,rkhmelichek/zookeeper,JaredDuCode/zookeeper,rakeshadr/ZooKeeper,rakeshadr/ZooKeeper,Tony-Zhang03/zookeeper,cnauroth/zookeeper,QuickClaim/Services,racker/zookeeper,pengweiqhca/zookeeper,rahulkurup/Apache-Zookeeper,xujianhai/zookeeper,crtynes/zookeeper,Anvil/zookeeper,airtimemedia/zookeeper,JaredDuCode/zookeeper,SuperLong1210/zookeeper-1,zhuochenKIDD/zookeeper,SuperLong1210/zookeeper-1,aeternallife/zookeeper,mlc0202/zookeeper,rakeshadr/zookeeper-1,isdom/zookeeper,CliffYuan/zookeeper,intel-hadoop/zookeeper-rhino,pingpangkuangmo/zookeeper,freezhan/zookeeper,rahulkurup/Apache-Zookeeper,Anvil/zookeeper,ouyangjie/zookeeper,airtimemedia/zookeeper,xiaosl/zookeeper,Ormod/zookeeper,gigold/zookeeper,xujianhai/zookeeper,rgs1/zookeeper,crtynes/zookeeper,rahulkurup/Apache-Zookeeper,Giten2004/zookeeper,dongming/zookeeper,fengjingchao/zookeeper,rahulkurup/Apache-Zookeeper,rgs1/zookeeper,rkhmelichek/zookeeper,arijitvt/zookeeper,softliumin/zookeeper,jango2015/zookeeper,xujianhai/zookeeper,mlc0202/zookeeper,airtimemedia/zookeeper,rgs1/zookeeper,SuperLong1210/zookeeper-1,mlizhenbin/zookeeper,arijitvt/zookeeper,Ormod/zookeeper,leesir/zookeeper,fengjingchao/zookeeper,tausten/zookeeper,alibaba/zookeeper,cnauroth/zookeeper,intel-hadoop/zookeeper-rhino,nashuiliang/zookeeper,tausten/zookeeper,rakeshadr/zk-branch-3.4,softliumin/zookeeper,cnauroth/zookeeper,Giten2004/zookeeper,Ormod/zookeeper,cloudera/zookeeper,fengjingchao/zookeeper,isdom/zookeeper,mikeqian/zookeeper,ewhauser/zookeeper,ouyangjie/zookeeper,mlizhenbin/zookeeper,pengweiqhca/zookeeper,racker/zookeeper,Anvil/zookeeper,dongming/zookeeper,zhuochenKIDD/zookeeper,ouyangkongtong/zookeeper,rahulkurup/zookeeper,ouyangkongtong/zookeeper,leonardofoderaro/zookeeper,chaozh/zookeeper,Giten2004/zookeeper,intel-hadoop/zookeeper-rhino,rahulkurup/Apache-Zookeeper,yhj630520/zookeeper,rahulkurup/zookeeper,SuperLong1210/zookeeper-1,mlizhenbin/zookeeper,mlizhenbin/zookeeper,ouyangjie/zookeeper,mikeqian/zookeeper,mikeqian/zookeeper,sanjeevtripurari/zookeeper,chaozh/zookeeper,dockmob/zookeeper,pengweiqhca/zookeeper,rakeshadr/zookeeper-1,dongming/zookeeper,mlizhenbin/zookeeper,myhongkongzhen/zookeeper,anchel/zookeeper,xiaosl/zookeeper,likaiwalkman/zookeeper,mlc0202/zookeeper,hongchaodeng/zookeeper,leonardofoderaro/zookeeper,cnauroth/zookeeper,alibaba/zookeeper,leesir/zookeeper,crtynes/zookeeper,Randgalt/zookeeper,apurtell/zookeeper,intel-hadoop/zookeeper-rhino,likaiwalkman/zookeeper,CliffYuan/zookeeper,mapr/zookeeper,osrg/zookeeper,rahulkurup/Apache-Zookeeper,hongchaodeng/zookeeper,tausten/zookeeper,aeternallife/zookeeper,QuickClaim/Services,myhongkongzhen/zookeeper,dockmob/zookeeper,QuickClaim/Services,Randgalt/zookeeper,shayhatsor/zookeeper,mlc0202/zookeeper,CliffYuan/zookeeper,rahulkurup/Apache-Zookeeper,pingpangkuangmo/zookeeper,AkihiroSuda/zookeeper,crtynes/zookeeper,Tony-Zhang03/zookeeper,mikeqian/zookeeper,chaozh/zookeeper,likaiwalkman/zookeeper,xiaosl/zookeeper,mapr/zookeeper,aeternallife/zookeeper,xujianhai/zookeeper,leesir/zookeeper,tausten/zookeeper,yhj630520/zookeeper,aeternallife/zookeeper,dongming/zookeeper,rakeshadr/zookeeper-1,zhuochenKIDD/zookeeper,pengweiqhca/zookeeper,fengjingchao/zookeeper,Tony-Zhang03/zookeeper,freezhan/zookeeper,JaredDuCode/zookeeper,kmiku7/zookeeper,likaiwalkman/zookeeper,apurtell/zookeeper,Ormod/zookeeper,intel-hadoop/zookeeper-rhino,osrg/zookeeper,jango2015/zookeeper,arijitvt/zookeeper,kmiku7/zookeeper,Anvil/zookeeper,hongchaodeng/zookeeper,rakeshadr/ZooKeeper,anchel/zookeeper,williamsbdev/zookeeper,softliumin/zookeeper,nashuiliang/zookeeper,ExactTargetDev/zookeeper,freezhan/zookeeper,rakeshadr/ZooKeeper,xiaosl/zookeeper,osrg/zookeeper,Randgalt/zookeeper,freezhan/zookeeper,fengjingchao/zookeeper,JaredDuCode/zookeeper,alibaba/zookeeper,breed/zookeeper,isdom/zookeeper,apurtell/zookeeper,wangcan2014/zookeeper,isdom/zookeeper,breed/zookeeper,nashuiliang/zookeeper,ExactTargetDev/zookeeper,likaiwalkman/zookeeper,ouyangjie/zookeeper,rakeshadr/ZooKeeper,dockmob/zookeeper,rakeshadr/zk-branch-3.4,SuperLong1210/zookeeper-1,chaozh/zookeeper,gigold/zookeeper,rahulkurup/zookeeper,ouyangjie/zookeeper,hongchaodeng/zookeeper,fengjingchao/zookeeper,p2y/zookeeper,QuickClaim/Services,jango2015/zookeeper,mlc0202/zookeeper,cloudera/zookeeper,ouyangkongtong/zookeeper,Giten2004/zookeeper,JaredDuCode/zookeeper,nashuiliang/zookeeper,rkhmelichek/zookeeper,racker/zookeeper,airtimemedia/zookeeper,dockmob/zookeeper,Randgalt/zookeeper,mikeqian/zookeeper,williamsbdev/zookeeper,osrg/zookeeper,Ormod/zookeeper,arijitvt/zookeeper,jango2015/zookeeper,alibaba/zookeeper,xiaosl/zookeeper,gigold/zookeeper,Ormod/zookeeper,jango2015/zookeeper,CliffYuan/zookeeper,Randgalt/zookeeper,rkhmelichek/zookeeper,p2y/zookeeper,ouyangkongtong/zookeeper,ewhauser/zookeeper,kmiku7/zookeeper,ewhauser/zookeeper,myhongkongzhen/zookeeper,ouyangjie/zookeeper,Tony-Zhang03/zookeeper,AkihiroSuda/zookeeper,rakeshadr/zookeeper-1,gigold/zookeeper,softliumin/zookeeper,cnauroth/zookeeper,ewhauser/zookeeper,anchel/zookeeper,Anvil/zookeeper,Giten2004/zookeeper,rgs1/zookeeper,rakeshadr/ZooKeeper,anchel/zookeeper,tausten/zookeeper,rahulkurup/zookeeper,JaredDuCode/zookeeper,leonardofoderaro/zookeeper,zhuochenKIDD/zookeeper,ewhauser/zookeeper,AkihiroSuda/zookeeper,anchel/zookeeper,Tony-Zhang03/zookeeper,rakeshadr/ZooKeeper,ouyangjie/zookeeper,myhongkongzhen/zookeeper,xujianhai/zookeeper,ouyangjie/zookeeper,sanjeevtripurari/zookeeper,leesir/zookeeper,rakeshadr/zk-branch-3.4,rahulkurup/zookeeper,ch3lo/zookeeper,xujianhai/zookeeper,wangcan2014/zookeeper,CliffYuan/zookeeper,hongchaodeng/zookeeper,dockmob/zookeeper,isdom/zookeeper,softliumin/zookeeper,crtynes/zookeeper,chaozh/zookeeper,myhongkongzhen/zookeeper,shayhatsor/zookeeper,Randgalt/zookeeper,Giten2004/zookeeper,ouyangkongtong/zookeeper,pingpangkuangmo/zookeeper,racker/zookeeper,aeternallife/zookeeper,yhj630520/zookeeper,SuperLong1210/zookeeper-1,sanjeevtripurari/zookeeper,breed/zookeeper,p2y/zookeeper,xiaosl/zookeeper,ch3lo/zookeeper,rahulkurup/zookeeper,mapr/zookeeper,freezhan/zookeeper,tausten/zookeeper,SuperLong1210/zookeeper-1,mikeqian/zookeeper,dockmob/zookeeper,leonardofoderaro/zookeeper,apurtell/zookeeper,kmiku7/zookeeper,jango2015/zookeeper,pingpangkuangmo/zookeeper,JaredDuCode/zookeeper,ExactTargetDev/zookeeper,likaiwalkman/zookeeper,williamsbdev/zookeeper,racker/zookeeper,wangcan2014/zookeeper,rgs1/zookeeper,ouyangkongtong/zookeeper,arijitvt/zookeeper,leonardofoderaro/zookeeper,shayhatsor/zookeeper,wangcan2014/zookeeper,Anvil/zookeeper,osrg/zookeeper,shayhatsor/zookeeper,fengjingchao/zookeeper,QuickClaim/Services,Randgalt/zookeeper,crtynes/zookeeper,shayhatsor/zookeeper,rakeshadr/ZooKeeper,wangcan2014/zookeeper,p2y/zookeeper,xiaosl/zookeeper,airtimemedia/zookeeper,tausten/zookeeper,anchel/zookeeper,rahulkurup/zookeeper,hongchaodeng/zookeeper,CliffYuan/zookeeper,alibaba/zookeeper,mapr/zookeeper,rgs1/zookeeper,freezhan/zookeeper,Anvil/zookeeper,pengweiqhca/zookeeper,Anvil/zookeeper,pingpangkuangmo/zookeeper,ch3lo/zookeeper,QuickClaim/Services,pingpangkuangmo/zookeeper,rakeshadr/zk-branch-3.4,mlizhenbin/zookeeper,rgs1/zookeeper,williamsbdev/zookeeper,Giten2004/zookeeper,yhj630520/zookeeper,xujianhai/zookeeper,ExactTargetDev/zookeeper,apurtell/zookeeper,softliumin/zookeeper,Randgalt/zookeeper,osrg/zookeeper,aeternallife/zookeeper,shayhatsor/zookeeper,pingpangkuangmo/zookeeper,kmiku7/zookeeper,xujianhai/zookeeper,gigold/zookeeper,isdom/zookeeper,AkihiroSuda/zookeeper,kmiku7/zookeeper,mikeqian/zookeeper,yhj630520/zookeeper,mapr/zookeeper,isdom/zookeeper,ExactTargetDev/zookeeper,sanjeevtripurari/zookeeper,mlc0202/zookeeper,rkhmelichek/zookeeper,rakeshadr/zk-branch-3.4,ch3lo/zookeeper,wangcan2014/zookeeper,ewhauser/zookeeper,nashuiliang/zookeeper,dongming/zookeeper,Tony-Zhang03/zookeeper,apurtell/zookeeper,apurtell/zookeeper,zhuochenKIDD/zookeeper,racker/zookeeper,nashuiliang/zookeeper,nashuiliang/zookeeper,pengweiqhca/zookeeper,QuickClaim/Services,mikeqian/zookeeper,myhongkongzhen/zookeeper,cloudera/zookeeper,alibaba/zookeeper,QuickClaim/Services,rakeshadr/zookeeper-1,zhuochenKIDD/zookeeper,crtynes/zookeeper,cloudera/zookeeper,p2y/zookeeper,mlizhenbin/zookeeper,aeternallife/zookeeper,Giten2004/zookeeper,jango2015/zookeeper,rakeshadr/zk-branch-3.4,williamsbdev/zookeeper,pengweiqhca/zookeeper,JaredDuCode/zookeeper,AkihiroSuda/zookeeper,racker/zookeeper,kmiku7/zookeeper,sanjeevtripurari/zookeeper,arijitvt/zookeeper,nashuiliang/zookeeper,rahulkurup/Apache-Zookeeper,isdom/zookeeper,ouyangkongtong/zookeeper,softliumin/zookeeper,myhongkongzhen/zookeeper,nashuiliang/zookeeper,rkhmelichek/zookeeper,ExactTargetDev/zookeeper,apurtell/zookeeper,likaiwalkman/zookeeper,leesir/zookeeper,mikeqian/zookeeper,rakeshadr/zookeeper-1,racker/zookeeper,mapr/zookeeper,freezhan/zookeeper,rakeshadr/zookeeper-1,ewhauser/zookeeper,crtynes/zookeeper,cloudera/zookeeper,p2y/zookeeper,ouyangjie/zookeeper,CliffYuan/zookeeper,Tony-Zhang03/zookeeper,chaozh/zookeeper,yhj630520/zookeeper,likaiwalkman/zookeeper,mlc0202/zookeeper,xiaosl/zookeeper,leesir/zookeeper,rahulkurup/Apache-Zookeeper,arijitvt/zookeeper,rakeshadr/ZooKeeper,pengweiqhca/zookeeper,intel-hadoop/zookeeper-rhino,kmiku7/zookeeper,Anvil/zookeeper,wangcan2014/zookeeper,airtimemedia/zookeeper,Tony-Zhang03/zookeeper,wangcan2014/zookeeper,fengjingchao/zookeeper,yhj630520/zookeeper,rkhmelichek/zookeeper,rakeshadr/zk-branch-3.4,dockmob/zookeeper,breed/zookeeper,myhongkongzhen/zookeeper,ch3lo/zookeeper,gigold/zookeeper,dockmob/zookeeper,leonardofoderaro/zookeeper,rkhmelichek/zookeeper,shayhatsor/zookeeper,airtimemedia/zookeeper,gigold/zookeeper,SuperLong1210/zookeeper-1,shayhatsor/zookeeper,xiaosl/zookeeper,dockmob/zookeeper,Ormod/zookeeper,ewhauser/zookeeper,mikeqian/zookeeper,ouyangkongtong/zookeeper,pengweiqhca/zookeeper,CliffYuan/zookeeper,rakeshadr/zk-branch-3.4,leesir/zookeeper,rakeshadr/zookeeper-1,arijitvt/zookeeper,shayhatsor/zookeeper,kmiku7/zookeeper,cnauroth/zookeeper,sanjeevtripurari/zookeeper,p2y/zookeeper,ExactTargetDev/zookeeper,hongchaodeng/zookeeper,rkhmelichek/zookeeper,sanjeevtripurari/zookeeper,gigold/zookeeper,JaredDuCode/zookeeper,p2y/zookeeper,williamsbdev/zookeeper,SuperLong1210/zookeeper-1,rakeshadr/zookeeper-1,osrg/zookeeper,chaozh/zookeeper,mlizhenbin/zookeeper,dongming/zookeeper,cloudera/zookeeper,hongchaodeng/zookeeper,rgs1/zookeeper,rahulkurup/zookeeper,alibaba/zookeeper,freezhan/zookeeper,pingpangkuangmo/zookeeper,AkihiroSuda/zookeeper,pengweiqhca/zookeeper,aeternallife/zookeeper,osrg/zookeeper,crtynes/zookeeper,dongming/zookeeper,likaiwalkman/zookeeper,breed/zookeeper,cloudera/zookeeper,crtynes/zookeeper,AkihiroSuda/zookeeper,leonardofoderaro/zookeeper,pingpangkuangmo/zookeeper,ewhauser/zookeeper,anchel/zookeeper,ch3lo/zookeeper,softliumin/zookeeper,airtimemedia/zookeeper,williamsbdev/zookeeper,yhj630520/zookeeper,yhj630520/zookeeper,dongming/zookeeper,jango2015/zookeeper,mlc0202/zookeeper,arijitvt/zookeeper,tausten/zookeeper,rahulkurup/zookeeper,leesir/zookeeper,mlizhenbin/zookeeper,williamsbdev/zookeeper,sanjeevtripurari/zookeeper,anchel/zookeeper,leonardofoderaro/zookeeper,williamsbdev/zookeeper,hongchaodeng/zookeeper,QuickClaim/Services,rgs1/zookeeper,myhongkongzhen/zookeeper