File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ def initialize(self) -> Testdrive:
25
25
schemas ()
26
26
+ dedent (
27
27
"""
28
- > CREATE CLUSTER webhook_cluster REPLICAS (r1 (SIZE '1'));
28
+ >[version>=14700] CREATE CLUSTER webhook_cluster REPLICATION FACTOR 2
29
+ >[version<14700] CREATE CLUSTER webhook_cluster REPLICATION FACTOR 1
29
30
30
31
> CREATE SOURCE webhook_text IN CLUSTER webhook_cluster FROM WEBHOOK BODY FORMAT TEXT;
31
32
@@ -144,7 +145,7 @@ def initialize(self) -> Testdrive:
144
145
schemas ()
145
146
+ dedent (
146
147
"""
147
- > CREATE CLUSTER webhook_table_cluster REPLICAS (r1 (SIZE '1'));
148
+ > CREATE CLUSTER webhook_table_cluster REPLICATION FACTOR 2
148
149
> SET cluster = webhook_table_cluster
149
150
> CREATE TABLE webhook_table_text FROM WEBHOOK BODY FORMAT TEXT;
150
151
> SET cluster = quickstart
Original file line number Diff line number Diff line change @@ -1956,14 +1956,6 @@ def run(self, exe: Executor) -> bool:
1956
1956
1957
1957
1958
1958
class CreateWebhookSourceAction (Action ):
1959
- def errors_to_ignore (self , exe : Executor ) -> list [str ]:
1960
- result = super ().errors_to_ignore (exe )
1961
- if exe .db .scenario in (Scenario .Kill , Scenario .ZeroDowntimeDeploy ):
1962
- result .extend (
1963
- ["cannot create webhook source in cluster with more than one replica" ]
1964
- )
1965
- return result
1966
-
1967
1959
def run (self , exe : Executor ) -> bool :
1968
1960
with exe .db .lock :
1969
1961
if len (exe .db .webhook_sources ) >= MAX_WEBHOOK_SOURCES :
@@ -1975,7 +1967,7 @@ def run(self, exe: Executor) -> bool:
1975
1967
with schema .lock , cluster .lock :
1976
1968
if schema not in exe .db .schemas :
1977
1969
return False
1978
- if cluster not in exe .db .clusters or len ( cluster . replicas ) != 1 :
1970
+ if cluster not in exe .db .clusters :
1979
1971
return False
1980
1972
1981
1973
source = WebhookSource (webhook_source_id , cluster , schema , self .rng )
You can’t perform that action at this time.
0 commit comments