Browse Source

Merge pull request #1974 from tendermint/master

Merge master back to develop
pull/1975/head
Ethan Buchman 7 years ago
committed by GitHub
parent
commit
8a5930ad72
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 12 deletions
  1. +14
    -5
      CHANGELOG.md
  2. +8
    -0
      libs/pubsub/pubsub.go
  3. +7
    -3
      node/node.go
  4. +10
    -0
      node/node_test.go
  5. +2
    -2
      types/event_bus.go
  6. +2
    -2
      version/version.go

+ 14
- 5
CHANGELOG.md View File

@ -1,13 +1,25 @@
# Changelog
## TBD
## 0.22.4
IMPROVEMENTS:
*July 14th, 2018*
BREAKING CHANGES:
- [genesis] removed deprecated `app_options` field.
- [types] Genesis.AppStateJSON -> Genesis.AppState
FEATURES:
- [tools] Merged in from github.com/tendermint/tools
BUG FIXES:
- [tools/tm-bench] Various fixes
- [consensus] Wait for WAL to stop on shutdown
- [abci] Fix #1891, pending requests cannot hang when abci server dies. Previously a crash in BeginBlock could leave tendermint in broken state.
## 0.22.3
*July 10th, 2018*
IMPROVEMENTS
- Update dependencies
* pin all values in Gopkg.toml to version or commit
@ -29,7 +41,6 @@ BUG FIXES
- NOTE: this is only for URI requests. JSONRPC requests and all responses
will use quoted integers (the proto3 JSON standard).
- [consensus] Fix halt on shutdown
- [tm_bench] Fix method of computing start time, and end time
## 0.22.1
@ -46,8 +57,6 @@ BUG FIXES
already in the validator set.
* [consensus] Shut down WAL properly.
BUG FIXES:
- [abci] Fix #1891, pending requests cannot hang when abci server dies. Previously a crash in BeginBlock could leave tendermint in broken state.
## 0.22.0


+ 8
- 0
libs/pubsub/pubsub.go View File

@ -163,6 +163,8 @@ func (s *Server) Subscribe(ctx context.Context, clientID string, query Query, ou
return nil
case <-ctx.Done():
return ctx.Err()
case <-s.Quit():
return nil
}
}
@ -190,6 +192,8 @@ func (s *Server) Unsubscribe(ctx context.Context, clientID string, query Query)
return nil
case <-ctx.Done():
return ctx.Err()
case <-s.Quit():
return nil
}
}
@ -211,6 +215,8 @@ func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error {
return nil
case <-ctx.Done():
return ctx.Err()
case <-s.Quit():
return nil
}
}
@ -229,6 +235,8 @@ func (s *Server) PublishWithTags(ctx context.Context, msg interface{}, tags TagM
return nil
case <-ctx.Done():
return ctx.Err()
case <-s.Quit():
return nil
}
}


+ 7
- 3
node/node.go View File

@ -486,9 +486,16 @@ func (n *Node) OnStop() {
n.BaseService.OnStop()
n.Logger.Info("Stopping Node")
// first stop the non-reactor services
n.eventBus.Stop()
n.indexerService.Stop()
// now stop the reactors
// TODO: gracefully disconnect from peers.
n.sw.Stop()
// finally stop the listeners / external services
for _, l := range n.rpcListeners {
n.Logger.Info("Closing rpc listener", "listener", l)
if err := l.Close(); err != nil {
@ -496,9 +503,6 @@ func (n *Node) OnStop() {
}
}
n.eventBus.Stop()
n.indexerService.Stop()
if pvsc, ok := n.privValidator.(*privval.SocketPV); ok {
if err := pvsc.Stop(); err != nil {
n.Logger.Error("Error stopping priv validator socket client", "err", err)


+ 10
- 0
node/node_test.go View File

@ -2,6 +2,9 @@ package node
import (
"context"
"fmt"
"os"
"syscall"
"testing"
"time"
@ -43,6 +46,13 @@ func TestNodeStartStop(t *testing.T) {
select {
case <-n.Quit():
case <-time.After(5 * time.Second):
pid := os.Getpid()
p, err := os.FindProcess(pid)
if err != nil {
panic(err)
}
err = p.Signal(syscall.SIGABRT)
fmt.Println(err)
t.Fatal("timed out waiting for shutdown")
}
}

+ 2
- 2
types/event_bus.go View File

@ -4,9 +4,9 @@ import (
"context"
"fmt"
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/log"
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
)
const defaultCapacity = 0
@ -49,7 +49,7 @@ func (b *EventBus) OnStart() error {
}
func (b *EventBus) OnStop() {
b.pubsub.OnStop()
b.pubsub.Stop()
}
func (b *EventBus) Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, out chan<- interface{}) error {


+ 2
- 2
version/version.go View File

@ -4,13 +4,13 @@ package version
const (
Maj = "0"
Min = "22"
Fix = "3"
Fix = "4"
)
var (
// Version is the current version of Tendermint
// Must be a string because scripts like dist.sh read this file.
Version = "0.22.3"
Version = "0.22.4"
// GitCommit is the current HEAD set using ldflags.
GitCommit string


Loading…
Cancel
Save