 	constructor: (@clients) ->
 	
 	exec: (callback) ->
+		primaryError = null
+		primaryResult = null
 		jobs = @clients.map (client) ->
 			(cb) ->
 				timer = new Metrics.Timer("redis.#{client.driver}.exec")

					client.rclient[command] args_with_key..., (error, result...) ->
						timer.done()
						if client.primary
							# Return this result as the actual result
							callback(error, result...)
						# Send the rest through for comparison
						cb(error, result...)
			async.parallel jobs, (error, results) ->
				if error?
					logger.error {err: error}, "error in redis backend"
				else
					compareResults(results)

		MultiClient.prototype[command] = (args...) ->
			for client in @clients

for command, key_pos of COMMANDS
	do (command, key_pos) ->
		Client.prototype[command] = (args..., callback) ->
			primaryError = null
			primaryResult = null
			jobs = @clients.map (client) ->
				(cb) ->
					key_builder = args[key_pos]
