Closed iyear closed 1 year ago
It's not as good as cgo sqlite driver, but I think most scenarios that are not performance sensitive. It's better than nothing.
The Kubernetes datastore is VERY performance sensitive. If it performs worse, and we still need to embed the sqlite C code itself in the binary, why would we use this?
Also, rather than adding support for a pure-go driver, this appears to be wholesale replacing the driver, which I don't think I would want to do unless there were clear benefits.
My mistake, I thought it was a TODO. Sorry :(
Also, rather than adding support for a pure-go driver, this appears to be wholesale replacing the driver, which I don't think I would want to do unless there were clear benefits.
Sorry, I didn't get this sentence. I didn't replace the original cgo sqlite, I just added the nocgo implementation.
This has no impact on the existing process or future packaging, it just adds an option.
kine can only provide the cgo version for performance, but developers can also choose a cross-compile friendly version for themselves.
It's not as good as cgo sqlite driver, but I think most scenarios that are not performance sensitive. It's better than nothing.
The scenario refers to the fact that the cluster using sqlite is usually not too large.
And the point of this sentence is that nocgo sqlite is better than a disabled error.
Are the release artifacts still built without cgo/sqlite support? If so that's unintentional. The docker image should support sqlite, as of https://github.com/k3s-io/kine/pull/69
Compile and package the same as before. Will this cause any problems?
brandond@dev01:~/kine$ curl -ksL -o kine https://github.com/k3s-io/kine/releases/download/v0.9.4/kine-amd64; chmod a+x kine; ./kine --debug
INFO[0000] metrics server is starting to listen at :8080
INFO[0000] starting metrics server path /metrics
INFO[0000] Configuring sqlite3 database connection pooling: maxIdleConns=2, maxOpenConns=0, connMaxLifetime=0s
INFO[0000] Configuring database table schema and indexes, this may take a moment...
seems to work fine. I think I'm still not understanding what problem you're trying to solve.
Just like https://github.com/pocketbase/pocketbase#running-and-building
Maybe this is not necessary for kine🤔
Use the docker image, use the release artifact, or use the build script if you want to compile it yourself
Get. Thanks.
https://gitlab.com/cznic/sqlite is the sqlite driver that uses pure go. And it is constantly being updated, using the latest sqlite version.
Supported platforms and architectures: https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures
About Performance:
Related issue: https://gitlab.com/cznic/sqlite/-/issues/39
I also ran the benchmark with the latest code:
It's not as good as cgo sqlite driver, but I think most scenarios that are not performance sensitive. It's better than nothing.
For the
CGO_ENABLED=0
, I have compiled it locally and started it successfully, but did not do any further testing.