DeanHere / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

When Rietveld returns HTTP 500 when uploading files, upload.py should retry uploading the file. #236

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. upload a >50 files change (let's say with gcl upload or git cl upload)
2. Rietveld misbehaves, returns HTTP 500 on the 45th file

What is the expected output? What do you see instead?
- FFFFFFFFFUUUUUUUU
- The user needs to redo a full upload again, until the whole upload pass in 
one shot. For very large changesets, it can take several tries.
- This also leaves incomplete open rietveld changes that needs to be closed 
manually.
- This is a huge productivity killer on Chromium's team.

Proposed change:
Change VersionControlSystem.UploadBaseFiles.UploadFile() to add something like:

for _ in range(3):
  try:
    rpc_server.Send(...)
  except urllib2.HTTPError, e:
    if e.code == 500:
      continue
    raise
  break

In fact, I'd probably prefer to have the functionality integrated into 
AbstractRpcServer.Send().

Original issue reported on code.google.com by maruel@chromium.org on 30 Sep 2010 at 4:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'd be more interested to know why error 500 happens and fix that instead.

Original comment by techtonik@gmail.com on 30 Sep 2010 at 7:31

GoogleCodeExporter commented 9 years ago
Under high loads, Rietveld HTTP 500 quite often. Try uploading a 400 files 
change from Japan.

Original comment by maruel@chromium.org on 1 Oct 2010 at 12:42

GoogleCodeExporter commented 9 years ago

Original comment by albrecht.andi on 6 Apr 2012 at 7:19