Bharat Singh created ZOOKEEPER-2236:
---------------------------------------
Summary: Zookeeper truncates file to 0bytes
Key: ZOOKEEPER-2236
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2236
Project: ZooKeeper
Issue Type: Bug
Components: contrib-zkfuse, server, tests
Affects Versions: 3.4.6
Environment: Ubuntu14.04, Standalone Zookeeper server, Zkfuse
Reporter: Bharat Singh
Fix For: 3.4.6
I am facing a rename issue with Zkfuse.
I am trying to test file atomic updates. After some iterations the file size
becomes 0.
This is easily reproducible, just running the below script for ~5mins.
Setup:
zookeeper-3.4.6 with Zkfuse mounted, size of testFile = 1k
while [ 1 ]
do
cp /root/testFile /mnt/zk/testFile.tmp
mv /mnt/zk/testFile.tmp /mnt/zk/testFile
ls -larth /mnt/zk/
sleep 1
done
Zkfuse debug logs doesn't show any suspicious activity. Looks like
zookeeper/zkfuse RENAME is not atomic.
But code browsing and log messages show that update have issues:
1) update is not able to pull data from zookeeper due to the _refCnt > 1,
so rename get an empty ZkfuseFile object.
2) I also hit an assert in update,
assert(newFile == false || _isOnlyRegOpen());
Now I have suspicion on the refcount logic. Have any one faced similar issues
or have used Zkfuse in production environment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)