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 optimistic locking loop into an abstract base class #26

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

lpsinger
Copy link
Member

This makes it easier to create different autoincrement variations with the same optimistic locking loop (e.g. #20).

Note: this is a smaller diff than it may look at first; most of the lines hit are due to changing the level of indentation. Suppress whitespace changes when reading the diff.

@lpsinger lpsinger requested a review from dakota002 October 31, 2023 18:34
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9b1eeac) 91.66% compared to head (5f14e31) 92.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   91.66%   92.59%   +0.92%     
==========================================
  Files           1        1              
  Lines          24       27       +3     
  Branches        3        3              
==========================================
+ Hits           22       25       +3     
  Misses          1        1              
  Partials        1        1              
Files Coverage Δ
src/index.ts 92.59% <91.66%> (+0.92%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This makes it easier to create different autoincrement variations
with the same optimistic locking loop (e.g. nasa-gcn#20).
@lpsinger lpsinger force-pushed the refactor-optimistic-locking-loop branch from a2e8e62 to 5f14e31 Compare October 31, 2023 19:31
@lpsinger
Copy link
Member Author

Rebased now.

Copy link
Contributor

@dakota002 dakota002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Not sure if it matters for this PR specifically, but I think the usage may now be (or already has been) out of sync with the example

@lpsinger
Copy link
Member Author

Not sure if it matters for this PR specifically, but I think the usage may now be (or already has been) out of sync with the example

Oh, I see. It has been for a while. I'll make another PR to fix that.

@lpsinger lpsinger merged commit fd19a7f into nasa-gcn:main Oct 31, 2023
8 of 9 checks passed
@lpsinger lpsinger deleted the refactor-optimistic-locking-loop branch October 31, 2023 19:50
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