Skip to content

Instantly share code, notes, and snippets.

@clayg
Created February 28, 2018 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/cd8ae83cb7a52dc665454692af6b546f to your computer and use it in GitHub Desktop.
Save clayg/cd8ae83cb7a52dc665454692af6b546f to your computer and use it in GitHub Desktop.
this will be fun!
diff --git a/swift/container/sharder.py b/swift/container/sharder.py
index 983ea35..1eed14e 100644
--- a/swift/container/sharder.py
+++ b/swift/container/sharder.py
@@ -575,7 +575,7 @@ class ContainerSharder(ContainerReplicator):
# TODO: bring back leader election (maybe?); if so make it
# on-demand since we may not need to know if we are leader for all
# states
- is_leader = node['index'] == 0
+ is_leader = True
try:
if state in (UNSHARDED, COLLAPSED):
if broker.get_shard_ranges():
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment