Improve Zookeeper log handling
Ensures that messages are fully read before each append. Adds more Zookeeper hits, but ensures logs won't be overwritten by multiple daemons. Also don't use a set on the client side, to avoid "removing duplicate" entries erroneously.
This commit is contained in:
@ -142,9 +142,8 @@ def follow_node_log(config, node, lines=10):
|
||||
node_log = new_node_log
|
||||
|
||||
# Get the difference between the two sets of lines
|
||||
old_node_loglines_set = set(old_node_loglines)
|
||||
diff_node_loglines = [
|
||||
x for x in new_node_loglines if x not in old_node_loglines_set
|
||||
x for x in new_node_loglines if x not in old_node_loglines
|
||||
]
|
||||
|
||||
# If there's a difference, print it out
|
||||
|
Reference in New Issue
Block a user