Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
61207: cli: don't refresh prompt on line continuations r=jordanlewis a=jordanlewis

Previously, the CLI would recalculate its prompt (including any required
network roundtrips to determine transaction status and current database)
on every newline, even if the newline came in the middle of a SQL
statement. This was wasteful, of course, but it's also very confusing
for users when entering a large multi-line statement via paste: the
prompt refreshes defer until enter is pressed for the first time, and
there is a lot of unexplained latency during the statement that doesn't
reflect the actual SQL being executed. It also doesn't match the
reported execution time, leading to mass confusion and sadness.

Now, we don't bother refreshing the prompt during line continuations.

Closes #61095

Release note (cli change): optimize handling of multi-line SQL strings
to avoid unwanted extra server roundtrips.

Release justification: bug fixes and low-risk updates to new functionality

61305:  kvserver: add closedts side-transport consumer  r=andreimatei a=andreimatei

Add the consumer of closed timestamps communicated by the side transport
(i.e. the gRPC server for our new push-based streaming protocol).

This side-transport consumer accumulates closed timestamps communicated
to it by other nodes (the leaseholders of the respective ranges). Its
state is queried whenever a range needs a higher closed timestamp than
what it has locally in the Replica state, at which point the Replica's
state is lazily updated.

Release note: None
Release justification: Needed for GLOBAL tables.

61386: kv: configure leading closed timestamp target for global_read ranges r=nvanbenschoten a=nvanbenschoten

Informs #59680.
Informs #52745.

This commit updates `closedts.TargetForPolicy` to calculate a target closed
timestamp that leads present time for ranges with the LEAD_FOR_GLOBAL_READS
closed timestamp policy. This is needed for non-blocking transactions, which
require ranges to closed time in the future.

TargetForPolicy's LEAD_FOR_GLOBAL_READS calculation is more complex than its
LAG_BY_CLUSTER_SETTING calculation. Instead of the policy defining an offset
from the publisher's perspective, the policy defines a goal from the consumer's
perspective - the goal being that present time reads (with a possible
uncertainty interval) can be served from all followers. To accomplish this, we
must work backwards to establish a lead time to publish closed timestamps at.

The calculation looks something like the following:
```
// this should be sufficient for any present-time transaction,
// because its global uncertainty limit should be <= this time.
// For more, see (*Transaction).RequiredFrontier.
closed_ts_at_follower = now + max_offset

// the sender must account for the time it takes to propagate a
// closed timestamp update to its followers.
closed_ts_at_sender = closed_ts_at_follower + propagation_time

// closed timestamps propagate in two ways. Both need to make it to
// followers in time.
propagation_time = max(raft_propagation_time, side_propagation_time)

// raft propagation takes 3 network hops to go from a leader proposing
// a write (with a closed timestamp update) to the write being applied.
// 1. leader sends MsgProp with entry
// 2. followers send MsgPropResp with vote
// 3. leader sends MsgProp with higher commit index
//
// we also add on a small bit of overhead for request evaluation, log
// sync, and state machine apply latency.
raft_propagation_time = max_network_rtt * 1.5 + raft_overhead

// side-transport propagation takes 1 network hop, as there is no voting.
// However, it is delayed by the full side_transport_close_interval in
// the worst-case.
side_propagation_time = max_network_rtt * 0.5 + side_transport_close_interval

// put together, we get the following result
closed_ts_at_sender = now + max_offset + max(
	max_network_rtt * 1.5 + raft_overhead,
	max_network_rtt * 0.5 + side_transport_close_interval,
)
```

While writing this, I explored what it would take to use dynamic network latency
measurements in this calculation to complete #59680. The code for that wasn't
too bad, but brought up a number of questions, including how far into the tail
we care about and whether we place upper and lower bounds on this value. To
avoid needing to immediately answer these questions, the commit hardcodes a
maximum network RTT of 150ms, which should be an overestimate for almost any
cluster we expect to run on.

The commit also adds a new `kv.closed_timestamp.lead_for_global_reads_override`
cluster setting, which, if nonzero, overrides the lead time that global_read
ranges use to publish closed timestamps. The cluster setting is hidden, but
should provide an escape hatch for cases where we get the calculation
(especially when it becomes dynamic) wrong.

