-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: panic: concurrent map read and map write with parallel statements #23171
Comments
cc @andreimatei I believe the problem here is that a pgwire When executing a prepared statement that can be parallelized, the Since it's valid for execution to modify the portal's map, I think we need to copy the map when doing parallel execution. Side note - we actually might need to copy the map when doing normal execution too, or else the first execution of a prepared statement with ambiguous placeholder types might possibly type check differently than the second execution. This latter case seems difficult to construct and unimportant in practice though. |
Similar to #22847 |
Similar, but thankfully easier to fix. This doesn't mutate the AST or anything. It modifies the values in EvalContext, which seems much more valid to me. |
Fixes cockroachdb#23171. This change fixes a `concurrent map read and map write` panic. The panic was caused because a shared map that is populated during statement preparation was being updated during statement execution. However, this update was unnecessary because we were simply replacing a value with itself. This change fixes the issue. Release note: None
26670: sql: only set PlaceholderInfo type if not already set r=nvanbenschoten a=nvanbenschoten Fixes #23171. This change fixes a `concurrent map read and map write` panic. The panic was caused because a shared map that is populated during statement preparation was being updated during statement execution. However, this update was unnecessary because we were simply replacing a value with itself. This change fixes the issue. Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
Fixes cockroachdb#23171. This change fixes a `concurrent map read and map write` panic. The panic was caused because a shared map that is populated during statement preparation was being updated during statement execution. However, this update was unnecessary because we were simply replacing a value with itself. This change fixes the issue. Release note: None
Seen when running a local tpcc with @nvanbenschoten's recent RETURNING NOTHING changes.
The text was updated successfully, but these errors were encountered: