From 4bbef0ec3008ea611bec71a3ba25bab7f6d29ad4 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Mon, 23 Oct 2017 21:34:53 +0100 Subject: [PATCH] Bypass the fanout storage merging if no remote storage is configured. --- storage/fanout.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/fanout.go b/storage/fanout.go index 2bc4323a7..fe5c17f63 100644 --- a/storage/fanout.go +++ b/storage/fanout.go @@ -34,6 +34,10 @@ type fanout struct { // NewFanout returns a new fan-out Storage, which proxies reads and writes // through to multiple underlying storages. func NewFanout(logger log.Logger, primary Storage, secondaries ...Storage) Storage { + if len(secondaries) == 0 { + return primary + } + return &fanout{ logger: logger, primary: primary,