Page MenuHomePhabricator

Fix loop in svnserve workflow for large binaries
ClosedPublic

Authored by epriestley on Dec 19 2013, 1:16 AM.
Tags
None
Referenced Files
F13369348: D7798.id17643.diff
Thu, Jun 27, 11:06 AM
F13354457: D7798.id17647.diff
Mon, Jun 24, 5:09 AM
F13338055: D7798.diff
Wed, Jun 19, 10:21 AM
F13324691: D7798.diff
Sat, Jun 15, 12:54 AM
F13315116: D7798.id17647.diff
Wed, Jun 12, 9:11 AM
F13315115: D7798.id17643.diff
Wed, Jun 12, 9:11 AM
F13315114: D7798.id17639.diff
Wed, Jun 12, 9:11 AM
F13315074: D7798.id.diff
Wed, Jun 12, 8:41 AM
Subscribers

Details

Summary

If you push a large binary and the data crosses multiple data frames, we can end up in a loop in the parser.

Test Plan

After this change, I was able to push a 95MB binary in 7s, which seems reasonable:

>>> orbital ~/repos/INIS $ svn st
A       large2.bin
>>> orbital ~/repos/INIS $ ls -alh
total 390648
drwxr-xr-x   6 epriestley  admin   204B Dec 18 17:14 .
drwxr-xr-x  98 epriestley  admin   3.3K Dec 16 11:19 ..
drwxr-xr-x   7 epriestley  admin   238B Dec 18 17:14 .svn
-rw-r--r--   1 epriestley  admin    80B Dec 18 15:07 README
-rw-r--r--   1 epriestley  admin    95M Dec 18 16:53 large.bin
-rw-r--r--   1 epriestley  admin    95M Dec 18 17:14 large2.bin
>>> orbital ~/repos/INIS $ time svn commit -m 'another large binary'
Adding  (bin)  large2.bin
Transmitting file data .
Committed revision 25.

real	0m7.215s
user	0m5.327s
sys	0m0.407s
>>> orbital ~/repos/INIS $

There may be room to improve this by using PhutilRope.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

The technique in D7797 hadn't occurred to me before, but was super useful in tracking this down.

I'll confirm that this fixes the reported behavior.

epriestley updated this revision to Unknown Object (????).Dec 19 2013, 1:46 AM
  • Add test coverage.