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.
zookeeper-3.4.6 with Zkfuse mounted, size of testFile = 1k
while [ 1 ]
cp /root/testFile /mnt/zk/testFile.tmp
mv /mnt/zk/testFile.tmp /mnt/zk/testFile
ls -larth /mnt/zk/
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.