Lock on session start level with provided keys
Scenario:
Parallel DB updates with transactions on multiple collections that use same documents.
Example: Calculate some common stuff to embed it in extra collections to avoid lookups.
Problem:
Lock and timeout on documents uses up valuable time and performance.
Also lock conflicts produce a huge amount of exceptions that need to be handled.
Idea:
Key-based sessions
Example:
Session A with Keys 1 and 2 is started.
Session B tries to start with Key 1. Key 1 is locked with Session A. Session B waits till Session A is finished.
In this case transaction doesn't start with updating and failing. Waiting for session doesn't use up resources.
7
votes
Dimitri
shared this idea