Some Delta Sync errors logged at WARN level should be DEBUG

Description

The change in PR #4457 was intended to log warnings returned to us from go-fleecedelta, and everything else at debug level - but this isn't working as intended due to a quirk in the way error type alises are handled in Go.

Probably need to switch to use an errors.Is/errors.As approach anyway here, so might as well do that as part of the fix.

This can be seen this Go playground example:
https://play.golang.org/p/NRul8FTrQsP

Where err1 is untyped, err2 is trying to be typed with an error type alias but failing, and err3 is a correct implementation of a typed error.

Activity

Show:

CB robot April 7, 2021 at 11:19 PM

Build sync_gateway-3.0.0-173 contains sync_gateway commit 5c0f525 with commit message:
- Fix incorrect error type checking around go-fleecedelta (#4980)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created March 23, 2021 at 7:06 PM
Updated April 16, 2021 at 5:47 PM
Resolved April 7, 2021 at 11:38 PM
Instabug