BlueBrain / BlueBrain/nexus

Improve saving state

Open
#3,797 0 comments 0 reactions 0 assignees View on GitHub
delta enhancement
Dominant language
Scala
Stars
301
Forks
76
PR merge metrics
No merged PRs in 30d

Description

**Motivation**
We could improve both readability and performance when saving states by getting rid of the preliminary select.

**Acceptance criteria**
By applying the following approach (we gain one roundtrip to the database):
* if tag is Latest and rev == 1: INSERT command
* if tag is Latest and rev >1: UPDATE command
* If tag is a custom tag: INSERT command with a ON CONFLICT clause

Contributor guide

Open the contributing guide

Research direction

Locate the state-saving implementation and identify the preliminary database select and existing revision/tag handling. Verify the INSERT, UPDATE, and ON CONFLICT paths against the acceptance criteria, then confirm that saving a state uses one fewer database roundtrip.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, sql
Domain
backend, database
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.