Skip to content

[Bug]: txn need retry in rc mode during CREATE INDEX #21456

Closed

Description

@cpegeric

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

ec44079

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

When I create an IVF index with 1 million vector with dimension 3072, create index is very slow and take around 10 mins to finish. At the end of the create index, insert into mo_catalog.mo_indexes failed with error "txn need retry in rc mode, def changed." Actually, only one session is running. As a result, create index re-run again and run successfully second time.

Image

Image

Expected Behavior

Create index should be finished in one time without retry.

Steps to Reproduce

1 million vector with dimension 3072.

sql> create index idx using ivfflat on tbl(embed) lists=1000 op_type 'vector_l2_ops';

Additional information

No response

Activity

  1. added
    kind/bug
    on Feb 26, 2025
  2. cpegeric commented on Mar 6, 2025

    @cpegeric
    ContributorAuthor

    cannot reproduce any more. closed.

  3. cpegeric commented on Mar 20, 2025

    @cpegeric
    ContributorAuthor

    you can test the repo with commit 9c15844

  4. ouyuanning commented on Mar 21, 2025

    @ouyuanning
    Contributor

    从日志来看,大概的原因是:
    1、有个SQL需要调用内部执行器执行一条子SQL
    2、子SQL在开始lock meta table的时候,发现schema change,于是报错。但是这个报错没有引起retry,而是往上抛出了,
    初步怀疑是这个地方,内部执行器和普通执行路径有差异:

    Image
  5. cpegeric commented on Apr 23, 2025

    @cpegeric
    ContributorAuthor

    To reproduce the bug,

    you can test the repo with commit 9c15844

    1. create table ivftable (id bigint primary key auto_increment, embed vecf64(3072));

    2. load 1 million vector with dimension 3072

    3. create index idx using ivfflat on tbl(embed) lists=1000 op_type 'vector_l2_ops';

  6. added theissue type on Apr 27, 2025
  7. added this to the 2505 milestone on Apr 27, 2025
  8. added
    severity/s0
    on May 21, 2025
  9. 4 remaining items

  10. XuPeng-SH commented on Jul 23, 2025

    @XuPeng-SH
    Contributor

    assigned to @iamlinjunhong

  11. added
    no-pr-linked
    on Jan 15, 2026
  12. modified the milestones: MO-2508, MO-202602 on Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugno-pr-linkedseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions