DCP 'commit' consumer/producer discrepancy of 1 byte leads to DCP halt

Description

In 6.5 we added namespace support in KV-engine, a technique used by durability and a stepping stone towards collections.

This means that a key in many places (disk/memory) gets a namespace prefix, all committed keys get the "default" collection prefix of a single empty byte (0) and prepared writes get a a prefix of 2. This means that when the user stores a document with a 3-byte key of "JIM", in memory it gets 4 bytes "0JIM".

When DCP replicates that document, there is no namespace support over the wire and "0JIM" gets replicated as "JIM".

This leads to an issue in buffer-ack when we do DCP commit.

The producer is recording the namepaced length but the consumer is acking for the un-namespaced size - a 1 byte difference.

Fix versions

Labels

Environment

None

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

Activity

Show:

CB robot June 15, 2021 at 5:25 PM

Build couchbase-server-7.1.0-1022 contains kv_engine commit ea78730 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-46482#icft=MB-46482: Producer to account for namespace of keys for commit/abort

CB robot June 11, 2021 at 11:10 PM

Build couchbase-server-7.1.0-1015 contains kv_engine commit 5f5ffee with commit message:
https://couchbasecloud.atlassian.net/browse/MB-46482#icft=MB-46482: Producer to account for namespace of keys for commit/abort

Ashwin Govindarajulu June 10, 2021 at 6:04 AM
Edited

Validated the same test on 7.0.0-5274. Test ran fine.

Also tested upgrade from 6.6.2 cluster after the issue hit. Upgrade to 7.0.0-5274.

CB robot June 4, 2021 at 2:00 PM

Build couchbase-server-7.0.1-5825 contains kv_engine commit ea78730 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-46482#icft=MB-46482: Producer to account for namespace of keys for commit/abort

CB robot June 4, 2021 at 1:29 PM

Build couchbase-server-7.0.0-5272 contains kv_engine commit ea78730 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-46482#icft=MB-46482: Producer to account for namespace of keys for commit/abort

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

Details

Assignee

Reporter

Is this a Regression?

No

Triage

Triaged

Due date

Story Points

Sprint

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created May 24, 2021 at 2:59 PM
Updated January 3, 2023 at 11:54 AM
Resolved May 27, 2021 at 8:17 AM
Instabug