Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-15.0] [bugfix] Allow VTExplain to handle shards that are not…
… active during resharding (vitessio#11640) (vitessio#11652) * VTexplain topology only uses serving shards This addresses isse vitessio#11632 , which causes vtexplain to sometimes give bad results if the keyspace is being resharded, because sometimes it picks source shards and other times target shards, for routing the query. The issue is that the `VTExplain.buildTopolog()` adds both source and destination shards to the map that holds shards per keyspace, when only one of them is actually serving traffic at any point in time. Later on, vtexplain loops over this map. Because looping over the map gives a non-deterministic order, sometimes the results are correct, and sometimes incorrect - that is, sometimes it gives the result of the shard that is serving, and other times, the shard that is not serving. This change ensures that only the serving shards are added to the shards per keyspace map, thus avoiding the incorrect vtexplain. Signed-off-by: Eduardo J. Ortega U <[email protected]> * This addresses issue vitessio#11632 , which causes vtexplain to sometimes give bad results if the keyspace is being resharded, because sometimes it picks source shards and other times target shards, for routing the query. The issue is that the VTExplain.buildTopolog() adds both source and destination shards to the map that holds shards per keyspace, when only one of them is actually serving traffic at any point in time. Later on, vtexplain loops over this map. Because looping over the map gives a non-deterministic order, sometimes the results are correct, and sometimes incorrect - that is, sometimes it gives the result of the shard that is serving, and other times, the shard that is not serving. This change ensures that only the serving shards are added to the shards per keyspace map, thus avoiding the incorrect vtexplain. Signed-off-by: Eduardo J. Ortega U <[email protected]> * Fix check_make_vtadmin_authz_testgen Signed-off-by: Eduardo J. Ortega U <[email protected]> * empty commit to trigger CI Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Eduardo J. Ortega U <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Co-authored-by: Eduardo J. Ortega U <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
- Loading branch information