Skip to content

slack-vitess-r14.0.5: backport vitessio/vitess#12223 to fix vtorc GLIBC error#117

Merged
timvaillancourt merged 3 commits intoslack-vitess-r14.0.5from
bp-12223-slack-vitess-r14.0.5
Aug 15, 2023
Merged

slack-vitess-r14.0.5: backport vitessio/vitess#12223 to fix vtorc GLIBC error#117
timvaillancourt merged 3 commits intoslack-vitess-r14.0.5from
bp-12223-slack-vitess-r14.0.5

Conversation

@timvaillancourt
Copy link

@timvaillancourt timvaillancourt commented Aug 14, 2023

Description

This PR backports vitessio#12223 (v15 backport - original PR) to resolve GLIBC problems with vtorc. TL;DR, the SQLite driver is moved to pure-Golang implementation

Luckily, this fix is in v15 so we don't need to keep maintaining it 🎉

Related Issue(s)

vitessio#12223

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

* Move vtorc from go-sqlite3 to modernc.org/sqlite (vitessio#12214)

* Move vtorc from go-sqlite3 to modernc.org/sqlite

This moves vtorc from the go-sqlite3 library that uses CGO, to use
modernc.org/sqlite which is a pure Go implementation.

vtorc is the only component we have to build with CGO but it's causing
pain for releases since we need to build it against an old Linux for
linking against glibc.

Using modernc.org/sqlite allows for using Go only again and makes all
Vitess components buildable without CGO.

In
https://datastation.multiprocess.io/blog/2022-05-12-sqlite-in-go-with-and-without-cgo.html
someone ran some basic benchmarks. It shows that the pure Go version can
be twice as slow, but the usage of vtorc is very limited and we operate
on small datasets, so I think the performance impact purely of a
somewhat slower sqlite implementation is negligable.

None of this is in a hot query serving path or anything like that, so I
have little concern performance wise.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Fix error handling in RowToArray

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* empty-commit

Signed-off-by: Manan Gupta <manan@planetscale.com>

* Run go mod tidy

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @dbussink to sign the Salesforce Inc. Contributor License Agreement.

@timvaillancourt timvaillancourt changed the title Release-15: Cherry pick vtorc no cgo (#12223) slack-vitess-r14.0.5: backport vitessio/vitess##12223 to fix vtorc GLIBC error Aug 14, 2023
@timvaillancourt timvaillancourt changed the title slack-vitess-r14.0.5: backport vitessio/vitess##12223 to fix vtorc GLIBC error slack-vitess-r14.0.5: backport vitessio/vitess#12223 to fix vtorc GLIBC error Aug 14, 2023
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt marked this pull request as ready for review August 14, 2023 20:51
@timvaillancourt timvaillancourt requested a review from a team as a code owner August 14, 2023 20:51
@timvaillancourt timvaillancourt merged commit 772645c into slack-vitess-r14.0.5 Aug 15, 2023
@timvaillancourt timvaillancourt deleted the bp-12223-slack-vitess-r14.0.5 branch August 15, 2023 12:24
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.

3 participants