ignore checksum on single node clusters

This commit is contained in:
Todd Gruben 2016-07-07 11:22:15 -05:00
parent 148c9105fb
commit 3b32db998d
2 changed files with 8 additions and 2 deletions

View file

@ -1189,13 +1189,17 @@ func (s *FragmentSyncer) isClosing() bool {
func (s *FragmentSyncer) SyncFragment() error {
// Determine replica set.
nodes := s.Cluster.FragmentNodes(s.Fragment.DB(), s.Fragment.Slice())
if len(nodes) == 1 {
//fmt.Println("no place to replicate", s.Fragment.DB(), s.Fragment.Frame(), s.Fragment.Slice())
return nil
}
// Create a set of blocks.
blockSets := make([][]FragmentBlock, 0, len(nodes))
for _, node := range nodes {
// Read local blocks.
if node.Host == s.Host {
blockSets = append(blockSets, s.Fragment.Blocks())
b := s.Fragment.Blocks()
blockSets = append(blockSets, b)
continue
}

View file

@ -59,6 +59,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
pprof.Profile(w, r)
case "/debug/pprof/symbol":
pprof.Symbol(w, r)
case "/debug/pprof/trace":
pprof.Trace(w, r)
default:
pprof.Index(w, r)
}