Skip to content

Commit

Permalink
More log cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpert committed Sep 7, 2022
1 parent 2af44e3 commit 9dcacab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions lib/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ func (r *RaftServer) LeaderUpdated(info raftio.LeaderInfo) {
m[info.ClusterID] = info.Term
})
}

log.Debug().Msg(fmt.Sprintf("Leader updated... %v -> %v", info.ClusterID, info.LeaderID))
}

func (r *RaftServer) mutateNodeMap(nodeID uint64, f func(map[uint64]uint64)) {
Expand Down
14 changes: 0 additions & 14 deletions lib/sqlite_log_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/lni/dragonboat/v3/raftio"
"github.com/lni/dragonboat/v3/raftpb"
_ "github.com/mattn/go-sqlite3"
"github.com/rs/zerolog/log"
"github.com/samber/lo"
"marmot/db"
)
Expand Down Expand Up @@ -233,14 +232,6 @@ func (s *SQLiteLogDB) IterateEntries(
high uint64,
maxSize uint64,
) ([]raftpb.Entry, uint64, error) {
logger := log.With().
Uint64("cluster", clusterID).
Uint64("node", nodeID).
Uint64("start", low).
Uint64("end", high).
Uint64("maxSize", maxSize).
Logger()

rows, err := s.db.
Select("payload").
From(raftInfoTable).
Expand Down Expand Up @@ -286,15 +277,10 @@ func (s *SQLiteLogDB) IterateEntries(
return entries, size, nil
}

logger.Trace().
Uint64("size", currentSize).
Int("entries", len(ret)).
Msg("Entries returned...")
return ret, currentSize, nil
}

func (s *SQLiteLogDB) ReadRaftState(clusterID uint64, nodeID uint64, snapshotIndex uint64) (raftio.RaftState, error) {
log.Debug().Msg("ReadRaftState")
entry := raftInfoEntry{}
ret := raftio.RaftState{}

Expand Down

0 comments on commit 9dcacab

Please sign in to comment.