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.
pull/5043/head
Philip O'Toole 2015-12-08 06:47:52 -08:00
parent 9c65e1750a
commit ddb4039564
1 changed files with 2 additions and 1 deletions

View File

@ -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
}