From 95786e577c328778de9a734bcd664dd7a7daf46b Mon Sep 17 00:00:00 2001 From: gholt Date: Wed, 13 Jun 2012 01:55:11 +0000 Subject: [PATCH] Update swift-get-nodes to return fewer more_nodes Changed swift-get-nodes to just return up to replica_count of more_nodes instead of all of them. When you have thousands of drives, returning all possible handoff nodes is pretty crazy. :) Change-Id: I864e7243726ca3ef2ac08c4ab660a05789f37878 --- bin/swift-get-nodes | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes index 94b5dc0eab..166a64e7e7 100755 --- a/bin/swift-get-nodes +++ b/bin/swift-get-nodes @@ -65,7 +65,11 @@ elif len(sys.argv) > 2: target = "%s" % (account) loc = 'accounts' -more_nodes = list(ring.get_more_nodes(part)) +more_nodes = [] +for more_node in ring.get_more_nodes(part): + more_nodes.append(more_node) + if len(more_nodes) >= ring.replica_count: + break print '\nAccount \t%s' % account print 'Container\t%s' % container