Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve sql semaphore wait logic #264

Copy link
Copy link

Description

@madelson
Issue body actions

New description

It is OK to block on the first ticket since we only block when we determine that nothing is free. However, we need to lengthen the wait a bit.

Old description

currently we do a 32ms wait on the first ticket we try. This is both (sometimes) too short for deadlock detection and also non-optimal because we might end up blocking when another ticket is currently free.

A better approach would be:

  • Wait only the LAST ticket we try instead of the first (@i == @{MaxCountParameter} - 1)
  • Instead of passing bool allowWait, we should pass in string? singleWaitExpression which will be something like expiry is never (inf) ? 250 : min(250, (1/3)(expiry - now))
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.