Skip to content

Commit

Permalink
Merge pull request #63 from github/concurrent-map-access
Browse files Browse the repository at this point in the history
Updated go-cache
  • Loading branch information
Shlomi Noach authored May 24, 2018
2 parents 2f6cc3c + 9b4dc11 commit 963be7d
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 88 deletions.
4 changes: 1 addition & 3 deletions go/group/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ func normalizeRaftNode(node string) string {

// IsLeader tells if this node is the current raft leader
func IsLeader() bool {
future := getRaft().VerifyLeader()
err := future.Error()
return err == nil
return GetState() == raft.Leader
}

// GetLeader returns identity of raft leader
Expand Down
128 changes: 52 additions & 76 deletions vendor/github.com/patrickmn/go-cache/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 51 additions & 8 deletions vendor/github.com/patrickmn/go-cache/cache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 94 additions & 1 deletion vendor/github.com/patrickmn/go-cache/cache_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 963be7d

Please sign in to comment.