Skip to content

Commit

Permalink
move to smoke test
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi Z <[email protected]>
  • Loading branch information
skyzh committed Nov 14, 2024
1 parent 3b99981 commit 27e70aa
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions test_runner/regress/test_compaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,28 @@ def test_pageserver_compaction_smoke(neon_env_builder: NeonEnvBuilder):
assert non_vectored_average < 8
assert vectored_average < 8

# run a gc-compaction in the end for the rel data range
ps_http.timeline_compact(
tenant_id,
timeline_id,
enhanced_gc_bottom_most_compaction=True,
body={
"start": "000000000000000000000000000000000000",
"end": "030000000000000000000000000000000000",
},
)


# Stripe sizes in number of pages.
TINY_STRIPES = 16
LARGE_STRIPES = 32768


@pytest.mark.parametrize(
"shard_count,stripe_size,gc_compaction",
[
(None, None, False),
(4, TINY_STRIPES, False),
(4, LARGE_STRIPES, False),
(4, LARGE_STRIPES, True),
],
"shard_count,stripe_size", [(None, None), (4, TINY_STRIPES), (4, LARGE_STRIPES)]
)
def test_sharding_compaction(
neon_env_builder: NeonEnvBuilder,
stripe_size: int,
shard_count: Optional[int],
gc_compaction: bool,
neon_env_builder: NeonEnvBuilder, stripe_size: int, shard_count: Optional[int]
):
"""
Use small stripes, small layers, and small compaction thresholds to exercise how compaction
Expand Down Expand Up @@ -223,17 +225,6 @@ def test_sharding_compaction(
# that at least one of them has some image layers.
assert any(shard_has_image_layers)

if gc_compaction:
env.pageserver.http_client().timeline_compact(
tenant_id,
timeline_id,
enhanced_gc_bottom_most_compaction=True,
body={
"start": "00000000000000000000000000000000",
"end": "30000000000000000000000000000000",
},
)

# Assert that everything is still readable
workload.validate()

Expand Down

0 comments on commit 27e70aa

Please sign in to comment.