Changeset

11208:96429946a742

util.hashring: Normalize indentation to tabs
author Kim Alvefur <zash@zash.se>
date Sun, 15 Nov 2020 14:48:59 +0100
parents 11207:4e060ae8520b
children 11209:f6661fac7e9a
files util/hashring.lua
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/util/hashring.lua	Sat Nov 14 22:22:46 2020 +0100
+++ b/util/hashring.lua	Sun Nov 15 14:48:59 2020 +0100
@@ -1,13 +1,13 @@
 local function generate_ring(nodes, num_replicas, hash)
 	local new_ring = {};
-        for _, node_name in ipairs(nodes) do
-                for replica = 1, num_replicas do
-                        local replica_hash = hash(node_name..":"..replica);
-                        new_ring[replica_hash] = node_name;
-                        table.insert(new_ring, replica_hash);
-                end
-        end
-        table.sort(new_ring);
+	for _, node_name in ipairs(nodes) do
+		for replica = 1, num_replicas do
+			local replica_hash = hash(node_name..":"..replica);
+			new_ring[replica_hash] = node_name;
+			table.insert(new_ring, replica_hash);
+		end
+	end
+	table.sort(new_ring);
 	return new_ring;
 end