Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tee): correct previous fix for race condition in batch locking #3358

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

pbeza
Copy link
Collaborator

@pbeza pbeza commented Dec 4, 2024

What ❔

Commit a7dc0ed (PR #3342) was supposed to fix a race condition in batch locking by introducing SQL row-locking, but it didn't work as expected.
Screenshot From 2024-12-04 11-32-32
Now we are switching back to coarser-grained table-level locking as originally suggested by Harald. The original fix was hard to test unless deployed to stage due to the undeterministic nature of the problem, so we needed to merge it to the main branch to properly test it.

Why ❔

To fix the bug that only activates after running zksync-tee-prover on multiple instances.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

Commit a7dc0ed (PR #3342) was supposed
to fix a race condition in batch locking by introducing SQL row-locking,
but it didn't work as expected. Now we are switching back to
coarser-grained table-level locking as [originally suggested][1] by
Harald. The original fix was hard to test unless deployed to `stage` due
to the undeterministic nature of the problem, so we needed to merge it
to the `main` branch to properly test it.

[1]: #3342 (comment)
@pbeza
Copy link
Collaborator Author

pbeza commented Dec 4, 2024

@haraldh, let's get this merged. ✅

@haraldh haraldh added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit b12da8d Dec 4, 2024
34 checks passed
@haraldh haraldh deleted the tee/fix/atomic-batch-locking2 branch December 4, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants