Skip to content

tidb_enforce_mpp cannot force using the tiflash #65145

@hawkingrei

Description

@hawkingrei

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t1(a int primary key, b int);
create table t2(a int primary key, b int);
alter table t1 set tiflash replica 1;
alter table t2 set tiflash replica 1;
select /*+ set_var(tidb_isolation_read_engines='tidb,tiflash'),set_var(tidb_enforce_mpp=on) */ * from t1 join t2 on t1.a=t2.b where t1.a in (1,2);

2. What did you expect to see? (Required)

TableReader root  MppVersion: 3, data:ExchangeSender
└─ExchangeSender mpp[tiflash]  ExchangeType: PassThrough
  └─HashJoin mpp[tiflash]  inner join, equal:[eq(test.t1.a, test.t2.b)]
    ├─ExchangeReceiver(Build) mpp[tiflash]  
    │ └─ExchangeSender mpp[tiflash]  ExchangeType: Broadcast, Compression: FAST
    │   └─TableRangeScan mpp[tiflash] table:t1 range:[1,1], [2,2], keep order:false, stats:pseudo
    └─TableFullScan(Probe) mpp[tiflash] table:t2 pushed down filter:in(test.t2.b, 1, 2), not(isnull(test.t2.b)), keep order:false, stats:pseudo

3. What did you see instead (Required)

+---------------------------------+----------+--------------+---------------+----------------------------------------------+
| id                              | estRows  | task         | access object | operator info                                |
+---------------------------------+----------+--------------+---------------+----------------------------------------------+
| HashJoin_21                     | 2.50     | root         |               | inner join, equal:[eq(test.t1.a, test.t2.b)] |
| ├─Batch_Point_Get_28(Build)     | 2.00     | root         | table:t1      | handle:[1 2], keep order:false, desc:false   |
| └─TableReader_27(Probe)         | 20.00    | root         |               | data:Selection_26                            |
|   └─Selection_26                | 20.00    | cop[tiflash] |               | in(test.t2.b, 1, 2), not(isnull(test.t2.b))  |
|     └─TableFullScan_25          | 10000.00 | cop[tiflash] | table:t2      | keep order:false, stats:pseudo               |
+---------------------------------+----------+--------------+---------------+----------------------------------------------+

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Labels

affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/moderatesig/plannerSIG: Plannertype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions