Dyalog / Dyalog/DCMS

SQL cursor should be protected via token hold from concurrent reads / writes

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
APL
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

There are currently some holds in [functions that call `SQL`](https://github.com/Dyalog/DCMS/blob/4b88fa207f9e7b7855d75280cd46f9f819d6f911/APLSource/CRUD/Create.aplf#L56) to do database operations, but putting holds inside SQL would better ensure reads and writes are synchronous. For example, [`QUERY.BuildCache`](https://github.com/Dyalog/DCMS/blob/4b88fa207f9e7b7855d75280cd46f9f819d6f911/APLSource/QUERY/BuildCache.aplf#L9) currently does SQL reads when another thread could be in the middle of updates.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing holds around SQL in APLSource/CRUD/Create.aplf and the SQL reads in APLSource/QUERY/BuildCache.aplf. Trace the SQL entry point and determine how a token hold should cover cursor reads and writes; done means concurrent database operations are synchronous without leaving the existing callers unprotected.

Written by the indexing model from the issue text.

Assessment

Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.