Merge pull request #359 from influxdb/fix-359-log-compaction
Influxdb isn't functional after restarting the entire clusterpull/342/head
commit
549eff33de
|
@ -31,6 +31,7 @@ build/
|
|||
/main
|
||||
godef
|
||||
gosym
|
||||
gocode
|
||||
|
||||
# dependencies
|
||||
src/code.google.com/p/log4go
|
||||
|
@ -42,6 +43,7 @@ src/code.google.com/p/go.crypto/
|
|||
src/launchpad.net/gocheck/
|
||||
/src/github.com/nsf/gocode/
|
||||
/src/github.com/*
|
||||
!/src/github.com/goraft/
|
||||
out_rpm/
|
||||
packages/
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "src/github.com/goraft/raft"]
|
||||
path = src/github.com/goraft/raft
|
||||
url = git@github.com:goraft/raft.git
|
|
@ -20,7 +20,7 @@ endif
|
|||
export GOARCH
|
||||
export CGO_ENABLED
|
||||
|
||||
.PHONY: all valgrind parser package replace_version_string build binary_package
|
||||
.PHONY: all valgrind parser package replace_version_string build binary_package dependencies
|
||||
|
||||
all: | parser valgrind build test integration_test
|
||||
|
||||
|
@ -124,6 +124,7 @@ $(dependencies_paths):
|
|||
for i in $(dependencies); do $(GO) get -d $$i; done
|
||||
|
||||
dependencies: src/$(levigo_dependency) $(dependencies_paths) $(leveldb_deps) $(snappy_deps)
|
||||
git submodule update --init
|
||||
|
||||
test_dependencies: dependencies
|
||||
$(GO) get launchpad.net/gocheck
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d660352794fc8ed9af25e74bd92598eeb4611ef6
|
|
@ -84,7 +84,7 @@ func (self *ServerSuite) precreateShards(server *ServerProcess, c *C) {
|
|||
time.Sleep(time.Second)
|
||||
go self.createShards(server, int64(3600), "false", c)
|
||||
go self.createShards(server, int64(86400), "true", c)
|
||||
time.Sleep(2 * time.Second)
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
|
||||
func (self ServerSuite) createShards(server *ServerProcess, bucketSize int64, longTerm string, c *C) {
|
||||
|
@ -641,6 +641,29 @@ func (self *ServerSuite) TestRestartAfterCompaction(c *C) {
|
|||
c.Assert(series.Points, HasLen, 1)
|
||||
}
|
||||
|
||||
func (self *ServerSuite) TestEntireClusterRestartAfterCompaction(c *C) {
|
||||
for i := 0; i < 3; i++ {
|
||||
resp := self.serverProcesses[i].Post("/raft/force_compaction?u=root&p=root", "", c)
|
||||
c.Assert(resp.StatusCode, Equals, http.StatusOK)
|
||||
}
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
self.serverProcesses[i].Stop()
|
||||
}
|
||||
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
self.serverProcesses[i].Start()
|
||||
}
|
||||
|
||||
time.Sleep(time.Second * 3)
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
self.serverProcesses[i].Get("/ping", c)
|
||||
}
|
||||
}
|
||||
|
||||
// For issue #140 https://github.com/influxdb/influxdb/issues/140
|
||||
func (self *ServerSuite) TestRestartServers(c *C) {
|
||||
data := `
|
||||
|
|
Loading…
Reference in New Issue