Skip to content

Commit

Permalink
Using READPAST,READCOMMITTEDLOCK instead of NOLOCK to not read uncomm…
Browse files Browse the repository at this point in the history
…itted rows (#1292)
  • Loading branch information
ramonsmits authored Feb 16, 2024
1 parent 8f54c22 commit 63335fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ SELECT TOP 1 GETUTCDATE() as UtcNow, Due as NextDue
ORDER BY Due";

public static readonly string PeekText = @"
SELECT isnull(cast(max([RowVersion]) - min([RowVersion]) + 1 AS int), 0) Id FROM {0} WITH (nolock)";
SELECT isnull(cast(max([RowVersion]) - min([RowVersion]) + 1 AS int), 0) Id FROM {0} WITH (READPAST, READCOMMITTEDLOCK)";

public static readonly string AddMessageBodyStringColumn = @"
IF NOT EXISTS (
Expand Down

0 comments on commit 63335fb

Please sign in to comment.