syndicate-storage / syndicate

Internet-scale software-defined storage system
Apache License 2.0
56 stars 10 forks source link

File move (rename) bug #27

Closed iychoi closed 11 years ago

iychoi commented 11 years ago

Hi.

I met a bug while file move (rename) on syndicatefs.

I used local MS for testing and the bug is replayable as following below sequence.

Here's my commands

iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ touch abc.txt ls iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls abc.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mv abc.txt ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mkdir fake iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls fake ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mv fake face mv: cannot move fake' to a subdirectory of itself,face' iychoi@iychoi-virtual-machine:/mnt/syndicatefs$

Thanks for your time.

jcnelson commented 11 years ago

Directory rename is currently not supported. There's no easy way to do this, since we name files by their paths (which means changing a directory name will entail atomically renaming a scalable number of MSEntry records). Issue #18, when it is addressed, will pave the way to directory renaming, since once we name files and directories by a globally-unique identifier independent of path (e.g. an "i-node" number), changing the directory name will have no bearing on the files and directories beneath it.

-Jude

----- Original Message ----- From: "Illyoung Choi" notifications@github.com To: "jcnelson/syndicate" syndicate@noreply.github.com Sent: Friday, July 12, 2013 10:15:10 PM Subject: [syndicate] File move (rename) bug (#27)

Hi.

I met a bug while file move (rename) on syndicatefs.

I used local MS for testing and the bug is replayable as following below sequence.

* Create a directory in Syndicate 
* Try to rename the directory with "mv" command. 

Here's my commands

iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ touch abc.txt ls iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls abc.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mv abc.txt ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mkdir fake iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ ls fake ren.txt iychoi@iychoi-virtual-machine:/mnt/syndicatefs$ mv fake face mv: cannot move fake' to a subdirectory of itself, face' iychoi@iychoi-virtual-machine:/mnt/syndicatefs$

Thanks for your time.

— Reply to this email directly or view it on GitHub .

iychoi commented 11 years ago

Thank you for your comment. I haven't thought in that way. Anyway, this isn't a big issue for me. I'll temporarily disable the directory rename function until this is fixed.