Visitar URL original
incusd/storage: Fix race in caching logic by stgraber · Pull Request #3134 · lxc/incus · GitHub
Skip to content

incusd/storage: Fix race in caching logic - #3134

Merged
hallyn merged 1 commit into
lxc:mainfrom
stgraber:storage
Apr 1, 2026
Merged

hallyn merged 1 commit into
lxc:mainfrom
stgraber:storage

Conversation

@stgraber

@stgraber stgraber commented Apr 1, 2026

Copy link
Copy Markdown
Member

Waitgroups don't work well when you're resetting them and when a Wait() call may be happening prior to an Add() call.

Instead let's use a RWMutex which gives us a simpler mechanism to allow the one writer many reader situation.

Waitgroups don't work well when you're resetting them and when a Wait()
call may be happening prior to an Add() call.

Instead let's use a RWMutex which gives us a simpler mechanism to allow
the one writer many reader situation.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@bensmrs
bensmrs enabled auto-merge April 1, 2026 18:17
@hallyn
hallyn disabled auto-merge April 1, 2026 18:20
@hallyn
hallyn merged commit 290a2fc into lxc:main Apr 1, 2026
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants