Skip to content

Commit

Permalink
test: use aux file v2 policy by default
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi Z <chi@neon.tech>
  • Loading branch information
skyzh committed Jun 26, 2024
1 parent 3118c24 commit 9e8a3d7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def init_start(
timeline_id=env.initial_timeline,
shard_count=initial_tenant_shard_count,
shard_stripe_size=initial_tenant_shard_stripe_size,
aux_file_v2=self.pageserver_aux_file_policy,
aux_file_policy=self.pageserver_aux_file_policy,
)
assert env.initial_tenant == initial_tenant
assert env.initial_timeline == initial_timeline
Expand Down Expand Up @@ -1604,7 +1604,7 @@ def create_tenant(
shard_stripe_size: Optional[int] = None,
placement_policy: Optional[str] = None,
set_default: bool = False,
aux_file_v2: Optional[AuxFileStore] = None,
aux_file_policy: Optional[AuxFileStore] = None,
) -> Tuple[TenantId, TimelineId]:
"""
Creates a new tenant, returns its id and its initial timeline's id.
Expand All @@ -1629,14 +1629,15 @@ def create_tenant(
)
)

if aux_file_v2 is AuxFileStore.V2:
if aux_file_policy is AuxFileStore.V2:
args.extend(["-c", "switch_aux_file_policy:v2"])

if aux_file_v2 is AuxFileStore.V1:
elif aux_file_policy is AuxFileStore.V1:
args.extend(["-c", "switch_aux_file_policy:v1"])

if aux_file_v2 is AuxFileStore.CrossValidation:
elif aux_file_policy is AuxFileStore.CrossValidation:
args.extend(["-c", "switch_aux_file_policy:cross-validation"])
else:
# use aux file v2 if the policy is not specified
args.extend(["-c", "switch_aux_file_policy:v2"])

if set_default:
args.append("--set-default")
Expand Down

0 comments on commit 9e8a3d7

Please sign in to comment.