[MDEV-26543] Spider: [ERROR] Got error 12701 when reading table './test/t' on SELECT Created: 2021-09-06 Updated: 2023-05-23 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Storage Engine - Spider |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | affects-tests, regression | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Leads to an ERROR visible in the error log only:
Furthermore, error 12701 is undefined:
Bug confirmed present in: Bug (or feature/syntax) confirmed not present in: |
| Comments |
| Comment by Roel Van de Paar [ 2021-09-06 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Secondary testcase
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-09-08 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
12701 seems to be a Spider-specific error code, ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
The error message is printed by in sql_print_error(). The error itself is raised by spider_db_set_names_internal().
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
ER_CONNECT_TO_FOREIGN_DATA_SOURCE (1429) is shown by my_message(). The error is then converted to ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM by spider_db_errorno() and printed by sql_print_error() | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
MTR test case:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Roel I wrote out my analysis. What do you think is the expected behavior of the server? The server should not print the error to the error log at all? Or, it should print the same error ER_CONNECT_TO_FOREIGN_DATA_SOURCE, which is also show by my_message(). | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I confirm that the bug reproduces on 10.2 HEAD (1ce35c3) and 10.3 HEAD (00affc3) contrary to the issue description. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2021-10-09 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
nayuta-yanagisawa Interestingly, when I run this testcase against 10.2 and 10.3 I get:
And thus the remainder of the testcase fails. What is missing here? Perhaps some init SQL required or is this a bug? 10.4+ Does not produce such issue. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-11 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Roel In 10.2 and 10.3, you need to install the Spider via install_spider.sql. Please see https://mariadb.com/kb/en/spider-installation/. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
nayuta-yanagisawa No direct idea on best way forward for this. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-01-20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I thought about the issue again and I now think that we should not print the error to the error log from the viewpoint of consistency. Spider raises ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM in some places but, as far as I know, they are not printed in the error log. Further, the error is not what should be necessarily notified to an administrator. That is because the error is mostly due to a wrong CREATE TABLE statement or the down of a data node. The first case is the user's fault, not the administrator's. The second case should be informed to the administrator by external health check or something. I also think that Spider should check whether CREATE TABLE is valid. This will be done once COMMENT style remote node specification is deprecated (then, one should use engine-defined attributes style). | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thinking some more about this too, here are some random questions which may help further the discussion:
Would that not be the correct message to show here also? | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-01-21 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
1), 2) I think the error message ERROR 1429 ... is appropriate here. In fact, the very message is shown on CLI (at least on 10.7 HEAD).
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-21 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Got it. All clear & agreed. Thanks |