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:
2023-11-29 12:10:27 -05:00
parent 1adc3674b6
commit 7abc697c8a
2 changed files with 18 additions and 25 deletions

View File

@ -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