1
0
Fork 0

Merge remote-tracking branch 'origin' into remove-ott-compression-controls

master
Philip O'Toole 1 year ago
commit fbd6c3d987

@ -15,6 +15,7 @@ When officially released 8.0 will support (mostly) seamless upgrades from the 7.
- [PR #1362](https://github.com/rqlite/rqlite/pull/1362): Enable SQLite [FTS5](https://www.sqlite.org/fts5.html). Fixes [issue #1361](https://github.com/rqlite/rqlite/issues/1361)
### Implementation changes and bug fixes
- [PR #1368](https://github.com/rqlite/rqlite/pull/1374): Switch to always-on expvar and pprof.
- [PR #1337](https://github.com/rqlite/rqlite/pull/1337): Store can now load from an io.Reader.
- [PR #1339](https://github.com/rqlite/rqlite/pull/1339), [PR #1340](https://github.com/rqlite/rqlite/pull/1340), [PR #1341](https://github.com/rqlite/rqlite/pull/1341): Add `LoadRequest` chunker/dechunker.
- [PR #1343](https://github.com/rqlite/rqlite/pull/1343): Remove previously-obsoleted supported command-line options.
@ -24,7 +25,7 @@ When officially released 8.0 will support (mostly) seamless upgrades from the 7.
- [PR #1385](https://github.com/rqlite/rqlite/pull/1358): Remove support for in-memory databases.
- [PR #1360](https://github.com/rqlite/rqlite/pull/1360): 'go mod' updates, and move to go 1.21.
- [PR #1369](https://github.com/rqlite/rqlite/pull/1369), [PR #1370](https://github.com/rqlite/rqlite/pull/1370): Use singleton, sync'ed, random source.
- [PR #1367](https://github.com/rqlite/rqlite/pull/1367): Move to a WAL-based Snapshot store.
- [PR #1367](https://github.com/rqlite/rqlite/pull/1367): Move to a WAL-based Snapshot store, which unlocks support for much larger data set support.
- [PR #1373](https://github.com/rqlite/rqlite/pull/1373): Remove compression-control command-line options.
## 7.21.4 (July 8th 2023)

@ -131,12 +131,6 @@ type Config struct {
// DiscoConfig sets the path to any discovery configuration file. May not be set.
DiscoConfig string
// Expvar enables go/expvar information. Defaults to true.
Expvar bool
// PprofEnabled enables Go PProf information. Defaults to true.
PprofEnabled bool
// OnDiskPath sets the path to the SQLite file. May not be set.
OnDiskPath string
@ -447,8 +441,6 @@ func ParseFlags(name, desc string, build *BuildInfo) (*Config, error) {
flag.StringVar(&config.DiscoMode, "disco-mode", "", "Choose clustering discovery mode. If not set, no node discovery is performed")
flag.StringVar(&config.DiscoKey, "disco-key", "rqlite", "Key prefix for cluster discovery service")
flag.StringVar(&config.DiscoConfig, "disco-config", "", "Set discovery config, or path to cluster discovery config file")
flag.BoolVar(&config.Expvar, "expvar", true, "Serve expvar data on HTTP server")
flag.BoolVar(&config.PprofEnabled, "pprof", true, "Serve pprof data on HTTP server")
flag.StringVar(&config.OnDiskPath, "on-disk-path", "", "Path for SQLite on-disk database file. If not set, use a file in data directory")
flag.BoolVar(&config.FKConstraints, "fk", false, "Enable SQLite foreign key constraints")
flag.BoolVar(&showVersion, "version", false, "Show version information and exit")

@ -371,8 +371,6 @@ func startHTTPService(cfg *Config, str *store.Store, cltr *cluster.Client, credS
s.CertFile = cfg.HTTPx509Cert
s.KeyFile = cfg.HTTPx509Key
s.ClientVerify = cfg.HTTPVerifyClient
s.Expvar = cfg.Expvar
s.Pprof = cfg.PprofEnabled
s.DefaultQueueCap = cfg.WriteQueueCap
s.DefaultQueueBatchSz = cfg.WriteQueueBatchSz
s.DefaultQueueTimeout = cfg.WriteQueueTimeout

@ -323,9 +323,6 @@ type Service struct {
credentialStore CredentialStore
Expvar bool
Pprof bool
BuildInfo map[string]interface{}
logger *log.Logger
@ -463,9 +460,9 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
case strings.HasPrefix(r.URL.Path, "/readyz"):
stats.Add(numReadyz, 1)
s.handleReadyz(w, r)
case r.URL.Path == "/debug/vars" && s.Expvar:
case r.URL.Path == "/debug/vars":
s.handleExpvar(w, r)
case strings.HasPrefix(r.URL.Path, "/debug/pprof") && s.Pprof:
case strings.HasPrefix(r.URL.Path, "/debug/pprof"):
s.handlePprof(w, r)
default:
w.WriteHeader(http.StatusNotFound)

@ -215,38 +215,6 @@ func Test_404Routes(t *testing.T) {
}
}
func Test_404Routes_ExpvarPprofDisabled(t *testing.T) {
m := &MockStore{}
c := &mockClusterService{}
s := New("127.0.0.1:0", m, c, nil)
if err := s.Start(); err != nil {
t.Fatalf("failed to start service")
}
defer s.Close()
host := fmt.Sprintf("http://%s", s.Addr().String())
client := &http.Client{}
for _, path := range []string{
"/debug/vars",
"/debug/pprof/cmdline",
"/debug/pprof/profile",
"/debug/pprof/symbol",
} {
req, err := http.NewRequest("GET", host+path, nil)
if err != nil {
t.Fatalf("failed to create request: %s", err.Error())
}
resp, err := client.Do(req)
if err != nil {
t.Fatalf("failed to make request: %s", err.Error())
}
if resp.StatusCode != 404 {
t.Fatalf("failed to get expected 404 for path %s, got %d", path, resp.StatusCode)
}
}
}
func Test_405Routes(t *testing.T) {
m := &MockStore{}
c := &mockClusterService{}
@ -343,8 +311,6 @@ func Test_401Routes_NoBasicAuth(t *testing.T) {
m := &MockStore{}
n := &mockClusterService{}
s := New("127.0.0.1:0", m, n, c)
s.Expvar = true
s.Pprof = true
if err := s.Start(); err != nil {
t.Fatalf("failed to start service")
}
@ -386,8 +352,6 @@ func Test_401Routes_BasicAuthBadPassword(t *testing.T) {
m := &MockStore{}
n := &mockClusterService{}
s := New("127.0.0.1:0", m, n, c)
s.Expvar = true
s.Pprof = true
if err := s.Start(); err != nil {
t.Fatalf("failed to start service")
}
@ -434,8 +398,6 @@ func Test_401Routes_BasicAuthBadPerm(t *testing.T) {
m := &MockStore{}
n := &mockClusterService{}
s := New("127.0.0.1:0", m, n, c)
s.Expvar = true
s.Pprof = true
if err := s.Start(); err != nil {
t.Fatalf("failed to start service")
}

@ -14,7 +14,7 @@ func init() {
r = rand.New(rand.NewSource(time.Now().UnixNano()))
}
// RandomString returns a random string of 20 characters
// String returns a random string of 20 characters
func String() string {
mu.Lock()
defer mu.Unlock()

@ -713,7 +713,6 @@ func mustNodeEncrypted(dir string, enableSingle, httpEncrypt bool, mux *tcp.Mux,
clstrDialer := tcp.NewDialer(cluster.MuxClusterHeader, nil)
clstrClient := cluster.NewClient(clstrDialer, 30*time.Second)
node.Service = httpd.New("localhost:0", node.Store, clstrClient, nil)
node.Service.Expvar = true
if httpEncrypt {
node.Service.CertFile = node.HTTPCertPath
node.Service.KeyFile = node.HTTPKeyPath

@ -1290,7 +1290,6 @@ func Test_SingleNodeAutoRestore(t *testing.T) {
clstrDialer := tcp.NewDialer(cluster.MuxClusterHeader, nil)
clstrClient := cluster.NewClient(clstrDialer, 30*time.Second)
node.Service = httpd.New("localhost:0", node.Store, clstrClient, nil)
node.Service.Expvar = true
if err := node.Service.Start(); err != nil {
t.Fatalf("failed to start HTTP server: %s", err.Error())

Loading…
Cancel
Save