Skip to content

Add option to ignore FOR UPDATE / FOR SHARE lock hints#206

Merged
KirillKurdyukov merged 1 commit intoydb-platform:mainfrom
inoorinoor:ignore-for-update-setting
Mar 13, 2026
Merged

Add option to ignore FOR UPDATE / FOR SHARE lock hints#206
KirillKurdyukov merged 1 commit intoydb-platform:mainfrom
inoorinoor:ignore-for-update-setting

Conversation

@inoorinoor
Copy link
Contributor

@inoorinoor inoorinoor commented Feb 23, 2026

Add "hibernate.dialect.ydb.ignore_lock_hints" setting to ignore FOR UPDATE / FOR SHARE and mainly ignore LockModeType.PESSIMISTIC_WRITE, LockModeType.PESSIMISTIC_READ and LockModeType.PESSIMISTIC_FORCE_INCREMENT

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Ydb hibernate dialect V7 throws UnsupportedOperationException("YDB does not support FOR UPDATE statement")

Issue Number: N/A

What is the new behavior?

Added setting IGNORE_LOCK_HINTS = "hibernate.dialect.ydb.ignore_lock_hints" to ignore pessimistic LockModeType.

Other information

As reference looked for https://docs.hibernate.org/orm/7.1/javadocs/org/hibernate/cfg/DialectSpecificSettings.html and its usage in OracleServerConfiguration and MySQLServerConfiguration

@inoorinoor inoorinoor force-pushed the ignore-for-update-setting branch from 8b4d781 to 6b95ac8 Compare February 24, 2026 14:21
@inoorinoor inoorinoor force-pushed the ignore-for-update-setting branch from 6b95ac8 to d05f55d Compare February 24, 2026 14:26
@KirillKurdyukov KirillKurdyukov merged commit 6ef2072 into ydb-platform:main Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants