Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix concurrent map read and map write #2079

Merged
merged 1 commit into from Jul 1, 2022
Merged

Conversation

wangzeping722
Copy link
Contributor

there should be locked, when delete key-value in c.values.

case clientv3.EventTypeDelete:

	if vals, ok := c.values[key]; ok {
		delete(vals, string(ev.Kv.Key))
	}

	for _, l := range listeners {
		l.OnDelete(KV{
			Key: string(ev.Kv.Key),
			Val: string(ev.Kv.Value),
		})
	}

@kevwan kevwan merged commit 6a4885b into zeromicro:master Jul 1, 2022
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.

None yet

2 participants