Skip to content

update in test PessimisticLocking#151

Merged
avsej merged 1 commit intocouchbase:mainfrom
CosmicSaaurabh:update-KV-locking-test
Mar 16, 2024
Merged

update in test PessimisticLocking#151
avsej merged 1 commit intocouchbase:mainfrom
CosmicSaaurabh:update-KV-locking-test

Conversation

@CosmicSaaurabh
Copy link
Copy Markdown
Contributor

update in test PessimisticLocking, check if CAS value before document locked is same as CAS value after the document gets unlocked

Copy link
Copy Markdown
Contributor

@Matt-Woz Matt-Woz left a comment

Choose a reason for hiding this comment

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

Unfortunately this will now fail on older server versions, maybe we should just remove the assertion? Alternatively we could replace it with $this->assertContains($res->cas(), [$originalCas, $lockedCas]) which should work with both versions. What do you think @avsej ?

@avsej
Copy link
Copy Markdown
Member

avsej commented Mar 15, 2024

I think we should not make any assumptions on the CAS at all. After all it is all about behavior. If the key is locked, it won't be possible to read it. Successful read means correct behavior.

So I would just remove this check completely.

@CosmicSaaurabh
Copy link
Copy Markdown
Contributor Author

Okay, i will remove this assert then.

… locked is same as CAS value after the document gets unlocked
@avsej avsej merged commit 670a310 into couchbase:main Mar 16, 2024
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