Skip to content

Commit

Permalink
offline_log_viewer: updates for write caching properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathv committed Mar 7, 2024
1 parent 5723ff9 commit 21d3e2e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tools/offline_log_viewer/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def read_topic_properties_serde(rdr: Reader, version):
'initial_retention_local_target_ms':
rdr.read_tristate(Reader.read_uint64)
}
if version >= 7:
topic_properties |= {
'write_caching': rdr.read_optional(Reader.read_serde_enum),
'flush_ms': rdr.read_optional(Reader.read_int64),
'flush_bytes': rdr.read_optional(Reader.read_int64)
}

return topic_properties

Expand All @@ -119,7 +125,7 @@ def read_topic_configuration_assignment_serde(rdr: Reader):
rdr.read_int16(),
'properties':
rdr.read_envelope(read_topic_properties_serde,
max_version=6),
max_version=7),
}, 1),
'assignments':
rdr.read_serde_vector(lambda r: r.read_envelope(
Expand Down Expand Up @@ -242,10 +248,16 @@ def incr_topic_upd(rdr: Reader, version):
read_property_update_serde(
rdr, lambda r: r.read_tristate(Reader.read_uint64))
}
if version >= 6:
incr_obj |= {
'write_caching': rdr.read_optional(Reader.read_serde_enum),
'flush_ms': rdr.read_optional(Reader.read_int64),
'flush_bytes': rdr.read_optional(Reader.read_int64)
}

return incr_obj

return rdr.read_envelope(incr_topic_upd, max_version=5)
return rdr.read_envelope(incr_topic_upd, max_version=6)


def read_create_partitions_serde(rdr: Reader):
Expand Down

0 comments on commit 21d3e2e

Please sign in to comment.