Skip to content

chore: reduce lock hold time in DefaultObjectStoreRegistry::deregister#792

Merged
alamb merged 1 commit into
apache:mainfrom
kszucs:registry-deregister-lock-scope
Jul 8, 2026
Merged

chore: reduce lock hold time in DefaultObjectStoreRegistry::deregister#792
alamb merged 1 commit into
apache:mainfrom
kszucs:registry-deregister-lock-scope

Conversation

@kszucs

@kszucs kszucs commented Jul 8, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

N/A

Rationale for this change

deregister acquired the write lock before computing the URL key and
path segments, unnecessarily extending the time the lock is held.

What changes are included in this PR?

Move the url_key and path segment computation ahead of the write
lock acquisition in DefaultObjectStoreRegistry::deregister, so the
lock is only held for the actual map mutation.

Are there any user-facing changes?

No.

Compute the URL key and path segments before acquiring the write
lock, so the lock is only held for the actual map mutation.
@kszucs kszucs changed the title Reduce lock hold time in DefaultObjectStoreRegistry::deregister chore: reduce lock hold time in DefaultObjectStoreRegistry::deregister Jul 8, 2026
@alamb alamb merged commit 09adc41 into apache:main Jul 8, 2026
13 of 14 checks passed
@alamb

alamb commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🚀

Thanks @kszucs and @kylebarron

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.

3 participants