Release justification: needed for new functionality

61499: sql: Require FORCE to modify protected zone config fields r=otan a=ajstorm

With the introduction of the multi-region simplification in 21.1, there
are a set of fields in the zone configurations which are protected by the
system. These fields are transparently modified by the system when
certain multi-region abstractions are used (e.g. when a region is added
to the database, the constraints field is modified to add the new
region). Due the protected status of these field, we want to prevent
users from setting them if they're not aware of the impact in doing so
(that they could be overwritten by the system, and that they could
result in sub-optimal performance). To make this more explicit to users,
we block modifications to these fields and if the users wish to modify
them anyway, they must provide a FORCE argument along with the
modification statement. This impacts both the setting of the field in
the zone configuration, as well as any eventual multi-region statement
which follows and will result in over-writing the user's zone
configuration update.

Release justification: Prevent bad user experience with new feature.

Release note (sql change): Updates to certain fields in the zone
configurations are blocked for multi-region enabled databases. This
block can be overridden through the use of the FORCE keyword on the
blocked statement.

Resolves #60447 

61556: sql: read db descriptor from store when constructing mr zone configs r=arulajmani a=arulajmani

Previously, when constructing multi-region zone configs for a database
in the type schema changer, we were doing so using a leased version of
the database descriptor. This meant it could be the case that we were
constructing a stale zone configuration, which manifested itself in
some CI failures. This patch fixes that issue by always reading the
database descriptor from the store when constructing zone
configurations in the type schema changer.

Previously, this was failing consistently under stress in ~30s. I have
this thing running perfectly for the last 10 minutes.

Fixes: #61320

Release justification: bug fix to new functionality
Release note: None

Co-authored-by: Jordan Lewis <[email protected]>
Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Co-authored-by: Adam Storm <[email protected]>
Co-authored-by: arulajmani <[email protected]>
  • Loading branch information
6 people committed Mar 5, 2021
6 parents 2264789 + ec26c20 + 3ff3d17 + b320c03 + 5cc6900 + 8988c6a commit 90d6ba4
Show file tree
Hide file tree
Showing 56 changed files with 2,009 additions and 218 deletions.
6 changes: 3 additions & 3 deletions docs/generated/sql/bnf/alter_zone_database_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
alter_zone_database_stmt ::=
'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'DISCARD'
'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )* opt_force
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )* opt_force
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'DISCARD' opt_force
15 changes: 10 additions & 5 deletions docs/generated/sql/bnf/stmt_block.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ unreserved_keyword ::=
| 'FILTER'
| 'FIRST'
| 'FOLLOWING'
| 'FORCE'
| 'FORCE_INDEX'
| 'FUNCTION'
| 'GENERATED'
Expand Down Expand Up @@ -1728,7 +1729,7 @@ alter_rename_database_stmt ::=
'ALTER' 'DATABASE' database_name 'RENAME' 'TO' database_name

alter_zone_database_stmt ::=
'ALTER' 'DATABASE' database_name set_zone_config
'ALTER' 'DATABASE' database_name set_zone_config opt_force

alter_database_owner ::=
'ALTER' 'DATABASE' database_name 'OWNER' 'TO' role_spec
Expand All @@ -1737,16 +1738,16 @@ alter_database_to_schema_stmt ::=
'ALTER' 'DATABASE' database_name 'CONVERT' 'TO' 'SCHEMA' 'WITH' 'PARENT' database_name

alter_database_add_region_stmt ::=
'ALTER' 'DATABASE' database_name 'ADD' 'REGION' region_name
'ALTER' 'DATABASE' database_name 'ADD' 'REGION' region_name opt_force

alter_database_drop_region_stmt ::=
'ALTER' 'DATABASE' database_name 'DROP' 'REGION' region_name
'ALTER' 'DATABASE' database_name 'DROP' 'REGION' region_name opt_force

alter_database_survival_goal_stmt ::=
'ALTER' 'DATABASE' database_name survival_goal_clause
'ALTER' 'DATABASE' database_name survival_goal_clause opt_force

