From ddb403956443106476d00780fa133aa3186e6155 Mon Sep 17 00:00:00 2001 From: Philip O'Toole <philip@influxdb.com> Date: Tue, 8 Dec 2015 06:47:52 -0800 Subject: [PATCH] More precise error checking This is due to currently brittle error "marshalling" in our system, so a more precise compare is required. Fixes issue #5037. --- monitor/service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor/service.go b/monitor/service.go index 51a8970083..6cc9ed0550 100644 --- a/monitor/service.go +++ b/monitor/service.go @@ -330,7 +330,8 @@ func (m *Monitor) createInternalStorage() { return } - if err := m.MetaStore.DropRetentionPolicy(m.storeDatabase, "default"); err != nil && err != influxdb.ErrRetentionPolicyNotFound("default") { + err := m.MetaStore.DropRetentionPolicy(m.storeDatabase, "default") + if err != nil && err.Error() != influxdb.ErrRetentionPolicyNotFound("default").Error() { m.Logger.Printf("failed to delete retention policy 'default', failed to created internal storage: %s", err.Error()) return }