Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Oct 11, 2023

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.
  • Attach files