long time lock issue

Open
#146 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
sql
Domain
database

Research direction

Locate the maintenance step that queries sys.dm_db_index_physical_stats and reproduce it while the table is locked. Read the surrounding locking and page-release logic, then verify that applying SET LOCK_TIMEOUT lets the query return and the page lock be released without disrupting the step.

Written by the indexing model from the issue text.

Description

When a table is locked, reading from sys.dm_db_index_physical_stats cannot be run. So, the page lock of this step cannot be released.
The solution is to apply SET LOCK_TIMEOUT before querying sys.dm_db_index_physical_stats
Al Elmi

Dominant language
Jupyter Notebook
Stars
1.6k
Forks
749
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/tigertoolbox

All issues in microsoft/tigertoolbox

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.