Open evgmik opened 3 years ago
Will check next.
[...] the repo database could be left in a broken state.
It should not, there is some defence against crashes in the linker. If the state got broken that is a separate bug.
While we at it, it would be nice to be able to copy to non-existing path. For example, in above to do ali cp /test/dir1 /to/new/non/existing/dir
I guess we can do a mkdir
in the client to make this work.
While we at it, it would be nice to be able to copy to non-existing path. For example, in above to do ali cp /test/dir1 /to/new/non/existing/dir
I guess we can do a
mkdir
in the client to make this work.
Note that staging to non existing dir works, i.e.
$ ali tree
•
1 directory, 0 files
$ ali touch /to/new/non/existing/dir/testfile
$ ali tree
• ✔
└── to/ ✔
└── new/ ✔
└── non/ ✔
└── existing/ ✔
└── dir/ ✔
└── testfile ✔
6 directories, 1 file
Which deviates from standard shell touch
. So the question, shall we preserve shell cp
style and the current brig
, where the destination dir must exist, or shall we allow such copy to succeed?
Still digging the top most bug description with recursive copy, apparently we have a problem when a directory copied inside of another directory. Looks like Walk
get into recursion of some type or maybe adding a child to a parent triggers consequent Walk
over itself.
Quick questions: how content of the directory is calculated? Is it based on names of the children or their content?
Also, am I right that Tree
hash is calculated based on the full path to the node? If I am right, than what is the point? We can just use full path for the DB key.
Also, order
field in the directory node, seems to be unneeded. It can be calculated on a fly, from the children names.
Looks like Walk get into recursion of some type or maybe adding a child to a parent triggers consequent Walk over itself.
IIRC the logic for NotifyMove
was not made for the Copy() case. It gets confused about the paths. I had a quick look and decided that it's probably wise to first do the staging-related re-design in linker.
Quick questions: how content of the directory is calculated? Is it based on names of the children or their content?
It's only based on the directory path, no content involved.
Also, am I right that Tree hash is calculated based on the full path to the node? If I am right, than what is the point? We can just use full path for the DB key.
That would only serve as key for one version of that file.
Also, order field in the directory node, seems to be unneeded. It can be calculated on a fly, from the children names.
Partly yes, It trades storage against CPU. On Add()
for example we can do a log(n)
binary search for the insert, while on the fly we have to do n * log(n)
. Do you suspect a problem with the storage space?
Steps to reproduce: start fresh and do
I just show first line of the crash report. Depending on what inside of the parent dir (I think it subdirs), the repo database could be left in a broken state.
While we at it, it would be nice to be able to copy to non-existing path. For example, in above to do
ali cp /test/dir1 /to/new/non/existing/dir