docs icon indicating copy to clipboard operation
docs copied to clipboard

improve SELECT FOR UPDATE

Open tbg opened this issue 3 years ago • 0 comments

Tobias Grieger (tbg) commented:

Re: SELECT FOR UPDATE

Issue Description

This page could be improved to better educate users on two salient points:

  1. ON UPDATE locks are exclusive locks (see here), so scanning rows FOR UPDATE also blocks reads to those rows that don't specify FOR UPDATE.
  2. Predicates aren't always pushed down to the KV layer, so more locks may be taken out than expected. Ultimately, it matters which KV rows are scanned FOR UPDATE, not which ones are then matched by predicates in the SQL query.

Both are illustrated in this comment.

Suggested Resolution

Docs update :-)

Jira Issue: DOC-3276

tbg avatar Apr 08 '22 15:04 tbg