[Bug]: DROP ACCOUNT can return 20105 merging a shared mo_tables lock at the minimum row-lock limit

Aperta
#33,325 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@matrix-meow ci sta già lavorando.

Dal 26/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

kind/bug needs-triage
Is there an existing issue for the same bug?
  • I have checked the existing issues.

#32986 concerns an unrelated account being blocked by a publication on mo_account. This occurrence returned error 20105 while taking a shared range on mo_tables.

Branch Name

4.2-dev

Commit ID

CI tested 2d6b095780b48436bb41e98ba0acba3c9fa70e38 in PR #33295. Its target at that time was bf72bfbc376186521e5e20f74ddfa8bf99b2c404.

Other Environment Information

Ubuntu x86-64, Go 1.26.4, race-enabled unit tests. Failing UT job, second attempt. The first attempt on the same SHA passed the isolated issues package.

Actual Behavior

TestDropAccountWithMinimumRowLockCount created direct_drop, then DROP ACCOUNT direct_drop returned Error 20105 (HY000): not supported: merge range lock not support with shared lock. The failure occurred during the direct DROP, before the restore subscenario.

The local lock service reported table ID 2 (mo_catalog.mo_tables), row count 2 and options Shared-Range-Wait. The inner transaction rolled back and the outer DROP returned the error. The trace does not identify the other holder.

On the clean target commit, the unmodified SQL test passed in isolation. Replaying the same DROP while a second transaction held shared catalog rows reproduced the exact MySQL error 20105.

Expected Behavior

The DROP completes with MaxLockRowCount=1, including when catalog metadata is shared with another transaction. The account is absent afterwards.

Steps to Reproduce
  1. Run TestDropAccountWithMinimumRowLockCount in ./pkg/tests/issues/isolated under the CI unit-test workload. Failure is intermittent.
  2. To reproduce the lock condition independently on the clean target commit, use the existing local lock-service test harness. Let transactions A and B both acquire a shared row lock on key 2 of table 2. Have A acquire a shared range on keys 1 through 3. It returns ErrMergeRangeLockNotSupport.
  3. Release B and repeat A's range request. The request succeeds.
  4. For an end-to-end control on the same clean target, use the existing one-CN test fixture with the same row limit and create the same account. After creation, install a test observer on successful locks for table 2. For each shared point held by the original transaction, have one additional transaction acquire the same point in shared mode through the normal local lock service. Hold the additional transaction across the DROP. Seven shared metadata points were joined in this run. The original SQL returned error 20105 on a shared range for table 2. The observer did not inject a lock result or SQL error.
Additional information

The SQL and lock-service controls used the repository CGo test wrapper with Go 1.26.4 on macOS arm64. The controlled SQL reproduction establishes that concurrent catalog readers suffice to trigger this failure in the target branch. The identity of the second holder in the original CI trace is still unknown.

Lingua principale
Go
Stelle
1.9k
Fork
312
Merge medio
22h 59m
PR unite (30g)
736

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di matrixorigin/matrixone

Tutte le issue di matrixorigin/matrixone

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.