Skip to content

Fix errors related to users onboarding feature#1971

Open
lunika wants to merge 3 commits intomainfrom
fix/onboarding
Open

Fix errors related to users onboarding feature#1971
lunika wants to merge 3 commits intomainfrom
fix/onboarding

Conversation

@lunika
Copy link
Member

@lunika lunika commented Mar 10, 2026

Purpose

In version 4.6.0 we introduce an onboarding feature when a new user is created.
A sandbox document is created for the user
And for onboarding documents accesses were created.

On the sandbox creation we have a race condition when more than one user is created at the same time. This an issue we already had on the document creation, so we fixed it using the same solution : a transaction and a lock on the document table.

For the onboarding documents, we don't create accesses anymore; we use the link_trace table instead. So the documents must not be restricted.

Proposal

  • 🐛(backend) create a link_trace record for onboarded documents
  • 🐛(backend) manage race condition when creating sandbox document

When a user is created, we created accesses to a list of onboarding
documents. Doing this have side effect on the proximity search feature.
Instead of creating access, we should create link_reach
@lunika lunika requested a review from jmaupetit March 10, 2026 17:13
@lunika lunika self-assigned this Mar 10, 2026
@lunika lunika added bug Something isn't working backend labels Mar 10, 2026
When a user is created and a sandbox document should be created, we can
have a race condition on the document creation leading to an error for
the user. To avoid this we have to manage this part in a transaction and
locking the document table
We change the strategy on how the new users have access to the
onboarding documents. We should remove all created accesses we don't
want to have anymore. There is no need to add then n the link_trace
table, they are already present in the favorites and user have already
access to it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant