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 panic of concurrent map writes, when using in memory mode #2179

Closed
wants to merge 1 commit into from

Conversation

kom0055
Copy link
Contributor

@kom0055 kom0055 commented Dec 4, 2023

#1306 fix panic of concurrent map writes, when using in memory mode

@paralin
Copy link
Contributor

paralin commented Dec 5, 2023

Doesn't this generic map type exists somewhere else already that we can import from?

@zachmu
Copy link
Member

zachmu commented Dec 5, 2023

Doesn't this generic map type exists somewhere else already that we can import from?

Unfortunately not, this is a gap in the standard golang libraries at the moment. Various third party packages implement one but it's easy to enough to write your own like this.

@zachmu
Copy link
Member

zachmu commented Dec 5, 2023

Thanks for the contribution. This PR looks fine, but please understand that this by itself doesn't make the in-memory implementation thread-safe. There's still no transaction support or row locking, which is necessary for true concurrency. This may work for some limited use cases but it's not a general solution to concurrency.

@zachmu
Copy link
Member

zachmu commented Dec 5, 2023

I had to merge main to correct a testing issue on our end. New PR is here:

#2185

@zachmu zachmu closed this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants