##// END OF EJS Templates
pull-requests: increase stability of concurrent pull requests creation by flushing prematurly the statuses of commits....
marcink -
r3408:2a133f7e stable
parent child Browse files
Show More
@@ -312,6 +312,7 b' class ChangesetStatusModel(BaseModel):'
312 for st in cur_statuses:
312 for st in cur_statuses:
313 st.version += 1
313 st.version += 1
314 Session().add(st)
314 Session().add(st)
315 Session().flush()
315
316
316 def _create_status(user, repo, status, comment, revision, pull_request):
317 def _create_status(user, repo, status, comment, revision, pull_request):
317 new_status = ChangesetStatus()
318 new_status = ChangesetStatus()
@@ -530,7 +530,7 b' class PullRequestModel(BaseModel):'
530 )
530 )
531 # we commit early at this point. This has to do with a fact
531 # we commit early at this point. This has to do with a fact
532 # that before queries do some row-locking. And because of that
532 # that before queries do some row-locking. And because of that
533 # we need to commit and finish transation before below validate call
533 # we need to commit and finish transaction before below validate call
534 # that for large repos could be long resulting in long row locks
534 # that for large repos could be long resulting in long row locks
535 Session().commit()
535 Session().commit()
536
536
General Comments 0
You need to be logged in to leave comments. Login now