Skip to content

Commit

Permalink
ccmlib/scylla_node: dump_sstable_stats to handle broken utf-8
Browse files Browse the repository at this point in the history
in some cases the output of `scylla sstable` can be with illegal
utf-8, we should just skip them, and it would work as expected.
  • Loading branch information
fruch committed May 7, 2024
1 parent df1a858 commit 91c65fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ccmlib/scylla_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,10 +1667,12 @@ def dump_sstable_stats(self,
keyspace=keyspace,
column_families=[column_family],
datafiles=datafiles,
batch=True)
batch=True,
text=False,
)
assert '' in sstable_stats
stdout, _ = sstable_stats['']
return json.loads(stdout)['sstables']
return json.loads(stdout.decode('utf-8', 'ignore'))['sstables']

def dump_sstable_scylla_metadata(self,
keyspace: str,
Expand Down

0 comments on commit 91c65fb

Please sign in to comment.