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

Refactor lock acquisition and release logic #661

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

thelostone-mc
Copy link
Member

Used a bit of gpt to figure out how to handle the lock situation

  • Updated variable declarations for lock acquisition to avoid shadowing and improve readability.
  • Simplified lock acquisition and release logic, ensuring that all acquired locks are properly released in the finally block.
  • Added checks to release only the locks that were successfully acquired.

@thelostone-mc thelostone-mc merged commit 9991715 into PAR-362 Sep 9, 2024
2 checks passed
@thelostone-mc thelostone-mc deleted the PAR-367 branch September 9, 2024 09:27
thelostone-mc added a commit that referenced this pull request Sep 9, 2024
* update lock logic

* forceRelease of schema
thelostone-mc added a commit that referenced this pull request Sep 9, 2024
* update lock logic

* forceRelease of schema
thelostone-mc added a commit that referenced this pull request Sep 9, 2024
* update lock logic

* forceRelease of schema
0xKurt added a commit that referenced this pull request Sep 9, 2024
thelostone-mc pushed a commit that referenced this pull request Sep 9, 2024
* update schema name

* updates

* fix

* Revert "Refactor lock acquisition and release logic (#661)"

This reverts commit 9a2ffe1.
0xKurt pushed a commit that referenced this pull request Sep 11, 2024
* update lock logic

* forceRelease of schema
0xKurt added a commit that referenced this pull request Sep 11, 2024
* update schema name

* updates

* fix

* Revert "Refactor lock acquisition and release logic (#661)"

This reverts commit 9a2ffe1.
hussedev pushed a commit that referenced this pull request Sep 11, 2024
* update lock logic

* forceRelease of schema
hussedev pushed a commit that referenced this pull request Sep 11, 2024
* update schema name

* updates

* fix

* Revert "Refactor lock acquisition and release logic (#661)"

This reverts commit 9a2ffe1.
hussedev added a commit that referenced this pull request Sep 11, 2024
* have fallback IPFS

* feat: store ipfs data in db

* chore: move prices to it's own schema

* Refactor lock acquisition and release logic (#661)

* update lock logic

* forceRelease of schema

* index single chain (#657)

* update schema name

* updates

* fix

* Revert "Refactor lock acquisition and release logic (#661)"

This reverts commit 9a2ffe1.

* chore: avoid duplicate write + cleanup (#664)

* chore: avoid duplicate write

* cleanup

* improve locking (#665)

add forciblyAcquireLockForSchema

* test

* remove unused code

* add unique constraint

* chore: revert acquireWriteLock function

* f

* fix: args parser

---------

Co-authored-by: Kurt <[email protected]>
Co-authored-by: Hussein Martinez <[email protected]>
gnomadic added a commit that referenced this pull request Sep 12, 2024
* stashing

* stashing

* feat: dogstatsd for indexer progress

* prettier

* cleanup

* iterating

* cleanup

* have fallback IPFS

* feat: store ipfs data in db

* chore: move prices to it's own schema

* Refactor lock acquisition and release logic (#661)

* update lock logic

* forceRelease of schema

* index single chain (#657)

* update schema name

* updates

* fix

* Revert "Refactor lock acquisition and release logic (#661)"

This reverts commit 9a2ffe1.

* chore: avoid duplicate write + cleanup (#664)

* chore: avoid duplicate write

* cleanup

* improve locking (#665)

add forciblyAcquireLockForSchema

* test

* remove unused code

* add unique constraint

* chore: revert acquireWriteLock function

* f

---------

Co-authored-by: Aditya Anand M C <[email protected]>
Co-authored-by: Kurt <[email protected]>
Co-authored-by: Hussein Martinez <[email protected]>
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.

1 participant