Value eviction bucket - Replication of deletes with XATTRS will fail if return EWOULD_BLOCK

Description

Problem

As described in https://couchbasecloud.atlassian.net/browse/CBSE-8828#icft=CBSE-8828, for a replica DCP stream. If a previous item that uses XATTRs is to be deleted, however it is not resident - then we must perform a bgfetch - see https://couchbasecloud.atlassian.net/browse/MB-36087#icft=MB-36087. When the bgfetch is complete we replay PassiveStream::messageReceived. However this time it fails because the last seqno now equals the sequence number of the deletion and so it is discarded.

Suggested Possible Solution

  • only set the last seqno to the seqno of the message just received, once the message has been completed or

  • If an EWOULD_BLOCK occurs reserve the setting of the last seqno so the message can be received again.

Fix versions

Labels

Environment

None

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

None

Release Notes Description

None

Attachments

3
  • 04 Sep 2020, 03:48 PM
  • 04 Sep 2020, 03:34 PM
  • 04 Sep 2020, 11:22 AM

backports to

blocks

relates to

Activity

Show:

Shivani Gupta October 20, 2021 at 4:21 PM

Thanks .

Depends on how you define "regression" . I believe the issue was introduced with XATTR support; when replicating deletes to items which previously had XATTRs in them. To hit this issue you need to be using XATTRs, which were new in 5.0.0 - so while it's true we didn't encounter this issue prior to v5, you also need to be using the new v5 feature to hit it.

Customer was upgrading from 6.0 to 6.6. Given that the fix was backported to 6.0.5 also, looks like the issue existed in 6.0.x as well. Likely that the customer was not using XATTRs and their previous upgrades (to 6.0.x) were hence not impacted. So yes, probably not a regression.

CB robot January 19, 2021 at 2:59 PM

Build couchbase-server-7.0.0-4255 contains kv_engine commit 5958386 with commit message:
[BP] https://couchbasecloud.atlassian.net/browse/MB-41255#icft=MB-41255: Don't bgfetch for a replica delete of an xattr

CB robot January 19, 2021 at 2:59 PM

Build couchbase-server-7.0.0-4255 contains kv_engine commit d88694a with commit message:
https://couchbasecloud.atlassian.net/browse/MB-41255#icft=MB-41255: Merge branch '6.5.2' into mad-hatter

CB robot January 19, 2021 at 2:59 PM

Build couchbase-server-7.0.0-4255 contains kv_engine commit c690fba with commit message:
Merge "MB-41255: Merge branch '6.5.2' into mad-hatter" into mad-hatter

CB robot January 4, 2021 at 2:42 PM

Build couchbase-server-6.6.2-9411 contains kv_engine commit 5958386 with commit message:
[BP] https://couchbasecloud.atlassian.net/browse/MB-41255#icft=MB-41255: Don't bgfetch for a replica delete of an xattr

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

Details

Assignee

Reporter

Is this a Regression?

Yes

Triage

Triaged

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created September 1, 2020 at 10:58 AM
Updated October 20, 2021 at 4:21 PM
Resolved September 28, 2020 at 12:35 PM
Instabug