Closed tchaikov closed 12 months ago
with the proposed change, we can have something like
diff --git a/compaction_test.py b/compaction_test.py
index 4b4059dd..53100bca 100644
--- a/compaction_test.py
+++ b/compaction_test.py
@@ -180,19 +180,10 @@ class TestCompaction(Tester):
node.flush()
node.compact()
- sstable_dumps = node.run_scylla_sstable('dump-data', ['--merge'],
- keyspace=self.KEYSPACE_NAME)
- numfound = 0
- jsoninfo = []
- for stdout, _ in sstable_dumps.values():
- partitions = json.loads(stdout)['sstables']['anonymous']
- jsoninfo += partitions
- for partition in partitions:
- if 'tombstone' in partition:
- numfound += 1
-
+ partitions = node.dump_sstables(keyspace=self.KEYSPACE_NAME)
+ numfound = sum('tombstone' in partition for partition in partitions)
logger.debug(f'Number of tombstones found on node {node.name}: {numfound}')
- return numfound, jsoninfo
+ return numfound, partitions
def _test_compaction_delete_tombstone_gc(self, tombstone_gc_mode='repair', node_num: int = 2,
r_factor: int = None, delete_keys: bool = True, partition_num: int = 100):
after https://github.com/scylladb/scylla-dtest/pull/3351 lands
v2
sstables
, as no users are using this parameter so far.v3:
ScyllaNode.dump_sstables()
is a wrapper aroundScyllaNode.run_scylla_sstable()
. it provides a more user friendly interface than the latter. it is introduced so that tests can use it with less pain when migrating fromnode.run_sstable2json()
tonode.run_scylla_sstable()
.