mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
Don't write to slaves when unable to contact the master.
This commit is contained in:
@@ -74,7 +74,9 @@ class db_manager:
|
||||
|
||||
def things_iter(self):
|
||||
for name, engines in self._things.iteritems():
|
||||
yield name, [e for e in engines if e not in self.dead]
|
||||
# ensure we ALWAYS return the actual master as the first,
|
||||
# regardless of if we think it's dead or not.
|
||||
yield name, [engines[0]] + [e for e in engines[1:] if e not in self.dead]
|
||||
|
||||
def rels_iter(self):
|
||||
for name, (type1_name, type2_name, engines) in self._relations.iteritems():
|
||||
|
||||
Reference in New Issue
Block a user