Skip to content

Commit

Permalink
serialize log append
Browse files Browse the repository at this point in the history
slave is sending status and stdout in parallel, then the number of line is not handled correctly

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy committed Jan 1, 2014
1 parent f9c1469 commit 2690ec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion master/buildbot/process/log.py
Expand Up @@ -34,7 +34,7 @@ def __init__(self, master, name, type, logid, decoder):
self.subscriptions = {}
self.finished = False
self.finishWaiters = []

self.lock = defer.DeferredLock()
self.decoder = decoder

@staticmethod
Expand Down Expand Up @@ -70,7 +70,9 @@ def addRawLines(self, lines):
# formatted for the log type, and newline-terminated
assert lines[-1] == '\n'
assert not self.finished
yield self.lock.acquire()
yield self.master.data.updates.appendLog(self.logid, lines)
yield self.lock.release()

# completion

Expand Down

0 comments on commit 2690ec2

Please sign in to comment.