1
0
Fork 0

Merge branch 'master' of github.com:rqlite/rqlite into cluster-execute-queries

master
Philip O'Toole 3 years ago
commit 7cfb8cc837

@ -1,4 +1,4 @@
## 6.2.0 (unreleased)
## 6.2.0 (August 18th 2021)
### New features
- [PR #851](https://github.com/rqlite/rqlite/pull/851), [PR #855](https://github.com/rqlite/rqlite/pull/855): rqlite CLI properly supports PRAGMA directives.
- [PR #853](https://github.com/rqlite/rqlite/pull/853): Support enabling Foreign Key constraints via command-line options.
@ -7,6 +7,7 @@
### Implementation changes and bug fixes
- [PR #857](https://github.com/rqlite/rqlite/pull/857): Use Protobufs as core data model.
- [PR #858](https://github.com/rqlite/rqlite/pull/858): Create dedicated client for talking to a cluster service.
- [PR #862](https://github.com/rqlite/rqlite/pull/862): Add detailed SQLite memory statistics to status output.
## 6.1.0 (August 5th 2021)
This release makes significant changes to SQLite database connection handling, resulting in proper support for high-performance concurrent reads of in-memory databases (an in-memory SQLite database is the default option for rqlite).

@ -21,7 +21,7 @@ build_script:
- go version
- go get ./...
- go build -i ./...
- go test -v ./...
- go test ./...
after_build:
- 7z a rqlite-latest-win64.zip %GOPATH%\bin\rq*.exe

@ -260,6 +260,10 @@ func (db *DB) Stats() (map[string]interface{}, error) {
if err != nil {
return nil, err
}
memStats, err := db.memStats()
if err != nil {
return nil, err
}
connPoolStats := map[string]interface{}{
"ro": db.ConnectionPoolStats(db.roDB),
"rw": db.ConnectionPoolStats(db.rwDB),
@ -271,6 +275,7 @@ func (db *DB) Stats() (map[string]interface{}, error) {
stats := map[string]interface{}{
"version": DBVersion,
"compile_options": copts,
"mem_stats": memStats,
"db_size": dbSz,
"rw_dsn": string(db.rwDSN),
"ro_dsn": db.roDSN,
@ -742,6 +747,26 @@ func (db *DB) Dump(w io.Writer) error {
return nil
}
func (db *DB) memStats() (map[string]int64, error) {
ms := make(map[string]int64)
for _, p := range []string{
"max_page_count",
"page_count",
"page_size",
"hard_heap_limit",
"soft_heap_limit",
"cache_size",
"freelist_count",
} {
res, err := db.QueryStringStmt(fmt.Sprintf("PRAGMA %s", p))
if err != nil {
return nil, err
}
ms[p] = res[0].Values[0].Parameters[0].GetI()
}
return ms, nil
}
func copyDatabase(dst *DB, src *DB) error {
dstConn, err := dst.rwDB.Conn(context.Background())
if err != nil {

@ -9,8 +9,8 @@ apt-get install -y curl git bison make mercurial
# Go
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source ~/.gvm/scripts/gvm
gvm install go1.14
gvm use go1.14
gvm install go1.16
gvm use go1.16
# rqlite
mkdir -p rqlite

Loading…
Cancel
Save