2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Only set most recent state

Before, it would delve back to set state if recent entries indicated to not
assert the tracked states.  Correct that behavior so only last entry counts.
This commit is contained in:
Jarrod Johnson 2014-03-12 17:14:00 -04:00
parent 28a9c9b900
commit 92210a9097

View File

@ -155,7 +155,7 @@ class Logger(object):
binidx = binfile.tell() - 16
currsize = 0
offsets = collections.deque()
termstate = 0
termstate = None
while binidx > 0 and currsize < size:
binfile.seek(binidx, 0)
binidx -= 16
@ -168,7 +168,8 @@ class Logger(object):
continue
currsize += datalen
offsets.append((offset, datalen))
termstate = termstate | eventaux
if termstate is None:
termstate = termstate | eventaux
fcntl.flock(binfile, fcntl.LOCK_UN)
binfile.close()
textdata = ''