From 5fdfe925456e425799818df36e8da9c7de96e6a8 Mon Sep 17 00:00:00 2001 From: Liang Guo Date: Fri, 8 Aug 2014 20:56:38 -0700 Subject: [PATCH] Fix topology.py bug --- py/vtdb/topology.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/vtdb/topology.py b/py/vtdb/topology.py index a3faa11fe2..fd594f2c24 100644 --- a/py/vtdb/topology.py +++ b/py/vtdb/topology.py @@ -106,8 +106,8 @@ def read_topology(zkocc_client, read_fqdb_keys=True): try: ks = keyspace.read_keyspace(zkocc_client, keyspace_name) __set_keyspace(ks) - for shard_name in ks.shard_names: - for db_type in ks.db_types: + for db_type in ks.db_types: + for shard_name in ks.get_shard_names(db_type): db_key_parts = [ks.name, shard_name, db_type] db_key = '.'.join(db_key_parts) db_keys.append(db_key)