linxgnu / mssqlx Goto Github PK
View Code? Open in Web Editor NEWDatabase client library, proxy for any master slave, master master structures. Lightweight, performant and auto balancing in mind.
License: MIT License
Database client library, proxy for any master slave, master master structures. Lightweight, performant and auto balancing in mind.
License: MIT License
I was hoping to make our application more resilient against db outages, but when one of the dsns is down during initial connect the first query will trigger a segfault:
github.com/linxGnu/mssqlx._query.func1(0x6b2da8, 0xc000124200, 0xc000140060, 0xc0000fd858)
/home/jasper/go/pkg/mod/github.com/linx!gnu/[email protected]/mssqlx.go:682 +0x3b
github.com/linxGnu/mssqlx.retryBackoff(0xc0000341e0, 0x48, 0xc0000fd8c0, 0x0, 0x16, 0x2, 0x16)
/home/jasper/go/pkg/mod/github.com/linx!gnu/[email protected]/mssqlx.go:521 +0x65
github.com/linxGnu/mssqlx._query(0x9c5600, 0xc0000ae058, 0xc000106680, 0xc0000341e0, 0x48, 0x0, 0x0, 0x0, 0x48, 0xc000176280, ...)
/home/jasper/go/pkg/mod/github.com/linx!gnu/[email protected]/mssqlx.go:681 +0x14a
github.com/linxGnu/mssqlx.(*DBs).Query(...)
/home/jasper/go/pkg/mod/github.com/linx!gnu/[email protected]/mssqlx.go:702
I think it can be fixed by using sqlx.Open
in ConnectMasterSlaves
instead of sqlx.Connect
here:
Line 1488 in 28aead0
Line 779 in 7295fe3
As per commenting on the function: "Errors are deferred until Row's Scan method is called."
This implementation mistake has been made with all variations of the "QueryRow" functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.