Why does it still prompt this exception when the field type size is reduced? Shouldn’t this error code be prompted when the total size of the row exceeds 6M?
I know that a single row of data cannot exceed 6M, which will cause an error, but in this case, I am modifying the field type, not writing an excessively long field. This error is a bit strange.
I’m not sure about the version, but there are two possible directions to consider: one is that TiDB’s lossy changes might not be supported yet, and the other is that there might be data in the downstream TiDB that exceeds this length. You can execute this statement downstream to see if there are any errors.
It should be that the length exceeded. You can calculate the length. This is max(), not max(length()). I understand that max() sorts based on ASCII, not based on length. Use max(length()) to see what the maximum length is.
What is the error you encountered when executing DDL in TiDB? Could you provide the error message along with the logs from TiDB and TiKV during execution?
Oh, I see. It seems that the single row data in the transaction exceeds the limit. You can temporarily change the size of this parameter txn-entry-size-limit.
Increase it to 10M or larger and see if the error still occurs.