[MDEV-27106] Spider: specify connection to data node by engine-defined attributes Created: 2020-05-13 Updated: 2023-10-27 Resolved: 2022-01-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Fix Version/s: | 10.8.1 |
| Type: | Task | Priority: | Blocker |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Nayuta Yanagisawa (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | Preview_10.8 | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The Spider storage engine provides two ways to specify remote data nodes. One is by the COMMENT clause and the other is by the CONNECTION clause (see below links for existing options). However, writing every specification in a single connection string is not very user-friendly.
We introduce new engine-defined attributes to specify remote data nodes. The engine attributes do not cover all the existing DSN parameters because most of the parameters need not be specified at the table level. So, we first introduce engine-defined attributes that correspond to essential parameters. If users complain that a parameter they need is missing, we can introduce it later. I believe that the following attributes are enough:
Writing a raw password in the COMMENT or engine-defined option is not preferable from the viewpoint of security because the password might be logged in slow log or general log. Therefore, we should encourage the use of the CREATE SERVER statement, and not introduce attributes such as REMOTE_USER and REMOTE_PASSWORD. SSL-related parameters might be essential but I believe that they should be covered by CREATE SERVER statement rather than per-table or per-partition attributes. If, for example, both COMMENT='table "t1"' and REMOTE_TABLE="t2" are specified for a single table or a single partition, the Spider returns an error. Example:
TODO:
|
| Comments |
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-11-30 ] |
|
Please review. The patch depends on one for |
| Comment by Alexey Botchkov [ 2021-12-10 ] |
|
see minor comments to the patch. |
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-12-10 ] |
|
holyfoot Thank you for your review. I fixed the patch according to your comments. Please check it again. https://github.com/MariaDB/server/commit/384f9d34ff29fe81de234c48516ccf257b9b10f5 |
| Comment by Alexey Botchkov [ 2021-12-13 ] |
|
Ok to push. |
| Comment by Roel Van de Paar [ 2022-01-01 ] |
|
Logged MDEV-27400 Spider attempts localhost TCP/IP connection, even when none is specified. |
| Comment by Roel Van de Paar [ 2022-01-16 ] |
|
Logged |
| Comment by Roel Van de Paar [ 2022-01-22 ] |
|
Confirming this comment, it is interesting to note that Spider already supported |
| Comment by Roel Van de Paar [ 2022-01-22 ] |
|
As the COMMENT field functionality was not changed in any way, and as any new SQL syntax is 10.8-only, I did not do any upgrade testing for this issue. nayuta-yanagisawa and serg If you think any should be done, please let me know your thoughts. |
| Comment by Roel Van de Paar [ 2022-01-22 ] |
|
OK to push. However, I am still running a generic crash test against the feature branch (including the |
| Comment by Roel Van de Paar [ 2022-01-22 ] |
|
From the same run, logged |
| Comment by Roel Van de Paar [ 2022-01-29 ] |
|
Logged |
| Comment by Yuchen Pei [ 2023-04-26 ] |
|
Hi greenman, how much work do you think is needed to document the nice feature introduced in this ticket in the KB? |
| Comment by Yuchen Pei [ 2023-06-28 ] |
|
> Hi Ian Gilfillan, how much work do you think is needed to document the nice feature introduced in this ticket in the KB? I added to the kb two weeks ago: https://mariadb.com/kb/en/spider-storage-engine-overview/#basic-usage |