DHCP: Fix concurrency issues on discover. #2149
Open
romanlum wants to merge 4 commits intoBeryJu:mainfrom
Open
DHCP: Fix concurrency issues on discover. #2149romanlum wants to merge 4 commits intoBeryJu:mainfrom
romanlum wants to merge 4 commits intoBeryJu:mainfrom
Conversation
✅ Deploy Preview for beryju-gravity canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2149 +/- ##
==========================================
- Coverage 69.66% 69.62% -0.05%
==========================================
Files 136 136
Lines 7441 7519 +78
==========================================
+ Hits 5184 5235 +51
- Misses 1722 1737 +15
- Partials 535 547 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the fix for Fixes #2148
Use an atomic create-if-absent operation for new lease creation during DISCOVER and REQUEST:
try to create the lease key only if it does not already exist
if creation fails because the key already exists, fetch and reuse the existing lease
never overwrite an existing lease with the short discover or negotiate TTL
Remarks: this fix was created with the help of AI. Please review it because i am not a GO expert