Error When Enabling TiFlash Replica: Other Error for MPP Stream

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 开启tiflash副本报错问题,other error for mpp stream…

| username: TIDB-Learner

Phenomenon Description: After enabling the TiFlash replica for tb_xx, executing the query statement reports an error. After deleting the TiFlash replica, the query works normally.
Suspicion: Is there an issue with the datediff(c_create_dt, str_to_date(TIMESTAMP(‘2024-04-03 00:00:00’), ‘%Y-%m-%d %H:%i:%s’)) function? For example, within the range where MPP operators are not supported.
Everyone, please help analyze!!
Execution statement:

SELECT
    * 
FROM
    tb_xx 
WHERE
    company = '0112' 
    AND datediff(c_create_dt, str_to_date(TIMESTAMP('2024-04-03 00:00:00'), '%Y-%m-%d %H:%i:%s')) >= 0 
    AND datediff(c_create_dt, str_to_date(TIMESTAMP('2024-04-03 00:00:00'), '%Y-%m-%d %H:%i:%s')) <= 0 
    AND store = '16074001' 
    AND store IN ('16074001') 
ORDER BY
    c_create_dt DESC 
LIMIT 1000 OFFSET 0

Error message:

<!--p.MsoNormal{ mso-style-name: Normal; mso-style-parent: ""; margin: 0pt; margin-bottom: .0001pt; mso-pagination: none; text-justify: inter-ideograph; mso-font-kerning: 1.0000pt; } p.paragraph{ mso-style-noshow: yes; margin-top: 5.0000pt; margin-right: 0.0000pt; margin-bottom: 5.0000pt; margin-left: 0.0000pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; text-align: left; font-family: DengXian; mso-bidi-font-family: 'Times New Roman'; font-size: 12.0000pt; } -->

1105 - other error for mpp stream: From MPP<query:448959672348311565,task:1>: Code: 49, e.displayText() = DB::Exception: Check schema[i].type->equals(*storage_schema[i].type) failed, schema[i].name = table_scan_1, schema[i].type->getName() = Nullable(MyDateTime(3)), storage_schema[i].name = c_create_dt, storage_schema[i].type->getName() = Nullable(MyDateTime(0)), e.what() = DB::Exception,
| username: TIDB-Learner | Original post link

I executed the following and also got an error,
select c_create_dt, c_create_userno from tb_xxx where c_create_dt is not null

1105 - other error for mpp stream: From MPP<query:448959672348311565, task:1>: Code: 49, e.displayText() = DB::Exception: Check schema[i].type->equals(*storage_schema[i].type) failed, schema[i].name = table_scan_1, schema[i].type->getName() = Nullable(MyDateTime(3)), storage_schema[i].name = c_create_dt, storage_schema[i].type->getName() = Nullable(MyDateTime(0)), e.what() = DB::Exception,

| username: cassblanca | Original post link

Have you confirmed that the Tiflash service is functioning normally? What is the Tiflash version? You can use a hint to force the use of TiKV instead of Tiflash: /*+ READ_FROM_STORAGE(TIKV[db1.table]) */

| username: TIDB-Learner | Original post link

I encountered this last year. As long as the table has TiFlash replicas enabled, it reports an error in the production environment cluster version 6.5.3. In the testing environment version 6.5.8, there is no error.

| username: DBAER | Original post link

Mark it, it might be incompatible.

| username: tidb菜鸟一只 | Original post link

Looking at the table structure, it seems that the following field types mydatetime(0) mydatetime(3) timestamp(0) timestamp(3) time(0) time(3) are used, causing TiFlash errors.

Affected LTS versions:

  • Version 6.5.0/v6.5.1/v6.5.2/v6.5.3
  • Version 7.1.0/v7.1.1

Solution (choose one of the following actions):

  1. Disable Planner Interpreter in TiFlash with the following configuration. For affected versions, disabling this feature is irrelevant.
[profiles]
[profiles.default]
enable_planner = false
  1. Create new columns with the correct column types; copy values from the old columns to the new columns using statements; delete the old columns UPDATE table_name SET ...
  2. Create a new table with the correct column types; copy rows from the old table to the new table; delete the old table

Schema check failed for MyDateTime(0) to MyDateTime(3) · Issue #7809 · pingcap/tiflash (github.com)

| username: dba远航 | Original post link

Suspect it is a function support issue.

| username: 友利奈绪 | Original post link

Is it caused by the field type?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.