/srv/irclogs.ubuntu.com/2014/06/25/#launchpad-dev.txt

=== _mup__ is now known as _mup_
cjwatsonWhere does the librarian upload log go?  I can only find download logs on carob ...03:30
wgrantcjwatson: Is there logging?04:00
wgrantExcept on error.04:00
cjwatsonwgrant: I was indeed looking for error logging on the off-chance09:11
wgrantcjwatson: I think that should end up in librarian.log too.09:20
cjwatsonHm, OK.  I was specifically looking for things around the time of a livefs upload failure, and found nothing.09:21
cjwatsonWhich suggests that possibly the client just failed to connect.09:21
cjwatsonWorking on making it retry a few times, anyway.09:21
wgrantcjwatson: Did you consider just retrying the librarian communication, rather than recreating all the DB objects as well?10:40
wgrantI guess all it will do is consume an extra LFA and LFC ID10:41
cjwatsonOh, I hadn't noticed I'd done that10:42
cjwatsonI don't mind refactoring, drop me a reminder comment10:42
wgrantThough, hm.10:43
wgrantHow does this work, I wonder?10:43
wgrantThe file is never seeked back to the start.10:43
wgrantOh10:44
cjwatson*cough* apparently my tests are not as complete as you might hope10:44
wgrantI guess it only handles failure on the _sendLine('')?10:44
cjwatsonit was meant to be throughout, mistake10:44
wgrantWhich is possibly all we can reasonably do; I'm not sure whether everything we read is seekable.10:44
cjwatsonthe failures we're seeing from livefs uploads are from the response != '200' case10:45
cjwatsonso perhaps we can try to seek and if we can't then, well, we can't retry10:45
wgrantYeah, that works.10:45
wgrantOh, the _sendLine('') is explicitly trying to *not* read the error.10:45
wgrantWe just send the entire file blindly, as long as the server accepted the connection..10:46
wgrantSo yeah, that sounds sane.10:46
wgrantTry to seek, fail otherwise.10:46
wgrantI shall comment.10:46
cjwatsonFWIW I just had it on the same DVD livefs twice in a row10:52
wgrantEw.10:52
cjwatsonSo maybe that's a good way to reproduce it10:52
cjwatsonhttps://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/trusty/ubuntustudio/+build/23510:53
cjwatsonIt managed its amd64 sibling10:53
cjwatsonMaybe just a socket timeout or something?10:54
wgrantYeah, tempting to try that on DF at some point.10:55
cjwatsonThough I can't see what would be setting the timeout.10:55
=== wallyworld__ is now known as wallyworld
=== anthonyf` is now known as anthonyf
=== olli_ is now known as olli
=== matsubara is now known as matsubara-afk
cjwatsonwgrant: Hm, a thought.  What with all the moving around of librarian directories, what's to say that the librarian's "incoming" directory is on the same filesystem as the eventual target location?  We might well be incurring the slow path of shutil.move on every upload, which happens before the server replies to the client.23:19
cjwatsonWe could defer opening LibraryFileUpload.tmpfile until as late as possible, at which point we'll generally know the content-id and be able to write the file to the same directory as its target location and thus guarantee that shutil.move is cheap.23:22
cjwatsonI suspect there might then be no need to complicate the client, but we'd be able to find out fairly quickly given the error rate on production.23:25
cjwatsonThis is guesswork, but I don't see anything else in the store path that might be slow.23:25
wgrantcjwatson: Have you been able to demonstrate that a timeout causes the behaviour we see?23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!