Skip to content

ING-2061: Update CheckDocument to handle doc locked - #372

Merged
chvck merged 1 commit into
masterfrom
ing2061
Jul 21, 2026
Merged

ING-2061: Update CheckDocument to handle doc locked#372
chvck merged 1 commit into
masterfrom
ing2061

Conversation

@chvck

@chvck chvck commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the XDCR CheckDocument RPC flow to recognize and surface a “document locked” condition, returning a FailedPrecondition status (with PreconditionFailure details) instead of proceeding with conflict resolution logic.

Changes:

  • Added a DocLocked subtest to ensure CheckDocument returns codes.FailedPrecondition with a LOCKED violation when the target document is locked.
  • Updated XdcrServer.CheckDocument to detect the locked-document condition (via a special CAS value) and return a DocLocked status.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
gateway/test/xdcr_test.go Adds test coverage asserting CheckDocument fails with LOCKED when the document is locked.
gateway/dataimpl/server_v1/xdcrserver.go Adds locked-document detection in CheckDocument and returns a FailedPrecondition error.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gateway/dataimpl/server_v1/xdcrserver.go
Comment thread gateway/dataimpl/server_v1/xdcrserver.go
@chvck
chvck merged commit 910af15 into master Jul 21, 2026
27 checks passed
@chvck
chvck deleted the ing2061 branch July 21, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants