-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[extension/dbstorage] Replace mattn/go-sqlite with non-CGO modernc.org/sqlite #37882
[extension/dbstorage] Replace mattn/go-sqlite with non-CGO modernc.org/sqlite #37882
Conversation
|
||
Implementors can add additional driver support by importing SQL drivers into the program. | ||
See [Golang database/sql package documentation](https://pkg.go.dev/database/sql) for more information. | ||
|
||
`datasource`: the url of the database, in the format accepted by the driver. | ||
|
||
>**NOTE:** If you are using legacy driver `sqlite3` and have additional driver parameters in `datasource` - please follow [migration guide](#migration-guide-from-sqlite3-to-sqlite-driver-options) to update your configuration. | ||
`db_storage` component has compatibility convertor in place, but it's better to review and update used driver parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the changelog indicate the change as breaking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not confident that this change is breaking, because compatibility layer allows graceful migration from one driver to another. But if breaking change label will bring more user attention to this change - it sounds reasonable to make it breaking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated changelog type to breaking
|
Description
Main purpose of this PR - to make 1 component less with CGO dependency according to Coding Guidelines
Despite of the fact that
dbstorage
component is in Alpha state - was added compatibility layer to improve user experience and simplify migration pathTaking in account Alpha stability of component and written compatibility layer - I would expect that this change is not a breaking change
Respective warnings about outdated driver and it's parameters will be added to log during component start
Link to tracking issue
Fixes #35280
Testing
Patched OpenTelemetry Collector with modernc.org/sqlite driver was battle-tested in our environment for several month's in both Persistent Queue Storage and Tracking Storage appliances without no issues
Documentation
README for component was heavily updated to reflect:
sqlite
driver parameterssqlite
driver recommended parameterspgx
driver parameterssqlite3
tosqlite
migration guide