Serialization/Transcoding Errors Are Unhandled

Description

If you use InsertAsync (haven't tried with Upsert or others) with byte[] content without specifying the legacy encoder, you the request never hits the wire and the operation eventually fails with a timeout.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Jeffry Morris October 29, 2020 at 11:42 PM

Likely bump this to 3.0.8; note its caused by a regression in

Jeffry Morris October 29, 2020 at 1:18 AM
Edited

The default JsonTranscoder does not support byte[] arrays by design. If a byte array is encountered a NotSupportedException with a message is thrown, however, this exception is swallowed and operation does not complete until the Task times out:

System.TimeoutException : The operation has timed out.

For the default 2.5s this doesn't seem so bad, however, if you set the timeout to a longer duration (5 minutes for examples), the code will hang there waiting for the operation timeout so it can continue. This happens here: https://github.com/couchbase/couchbase-net-client/blob/master/src/Couchbase/Core/IO/Connections/DataFlow/DataFlowConnectionPool.cs#L335

Jeffry Morris October 20, 2020 at 5:56 PM

Work around: use the LegacyTranscoder

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

Details

Assignee

Reporter

Story Points

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created September 24, 2020 at 10:32 PM
Updated November 2, 2020 at 12:33 PM
Resolved November 2, 2020 at 12:33 PM
Instabug