2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-29 00:31:09 +00:00

Remove attempt to rebuild buffer from log file

It's at odds with the strategy of valid buffer only if we have confidence.
Clients reconnecting without replay still have a good experience, since their
terminal serves as the buffer.
This commit is contained in:
Jarrod Johnson
2017-03-18 12:20:32 -04:00
parent 9cf074e1a2
commit 42c775a7a4
+3 -5
View File
@@ -152,9 +152,7 @@ class ConsoleHandler(object):
if self._logtobuffer:
self.logger = log.Logger(node, console=True,
tenant=configmanager.tenant)
(text, termstate, timestamp) = self.logger.read_recent_text(32768)
else:
(text, termstate, timestamp) = ('', 0, False)
(text, termstate, timestamp) = (b'', 0, False)
# when reading from log file, we will use wall clock
# it should usually match walltime.
self.lasttime = 0
@@ -166,7 +164,7 @@ class ConsoleHandler(object):
# wall clock has gone backwards, use current time as best
# guess
self.lasttime = util.monotonic_time()
self.termstream.feed(text)
self.clearbuffer()
self.appmodedetected = False
self.shiftin = None
self.reconnect = None
@@ -256,7 +254,7 @@ class ConsoleHandler(object):
def clearbuffer(self):
self.termstream.feed(
'\x1bc[no replay buffer due to console.logging attribute set to '
'none or interactive or connection loss]')
'none or interactive, connection loss, or service restart]')
self.clearpending = True
def _disconnect(self):