[SERVER-12879] validate command may block authentication Created: 25/Feb/14  Updated: 10/Dec/14  Resolved: 27/Feb/14

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 2.4.9
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

1. Run a long running validate.
2. Attempt a write to the db.
3. Attempt to authenticate to the db.

Participants:

 Description   

While validate runs, it holds a read lock on the db and does not yield. We should investigate whether this blocks authentication on the database if a writer queues during this process.



 Comments   
Comment by Andy Schwerin [ 25/Feb/14 ]

Yes, in 2.6 only locks that prevent access to the admin database may
interfere with authentication. In 2.4, the database being accessed by an
operation might also prevent authentication. That means that the only time
writes to other databases can affect authentication is when they convoy
with global locks. Eg , committing in the write lock, and other such
circumstances.

Comment by Eric Milkie [ 25/Feb/14 ]

Thanks for the clarifications. Are there any details that change between version 2.4 and 2.6?

Comment by Andy Schwerin [ 25/Feb/14 ]

It may block authentication when all of the following apply:

  1. Validate is executing.
  2. A writer arrives for the admin database OR the system chooses to remap a portion of the private view from the shared view.

There are other circumstances as well. If some thread holds a write lock on the "admin" database, or any thread holds a global read lock while a writer is attempting to write, AND the user being authenticated is not present in the users cache, login may block.

Generated at Thu Feb 08 03:29:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.