cockroachdb / cockroachdb/movr
many transaction restarts with running `partition` command
- Dominant language
- Python
- Stars
- 37
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
[movr](https://github.com/cockroachdb/movr) [19.03.6](https://hub.docker.com/r/cockroachdb/movr/tags) runs several alters transactionally during the `partition` command.
Looking at the logs I see I keep hitting transaction restarts, which retry but don't seem to ever complete. This is in a 9 node cluster distributed across us-west, central, and east. This is with CockroachDB `v19.1.0-rc.2`.
```
2019-04-13 20:34:07,181 INFO sqlalchemy.engine.base.Engine ALTER INDEX promo_codes@promo_codes_seattle_idx CONFIGURE ZONE USING constraints='[+region=us-central1]';
[INFO] (MainThread) ALTER INDEX promo_codes@promo_codes_seattle_idx CONFIGURE ZONE USING constraints='[+region=us-central1]';
2019-04-13 20:34:07,181 INFO sqlalchemy.engine.base.Engine {}
[INFO] (MainThread) {}
2019-04-13 20:34:08,583 INFO sqlalchemy.engine.base.Engine RELEASE SAVEPOINT cockroach_restart
[INFO] (MainThread) RELEASE SAVEPOINT cockroach_restart
2019-04-13 20:34:08,583 INFO sqlalchemy.engine.base.Engine {}
[INFO] (MainThread) {}
2019-04-13 20:34:08,728 INFO sqlalchemy.engine.base.Engine ROLLBACK TO SAVEPOINT cockroach_restart
[INFO] (MainThread) ROLLBACK TO SAVEPOINT cockroach_restart
2019-04-13 20:34:08,729 INFO sqlalchemy.engine.base.Engine {}
[INFO] (MainThread) {}
2019-04-13 20:34:08,730 INFO sqlalchemy.engine.base.Engine SAVEPOINT cockroach_restart
[INFO] (MainThread) SAVEPOINT cockroach_restart
2019-04-13 20:34:08,730 INFO sqlalchemy.engine.base.Engine {}
```
I tried killing the load and still run into this issue.
I could run this one command at a time, but I'd rather have this as an all or none operation. Should this work?
Commands:
```
ALTER TABLE vehicles PARTITION BY LIST (city) (PARTITION new_york VALUES IN ('new york' ), PARTITION chicago VALUES IN ('chicago' ), PARTITION seattle VALUES IN ('seattle' ));
ALTER PARTITION new_york OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER TABLE users PARTITION BY LIST (city) (PARTITION new_york VALUES IN ('new york' ), PARTITION chicago VALUES IN ('chicago' ), PARTITION seattle VALUES IN ('seattle' ));
ALTER PARTITION new_york OF TABLE users CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago OF TABLE users CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle OF TABLE users CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER TABLE rides PARTITION BY LIST (city) (PARTITION new_york VALUES IN ('new york' ), PARTITION chicago VALUES IN ('chicago' ), PARTITION seattle VALUES IN ('seattle' ));
ALTER PARTITION new_york OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER TABLE vehicle_location_histories PARTITION BY LIST (city) (PARTITION new_york VALUES IN ('new york' ), PARTITION chicago VALUES IN ('chicago' ), PARTITION seattle VALUES IN ('seattle' ));
ALTER PARTITION new_york OF TABLE vehicle_location_histories CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago OF TABLE vehicle_location_histories CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle OF TABLE vehicle_location_histories CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER TABLE user_promo_codes PARTITION BY LIST (city) (PARTITION new_york VALUES IN ('new york' ), PARTITION chicago VALUES IN ('chicago' ), PARTITION seattle VALUES IN ('seattle' ));
ALTER PARTITION new_york OF TABLE user_promo_codes CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago OF TABLE user_promo_codes CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle OF TABLE user_promo_codes CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER INDEX rides_auto_index_fk_city_ref_users PARTITION BY LIST (city) (PARTITION new_york_rides_auto_index_fk_city_ref_users VALUES IN ('new york' ), PARTITION chicago_rides_auto_index_fk_city_ref_users VALUES IN ('chicago' ), PARTITION seattle_rides_auto_index_fk_city_ref_users VALUES IN ('seattle' ));
ALTER PARTITION new_york_rides_auto_index_fk_city_ref_users OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago_rides_auto_index_fk_city_ref_users OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle_rides_auto_index_fk_city_ref_users OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER INDEX rides_auto_index_fk_vehicle_city_ref_vehicles PARTITION BY LIST (vehicle_city) (PARTITION new_york_rides_auto_index_fk_vehicle_city_ref_vehicles VALUES IN ('new york' ), PARTITION chicago_rides_auto_index_fk_vehicle_city_ref_vehicles VALUES IN ('chicago' ), PARTITION seattle_rides_auto_index_fk_vehicle_city_ref_vehicles VALUES IN ('seattle' ));
ALTER PARTITION new_york_rides_auto_index_fk_vehicle_city_ref_vehicles OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago_rides_auto_index_fk_vehicle_city_ref_vehicles OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle_rides_auto_index_fk_vehicle_city_ref_vehicles OF TABLE rides CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER INDEX vehicles_auto_index_fk_city_ref_users PARTITION BY LIST (city) (PARTITION new_york_vehicles_auto_index_fk_city_ref_users VALUES IN ('new york' ), PARTITION chicago_vehicles_auto_index_fk_city_ref_users VALUES IN ('chicago' ), PARTITION seattle_vehicles_auto_index_fk_city_ref_users VALUES IN ('seattle' ));
ALTER PARTITION new_york_vehicles_auto_index_fk_city_ref_users OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-east1]';
ALTER PARTITION chicago_vehicles_auto_index_fk_city_ref_users OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-central1]';
ALTER PARTITION seattle_vehicles_auto_index_fk_city_ref_users OF TABLE vehicles CONFIGURE ZONE USING constraints='[+region=us-central1]';
CREATE INDEX promo_codes_new_york_idx on promo_codes (code) STORING (description, creation_time, expiration_time, rules);
ALTER INDEX promo_codes@promo_codes_new_york_idx CONFIGURE ZONE USING constraints='[+region=us-east1]';
CREATE INDEX promo_codes_chicago_idx on promo_codes (code) STORING (description, creation_time, expiration_time, rules);
ALTER INDEX promo_codes@promo_codes_chicago_idx CONFIGURE ZONE USING constraints='[+region=us-central1]';
CREATE INDEX promo_codes_seattle_idx on promo_codes (code) STORING (description, creation_time, expiration_time, rules);
ALTER INDEX promo_codes@promo_codes_seattle_idx CONFIGURE ZONE USING constraints='[+region=us-central1]';
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.