alter_database_primary_region_stmt ::=
'ALTER' 'DATABASE' database_name primary_region_clause
'ALTER' 'DATABASE' database_name primary_region_clause opt_force

alter_zone_range_stmt ::=
'ALTER' 'RANGE' zone_name set_zone_config
Expand Down Expand Up @@ -2237,6 +2238,10 @@ alter_index_cmds ::=
sequence_option_list ::=
( sequence_option_elem ) ( ( sequence_option_elem ) )*

opt_force ::=
'FORCE'
|

region_name ::=
name

Expand Down
6 changes: 5 additions & 1 deletion pkg/ccl/logictestccl/testdata/logic_test/multi_region
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,14 @@ txn_database_drop_regions ca-central-1 true {ca-az1,ca-az2,ca-az3}
txn_database_drop_regions ap-southeast-2 false {ap-az1,ap-az2,ap-az3}
txn_database_drop_regions us-east-1 false {us-az1,us-az2,us-az3}

# Adding a FORCE to this second statement until we get a fix for #60620. When
# that fix is ready, we can construct the view of the zone config as it was at
# the beginning of the transaction, and the checks for FORCE should work again,
# and we won't require the explicit force here.
statement ok
BEGIN;
ALTER DATABASE txn_database_drop_regions DROP REGION "us-east-1";
ALTER DATABASE txn_database_drop_regions DROP REGION "ap-southeast-2";
ALTER DATABASE txn_database_drop_regions DROP REGION "ap-southeast-2" FORCE;
COMMIT;

query TTBT colnames
Expand Down
241 changes: 241 additions & 0 deletions pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# LogicTest: multiregion-9node-3region-3azs

query TTTT
SHOW REGIONS
----
ap-southeast-2 {ap-az1,ap-az2,ap-az3} {} {}
ca-central-1 {ca-az1,ca-az2,ca-az3} {} {}
us-east-1 {us-az1,us-az2,us-az3} {} {}

statement ok
CREATE DATABASE "mr-zone-configs" primary region "ca-central-1" regions "ap-southeast-2", "us-east-1"

statement ok
use "mr-zone-configs"

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING gc.ttlseconds = 5

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING range_min_bytes = 1000, range_max_bytes = 100000

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 1000,
range_max_bytes = 100000,
gc.ttlseconds = 5,
num_replicas = 5,
num_voters = 3,
constraints = '{+region=ap-southeast-2: 1, +region=ca-central-1: 1, +region=us-east-1: 1}',
voter_constraints = '[+region=ca-central-1]',
lease_preferences = '[[+region=ca-central-1]]'

statement error attempting to modify protected field "num_voters" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_voters = 5

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 1000,
range_max_bytes = 100000,
gc.ttlseconds = 5,
num_replicas = 5,
num_voters = 3,
constraints = '{+region=ap-southeast-2: 1, +region=ca-central-1: 1, +region=us-east-1: 1}',
voter_constraints = '[+region=ca-central-1]',
lease_preferences = '[[+region=ca-central-1]]'

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_voters = 5 FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 1000,
range_max_bytes = 100000,
gc.ttlseconds = 5,
num_replicas = 5,
num_voters = 5,
constraints = '{+region=ap-southeast-2: 1, +region=ca-central-1: 1, +region=us-east-1: 1}',
voter_constraints = '[+region=ca-central-1]',
lease_preferences = '[[+region=ca-central-1]]'

# Ensure all fields are blocked
statement error attempting to modify protected field "global_reads" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING global_reads = true

statement error attempting to modify protected field "num_replicas" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_replicas = 7

statement error attempting to modify protected field "constraints" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING constraints = '{+region=ap-southeast-2: 1}'

statement error attempting to modify protected field "voter_constraints" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING voter_constraints = '[+region=ap-southeast-2]'

statement error attempting to modify protected field "lease_preferences" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING lease_preferences = '[[+region=ap-southeast-2]]'

# With above modified zone config, try and drop a region to get warning again
statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "num_voters"
ALTER DATABASE "mr-zone-configs" DROP REGION "ap-southeast-2"

statement ok
ALTER DATABASE "mr-zone-configs" DROP REGION "ap-southeast-2" FORCE

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING global_reads = true force

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "global_reads"
ALTER DATABASE "mr-zone-configs" ADD REGION "ap-southeast-2"

statement ok
ALTER DATABASE "mr-zone-configs" ADD REGION "ap-southeast-2" force

# Zone config is unmodified now. We don't need force.
statement ok
ALTER DATABASE "mr-zone-configs" DROP REGION "ap-southeast-2"

statement ok
ALTER DATABASE "mr-zone-configs" ADD REGION "ap-southeast-2" force

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_replicas = 7 force

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "num_replicas"
ALTER DATABASE "mr-zone-configs" SET PRIMARY REGION "us-east-1"

statement ok
ALTER DATABASE "mr-zone-configs" SET PRIMARY REGION "us-east-1" FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 134217728,
range_max_bytes = 536870912,
gc.ttlseconds = 90000,
num_replicas = 5,
num_voters = 3,
constraints = '{+region=ap-southeast-2: 1, +region=ca-central-1: 1, +region=us-east-1: 1}',
voter_constraints = '[+region=us-east-1]',
lease_preferences = '[[+region=us-east-1]]'

# Alter with one protected field and one unprotected field.
statement error attempting to modify protected field "num_replicas" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_replicas = 7, gc.ttlseconds = 100000

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING num_replicas = 7, gc.ttlseconds = 100000 force

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "num_replicas"
ALTER DATABASE "mr-zone-configs" SURVIVE REGION FAILURE

statement ok
ALTER DATABASE "mr-zone-configs" SURVIVE REGION FAILURE FORCE

statement error attempting to modify protected field "constraints" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING constraints = '{+region=us-east-1: 3}'

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING constraints = '{+region=us-east-1: 3}' FORCE

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "constraints"
ALTER DATABASE "mr-zone-configs" DROP REGION "ap-southeast-2"

statement ok
ALTER DATABASE "mr-zone-configs" DROP REGION "ap-southeast-2" FORCE

statement error attempting to modify protected field "voter_constraints" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING voter_constraints = '[+region=ap-southeast-2]'

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING voter_constraints = '[+region=ap-southeast-2]' FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 134217728,
range_max_bytes = 536870912,
gc.ttlseconds = 90000,
num_replicas = 5,
num_voters = 5,
constraints = '{+region=ca-central-1: 1, +region=us-east-1: 1}',
voter_constraints = '[+region=ap-southeast-2]',
lease_preferences = '[[+region=us-east-1]]'

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "voter_constraints"
ALTER DATABASE "mr-zone-configs" DROP REGION "ca-central-1"

statement ok
ALTER DATABASE "mr-zone-configs" DROP REGION "ca-central-1" FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 134217728,
range_max_bytes = 536870912,
gc.ttlseconds = 90000,
num_replicas = 5,
num_voters = 5,
constraints = '{+region=us-east-1: 1}',
voter_constraints = '{+region=us-east-1: 2}',
lease_preferences = '[[+region=us-east-1]]'

statement error attempting to modify protected field "lease_preferences" of a multi-region database zone configuration
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING lease_preferences = '[[+region=ap-southeast-2]]'

statement ok
ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING lease_preferences = '[[+region=ap-southeast-2]]' FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 134217728,
range_max_bytes = 536870912,
gc.ttlseconds = 90000,
num_replicas = 5,
num_voters = 5,
constraints = '{+region=us-east-1: 1}',
voter_constraints = '{+region=us-east-1: 2}',
lease_preferences = '[[+region=ap-southeast-2]]'

statement error attempting to update zone configuration for database "mr-zone-configs" which contains modified field "lease_preferences"
ALTER DATABASE "mr-zone-configs" DROP REGION "us-east-1"

statement ok
ALTER DATABASE "mr-zone-configs" DROP REGION "us-east-1" FORCE

query TT
SHOW ZONE CONFIGURATION FOR DATABASE "mr-zone-configs"
----
DATABASE "mr-zone-configs" ALTER DATABASE "mr-zone-configs" CONFIGURE ZONE USING
range_min_bytes = 134217728,
range_max_bytes = 536870912,
gc.ttlseconds = 90000,
num_replicas = 5,
num_voters = 5,
constraints = '{+region=us-east-1: 1}',
voter_constraints = '{+region=us-east-1: 2}',
lease_preferences = '[[+region=ap-southeast-2]]'

query TTTTT colnames
SHOW DATABASES
----
database_name owner primary_region regions survival_goal
defaultdb root NULL {} NULL
mr-zone-configs root NULL {} NULL
postgres root NULL {} NULL
system node NULL {} NULL
test root NULL {} NULL

# FIXME: Write some more testcases here which test constraints which are longer to ensure
# that slice checking is working (e.g. a constraints list which is much longer than what
# the MR zone config would generate).
12 changes: 10 additions & 2 deletions pkg/ccl/logictestccl/testdata/logic_test/regional_by_row
Original file line number Diff line number Diff line change
Expand Up @@ -1805,10 +1805,14 @@ CREATE TABLE regional_by_row_as (
FAMILY (cr, pk, i)
) LOCALITY REGIONAL BY ROW AS "cr";

# Adding a FORCE to this second statement until we get a fix for #60620. When
# that fix is ready, we can construct the view of the zone config as it was at
# the beginning of the transaction, and the checks for FORCE should work again,
# and we won't require the explicit force here.
statement ok
BEGIN;
ALTER DATABASE add_regions_in_txn ADD REGION "us-east-1";
ALTER DATABASE add_regions_in_txn ADD REGION "ap-southeast-2";
ALTER DATABASE add_regions_in_txn ADD REGION "ap-southeast-2" FORCE;
COMMIT;


Expand Down Expand Up @@ -2058,11 +2062,15 @@ regional_by_row_as CREATE TABLE public.regional_by_row_as (
) LOCALITY REGIONAL BY ROW AS cr


# Adding a FORCE to this second statement until we get a fix for #60620. When
# that fix is ready, we can construct the view of the zone config as it was at
# the beginning of the transaction, and the checks for FORCE should work again,
# and we won't require the explicit force here.
# Add and remove a region in the same txn.
statement ok
BEGIN;
ALTER DATABASE drop_regions ADD REGION "us-east-1";
ALTER DATABASE drop_regions DROP REGION "ap-southeast-2";
ALTER DATABASE drop_regions DROP REGION "ap-southeast-2" FORCE;
COMMIT;

query TTT
Expand Down
12 changes: 10 additions & 2 deletions pkg/ccl/multiregionccl/region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ func TestSettingPrimaryRegionAmidstDrop(t *testing.T) {
// read-only state.
<-dropRegionStarted

_, err = sqlDB.Exec(`ALTER DATABASE db PRIMARY REGION "us-east2"`)
// Adding a FORCE to this second statement until we get a fix for #60620. When
// that fix is ready, we can construct the view of the zone config as it was at
// the beginning of the transaction, and the checks for FORCE should work again,
// and we won't require the explicit force here.
_, err = sqlDB.Exec(`ALTER DATABASE db PRIMARY REGION "us-east2" FORCE`)

if err == nil {
t.Fatalf("expected error, found nil")
Expand Down Expand Up @@ -219,9 +223,13 @@ func TestRollbackDuringAddDropRegionAsyncJobFailure(t *testing.T) {
"drop-region",
`ALTER DATABASE db DROP REGION "us-east2"`,
},
// Adding a FORCE to this second statement until we get a fix for #60620. When
// that fix is ready, we can construct the view of the zone config as it was at
// the beginning of the transaction, and the checks for FORCE should work again,
// and we won't require the explicit force here.
{
"add-drop-region-in-txn",
`BEGIN; ALTER DATABASE db DROP REGION "us-east2"; ALTER DATABASE db ADD REGION "us-east3"; COMMIT`,
`BEGIN; ALTER DATABASE db DROP REGION "us-east2"; ALTER DATABASE db ADD REGION "us-east3" FORCE; COMMIT`,
},
}

Expand Down
Loading

0 comments on commit 90d6ba4

Please sign in to comment.