docs: fix stale lock provider default value in concurrency_control page - #19459
Conversation
…cy_control page The config table in concurrency_control.md listed the hoodie.write.lock.provider default as ZookeeperBasedLockProvider (Optional), which went stale after the code default changed: - 1.0.0/1.0.1: default is InProcessLockProvider - 1.0.2+ (incl. master/latest): no default (noDefaultValue), so it is required Align the tables with the code and the auto-generated configurations.md, matching the N/A **(Required)** convention used by the adjacent ZooKeeper configs.
hudi-agent
left a comment
There was a problem hiding this comment.
test
voonhous
left a comment
There was a problem hiding this comment.
Docs-only change on asf-site: updates the hoodie.write.lock.provider default cell in the hand-maintained "Enabling Multi Writing" config table across 6 concurrency_control.md files. One line changed per file, nothing else. Thanks for picking this up, the row has been stale since the 1.0.x line.
I checked HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME at each release tag:
| Version | Code default at the release tag | PR sets | Verdict |
|---|---|---|---|
| 1.0.0 | InProcessLockProvider |
InProcessLockProvider (Optional) |
correct |
| 1.0.1 | noDefaultValue() |
InProcessLockProvider (Optional) |
wrong |
| 1.0.2 | noDefaultValue() |
N/A **(Required)** |
correct |
| 1.1.1 | noDefaultValue() |
N/A **(Required)** |
correct |
| 1.2.0 | noDefaultValue() |
N/A **(Required)** |
correct |
master (website/docs) |
noDefaultValue() |
N/A **(Required)** |
correct |
Five of the six are right. The 1.0.1 one needs a fix, details inline.
What the PR gets right
- Formatting matches the convention already used on the same page:
N/A **(Required)**is what the ZooKeeper, Hive-metastore and DynamoDB tables use for no-default configs. - Column padding is preserved, so raw-markdown alignment is unchanged. Only column 2 differs; the description column is byte-identical on all 6 lines.
- Scope looks right. The same stale row also exists in
version-0.14.0throughversion-0.15.1, and the PR correctly leaves those alone:release-0.14.0really does have.defaultValue(ZookeeperBasedLockProvider.class.getName()). There is noversion-1.1.0underversioned_docs, so all 1.x versions are covered. No prose elsewhere in these pages asserts a lock-provider default. asf-siteis the right base branch for this.
Optional follow-up, not blocking
versioned_docs/version-1.0.1/configurations.md carries the same wrong value, for the same reason (see the inline note on the 1.0.1 file). Since those are generated snapshots, hand-editing is a committer's call, but it may be worth a JIRA: if that file was never regenerated for 1.0.1, other configs that changed between 1.0.0 and 1.0.1 are probably wrong there too.
Risk / tests
Docs-only, no code paths touched, no tests applicable. Risk is limited to rendering, and the padding check above confirms the table still renders the same.
| |-------------------------------------|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | hoodie.write.concurrency.mode | SINGLE_WRITER (Optional) | <u>[Concurrency modes](https://github.com/apache/hudi/blob/00ece7bce0a4a8d0019721a28049723821e01842/hudi-common/src/main/java/org/apache/hudi/common/model/WriteConcurrencyMode.java)</u> for write operations.<br />Possible values:<br /><ul><li>`SINGLE_WRITER`: Only one active writer to the table. Maximizes throughput.</li><li>`OPTIMISTIC_CONCURRENCY_CONTROL`: Multiple writers can operate on the table with lazy conflict resolution using locks. This means that only one writer succeeds if multiple writers write to the same file group.</li><li>`NON_BLOCKING_CONCURRENCY_CONTROL`: Multiple writers can operate on the table with non-blocking conflict resolution. The writers can write into the same file group with the conflicts resolved automatically by the query reader and the compactor.</li></ul><br />`Config Param: WRITE_CONCURRENCY_MODE` | | ||
| | hoodie.write.lock.provider | org.apache.hudi.client.transaction.lock.ZookeeperBasedLockProvider (Optional) | Lock provider class name, user can provide their own implementation of LockProvider which should be subclass of org.apache.hudi.common.lock.LockProvider<br /><br />`Config Param: LOCK_PROVIDER_CLASS_NAME`<br />`Since Version: 0.8.0` | | ||
| | hoodie.write.lock.provider | org.apache.hudi.client.transaction.lock.InProcessLockProvider (Optional) | Lock provider class name, user can provide their own implementation of LockProvider which should be subclass of org.apache.hudi.common.lock.LockProvider<br /><br />`Config Param: LOCK_PROVIDER_CLASS_NAME`<br />`Since Version: 0.8.0` | |
There was a problem hiding this comment.
This one should be N/A **(Required)**, same as 1.0.2 and later.
The default was removed by 63ad659a672d "[HUDI-8930] Removing default lock provider (#12730)" (2025-01-29), and the earliest release containing that commit is release-1.0.1, not 1.0.2:
$ git tag --contains 63ad659a672d | grep -E '^release-1\.[0-9]+\.[0-9]+$'
release-1.0.1
release-1.0.2
Direct confirmation at the tag:
$ git show release-1.0.1:hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieLockConfig.java
public static final ConfigProperty<String> LOCK_PROVIDER_CLASS_NAME = ConfigProperty
.key(LOCK_PREFIX + "provider")
.noDefaultValue()
.markAdvanced()
There is no withInferFunction on it either, so it really is unset in 1.0.1.
On the justification in the PR description: versioned_docs/version-1.0.1/configurations.md is byte-identical to versioned_docs/version-1.0.0/configurations.md (diff reports no differences), so it was copied at version-cut time and never regenerated for 1.0.1. It is stale for this same config, which means matching it propagates the error instead of fixing it.
With this changed, the cutover line in the description becomes "1.0.1 and later" rather than "1.0.2 and later".
|
@voonhous you're right, thanks for the correction. I've updated the affected concurrency_control.md files accordingly: 1.0.0 → InProcessLockProvider (Optional), matching the code default in those releases. |
hudi-agent
left a comment
There was a problem hiding this comment.
Thanks for the docs update! These changes correct the stale hoodie.write.lock.provider default across the concurrency_control pages, and I verified them against HoodieLockConfig and git history: 1.0.0 legitimately keeps InProcessLockProvider, while 1.0.2/1.1.1/1.2.0/current correctly become N/A **(Required)** (the code uses .noDefaultValue()). The only outstanding concern is the already-flagged 1.0.1 file, which should be N/A **(Required)** since commit 63ad659 removed the default in 1.0.1 — no need to re-litigate here. Please have a Hudi committer or PMC member (e.g. @yihua) give it a final look.
cc @yihua
Describe the issue this Pull Request addresses
The config table in
concurrency_control.mddocumented the default value ofhoodie.write.lock.providerasZookeeperBasedLockProvider (Optional). This became stale after the code default changed twice and never got updated, so the docs have been misleading users since the 1.0.0 release.This PR aligns the tables with the actual code default in
HoodieLockConfig.LOCK_PROVIDER_CLASS_NAMEand with the auto-generatedconfigurations.md.Summary and Changelog
Updated the config-table cell for
hoodie.write.lock.providerin 6 files:website/docs/concurrency_control.mdZookeeperBasedLockProvider (Optional)N/A **(Required)**website/versioned_docs/version-1.0.0/concurrency_control.mdZookeeperBasedLockProvider (Optional)InProcessLockProvider (Optional)website/versioned_docs/version-1.0.1/concurrency_control.mdZookeeperBasedLockProvider (Optional)N/A **(Required)**website/versioned_docs/version-1.0.2/concurrency_control.mdZookeeperBasedLockProvider (Optional)N/A **(Required)**website/versioned_docs/version-1.1.1/concurrency_control.mdZookeeperBasedLockProvider (Optional)N/A **(Required)**website/versioned_docs/version-1.2.0/concurrency_control.mdZookeeperBasedLockProvider (Optional)N/A **(Required)**InProcessLockProvider (Optional), matching the code default in those releases (and the auto-generatedconfigurations.md).N/A **(Required)**, since there is no default and the provider must be set explicitly.Impact
none
Risk Level
none
Documentation Update
concurrency_control page on hudi website
Contributor's checklist