ODPS-0121096

更新时间:
复制 MD 格式

ODPS-0121096: MetaStore transaction conflict occurs when concurrent jobs compete for a table-level metadata lock and a job times out waiting to acquire it.

Error message 1: Reached maximum retry times because of OTSStorageTxnLockKeyFail(Inner exception: Transaction timeout because cannot acquire exclusive lock.)

Sample

ODPS-0121096:MetaStore transaction conflict - Reached maximum retry times because of OTSStorageTxnLockKeyFail(Inner exception: Transaction timeout because cannot acquire exclusive lock.)

Cause

MaxCompute allows multiple jobs to write to the same table concurrently. When multiple jobs commit metadata at the same time, each job must acquire an exclusive lock on the table's metadata, write, and then release the lock. This locking operates at the table level — all concurrent metadata writes to any partition of a table compete for the same lock.

If too many jobs write metadata to the same table at the same time, or a large amount of metadata is written across many partitions at once, the lock stays held long enough that other jobs time out waiting to acquire it. A locking attempt times out after about 30 seconds, at which point this error is returned.

Solution

Check whether multiple jobs are running concurrent read and write operations on the same table or partition. To resolve the error, avoid running concurrent read and write operations on the same table or partition.