Open wiebeytec opened 1 month ago
cc @vitessio/query-serving
This could be happening as buffering is default false and we are accessing it is the code without that check
@wiebeytec I think this was fixed via https://github.com/vitessio/vitess/pull/16922. Can this issue be closed?
I tested with 21.0.0-rc2 (Git revision 54fa8d887fb0c154dae99b1668e4748a8f40fe42
and the current behavior seems incorrect.
There are these cases:
vexplain queries select * from legacy.sites limit 1;
-- 30 seconds pass
-- vexplain output, saying the query went to another keyspace, a sharded one.
This takes exactly 30 seconds before it returns, saying that it's not getting it from legacy
, but from sites2024
. Presumably the retry doesn't use the db prefix and ends up in 'global routing' mode on the retry. That's because case 2 below, is different.
The same as case one, but then with a default DB:
use legacy;
vexplain queries select * from legacy.sites limit 1;
-- 60 seconds pass (indeed, 60 seconds)
ERROR 1105 (HY000): query vexplain queries select * from legacy.sites limit 1 failed after retries: <nil>
select * from legacy.widgets limit 1;
-- 60 seconds pass
ERROR 1105 (HY000): query select * from legacy.widgets limit 1 failed after retries: <nil>
Instant result saying that access to the table is denied because it's in the deny list on this shard.
Overview of the Issue
When I perform operations on tables that are in the
denied_tables
(because ofMoveTables
) on the shard tablet control, I get a panic, and the local client reports "Lost connection to MySQL server during query".This is very confusing to programmers. Even though they're not supposed to use that table, they don't see what they're doing wrong.
Expected result: a query error is returned saying something about that the table is marked as denied. I think think this used to be the case before. Not sure when it changed.
Reproduction Steps
Put a table in the
denied_tables
:Then when you select from it:
Binary Version
Operating System and Environment details