-
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
build: upgrade to go 1.20 #96443
Labels
A-build-system
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-dev-inf
Comments
ajwerner
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A-build-system
labels
Feb 2, 2023
3 tasks
ajwerner
added a commit
to ajwerner/cockroach
that referenced
this issue
May 31, 2023
There was one field added to the `p` that matters: needspinning (see golang/go@8cb350d). All of the relevant symbols and structs were re-copied. Some `uintptr`s were replaced with real pointers, and some things were ported to use new atomic types. Relates to cockroachdb#96443. Epic: none Release note: None
craig bot
pushed a commit
that referenced
this issue
May 31, 2023
101693: sql: avoid string to byte conversion copies on insert path r=cucaroach a=cucaroach Originated from: #91930 Incorporate those changes and add a benchmark and add some more changes based on benchmark results. Broken into several commits: ### json: avoid copying json.AsText where possible Epic: None Release note: None ### pgwire: avoid some string to byte copies Most parse routines don't retain the input string pointer so we can use a pointer to the input bytes in those cases. Release note: None Epic: None ### builtins: avoid some []byte to string copies in decode Release note: None Epic: None ### valueside: remove string to []byte copies Release note: None Epic: None ### colenc: use new UnsafeConvertBytesToString Cosmetic change to use the new UnsafeConvertBytesToString. Release note: None Epic: None ### opt: avoid allocation in DBytes interning DBytes is a string under the covers but we usually operate on them with []byte APIs, avoid copies in these cases. Release note: None Epic: None ### tree: allow access to DBytes/DString/DEncodedKey raw bytes Epic: None Release note: None ### encoding: unsafeString -> UnsafeConvertBytesToString Make public for use elsewhere. Release note: None Epic: None ### lex: avoid some string to byte slice copies Facilitate some copy avoidance by using []byte instead of string. Only copy when necessary in some cases. Release note: None Epic: None ### bench: add a large insert benchmark This benchmark shows the reducation in allocations by the copy avoidance changes. Together the changes result in: ``` name old time/op new time/op delta SQL/Cockroach/InsertLarge/count=1000-10 18.7ms ± 4% 19.1ms ±26% ~ (p=0.780 n=9+10) name old alloc/op new alloc/op delta SQL/Cockroach/InsertLarge/count=1000-10 49.7MB ± 4% 39.7MB ±10% -20.19% (p=0.000 n=9+9) name old allocs/op new allocs/op delta SQL/Cockroach/InsertLarge/count=1000-10 39.0k ± 5% 29.7k ± 8% -23.83% (p=0.000 n=10+9) ``` Release note: None Epic: None 103551: build: make master `v23.2.0-alpha.00000000` r=rickystewart,srosenberg,postamar a=renatolabs v23.1.1 has been released, `master` should now be considered to be 23.2. Epic: none Release note: None 103859: goschedstats: support go1.20 r=rickystewart a=ajwerner There was one field added to the `p` that matters: needspinning (see golang/go@8cb350d). All of the relevant symbols and structs were re-copied. Some `uintptr`s were replaced with real pointers, and some things were ported to use new atomic types. Relates to #96443. Epic: none Release note: None 103948: liveness: split liveness cache out r=erikgrinaker a=andrewbaptist Move the liveness caching methods to a new file. Only look at the last 2 commits - I will rebase on master once those are merged. Epic: none Release note: None Co-authored-by: Tommy Reilly <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: ajwerner <[email protected]> Co-authored-by: Andrew Baptist <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-build-system
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-dev-inf
Is your feature request related to a problem? Please describe.
Go 1.20 is out. We generally do like to pick up the upgrades ahead of our major releases. This one is a good one. It has performance improvement in general, compile time improvements, and major improvements to generics. It also may have some good improvements for GC assist.
Additional context
This may help with:
unified
GOEXPERIMENT while we're still on go1.19 #93977A prerequisite for shipping it would be fixing cockroachdb/errors#99. @ajwerner is committed to doing that work in parallel to the dev-inf work to upgrade go.
Jira issue: CRDB-24129
The text was updated successfully, but these errors were encountered: