[MDEV-16882] extend DDL syntax for Spider to pass-through to data nodes Created: 2018-08-02  Updated: 2023-05-23

Status: Confirmed
Project: MariaDB Server
Component/s: Server, Storage Engine - Spider
Fix Version/s: None

Type: Task Priority: Major
Reporter: Eric Herman Assignee: Yuchen Pei
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-16967 Spider CREATE TABLE Pushdown Stalled

 Description   

Today, if one creates a Spider table, the remote data node tables are named in the spider table definition, but the remotes tables are not created. While that can be useful, in some cases, it is none-the-less surprising that one must also connect to each remote data node and create the tables there as well.

For ALTER TABLE, it is especially surprising that by default the alter does not pass-through to the tables on the data nodes.



 Comments   
Comment by Eric Herman [ 2018-08-02 ]

Until the spider directives are moved out of the COMMENT, perhaps something like this would be okay?

Create Table: CREATE TABLE `t1` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`val` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=SPIDER COMMENT='wrapper "mysql", table "t1" CREATE IF NOT EXIST'
PARTITION BY RANGE (`id`)
(PARTITION `p0` VALUES LESS THAN (1000000000) COMMENT = 'srv "spider1node1"' ENGINE = SPIDER,
PARTITION `p1` VALUES LESS THAN (2000000000) COMMENT = 'srv "spider1node2"' ENGINE = SPIDER,
PARTITION `p2` VALUES LESS THAN (3000000000) COMMENT = 'srv "spider1node3"' ENGINE = SPIDER,
PARTITION `pMax` VALUES LESS THAN MAXVALUE COMMENT = 'srv "spider1nodeMax"' ENGINE = SPIDER)

Comment by Jacob Mathew (Inactive) [ 2018-08-03 ]

This is a difficult problem to solve because DDLs are non-transactional. If there are any failures on any of the data nodes, then Spider would need to do cleanup to restore consistency because there is no rollback for it.

Comment by Eric Herman [ 2018-08-07 ]

Yes, until we get transactional DDL, indeed an /excellent/ solution is not likely to exist.

However, what we have today is certainly not a /better/ situation: consider if someone does an alter table, things can just break anyway.

I'd rather have some syntax – even if not the default – which creates the situation where DBAs step-in only when something unexpected goes wrong, rather than for every ADD COLUMN.

It's hard for me to imagine using Spider widely in production without some form of this.

Generated at Thu Feb 08 08:32:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.