Skip to content

Commit

Permalink
Merge pull request MaterializeInc#23144 from def-/pr-pw-backup-restore2
Browse files Browse the repository at this point in the history
parallel-workload: Disable postgres sources in backup+restore scenario
  • Loading branch information
def- authored Nov 13, 2023
2 parents a590ae2 + cfc7d3f commit cf82e29
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions misc/python/materialize/parallel_workload/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,10 @@ def errors_to_ignore(self, exe: Executor) -> list[str]:
return result

def run(self, exe: Executor) -> None:
# TODO: Reenable when #22770 is fixed
if exe.db.scenario == Scenario.BackupRestore:
return

with exe.db.lock:
if len(exe.db.postgres_sources) > MAX_POSTGRES_SOURCES:
return
Expand Down
24 changes: 14 additions & 10 deletions misc/python/materialize/parallel_workload/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,16 +807,20 @@ def __init__(
)
for i in range(rng.randint(0, MAX_INITIAL_KAFKA_SOURCES))
]
self.postgres_sources = [
PostgresSource(
i,
rng.choice(self.clusters),
rng.choice(self.schemas),
ports,
rng,
)
for i in range(rng.randint(0, MAX_INITIAL_POSTGRES_SOURCES))
]
# TODO: Reenable when #22770 is fixed
if self.scenario == Scenario.BackupRestore:
self.postgres_sources = []
else:
self.postgres_sources = [
PostgresSource(
i,
rng.choice(self.clusters),
rng.choice(self.schemas),
ports,
rng,
)
for i in range(rng.randint(0, MAX_INITIAL_POSTGRES_SOURCES))
]
self.kafka_sinks = [
KafkaSink(
i,
Expand Down

0 comments on commit cf82e29

Please sign in to comment.