Ivan Zhakov <i...@visualsvn.com> writes:

> I intentionally kept packing code unchanged: it seems that now we
> don't use hardware flush when packing repository: so we need apply fix
> to all pack code, which is separate issue IMO.

Yes!  I can confirm that with strace: we write pack/manifest files for
revisions without fsync().  For a repository with shard size 3 I get:

open("repo/db/revs/1.pack/pack", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 4
open("repo/db/revs/1.pack/manifest", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 
5
open("repo/db/revs/1/3", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
open("repo/db/revs/1/4", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
open("repo/db/revs/1/5", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
write(5, "0\n240\n480\n", 10)           = 10
close(5)                                = 0
write(4, "DELTA\nSVN\1\0\0\4\2\5\1\204\4END\nENDREP\nid:"..., 720) = 720
close(4)                                = 0

followed by:

unlink("repo/db/revs/1/4")              = 0
unlink("repo/db/revs/1/5")              = 0
unlink("repo/db/revs/1/3")              = 0

For revprops I see the fsync() fix:

open("repo/db/revprops/1.pack/manifest", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 
0666) = 4
open("repo/db/revprops/1.pack/3.0", O_WRONLY|O_CREAT|O_CLOEXEC, 0666) = 5
open("repo/db/revprops/1/3", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
open("repo/db/revprops/1/4", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
open("repo/db/revprops/1/5", O_RDONLY|O_CLOEXEC) = 6
close(6)                                = 0
write(5, "\202\0373\n3\n91\n91\n91\n\nK 10\nsvn:author\n"..., 289) = 289
fsync(5)                                = 0
close(5)                                = 0
write(4, "3.0\n3.0\n3.0\n", 12)         = 12
fsync(4)                                = 0
close(4)                                = 0


-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to