feat(server-ng): add expired personal access token cleaner#3448
Open
krishvishal wants to merge 3 commits into
Open
feat(server-ng): add expired personal access token cleaner#3448krishvishal wants to merge 3 commits into
krishvishal wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (29.72%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #3448 +/- ##
=============================================
- Coverage 74.33% 24.10% -50.23%
Complexity 943 943
=============================================
Files 1247 1245 -2
Lines 122232 107673 -14559
Branches 98504 83975 -14529
=============================================
- Hits 90858 25957 -64901
- Misses 28413 81037 +52624
+ Partials 2961 679 -2282
🚀 New features to boost your workflow:
|
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.
Summary
is_caught_up_primary()holds. The delete is a replicated mutation: the primary proposes once, every replica applies the commit. Independent per-node cleanup would race redundant proposals, and only the primary can commit.submit_delete_personal_access_token_in_processis the first server-originated replicated metadata write. With no client session it cannot use the preflight-gated client path, so it mirrorssubmit_logout_in_process: skiprequest_preflight, use the reserved internalclientid0.get_session(0)isNone, so the commit path skipscommit_replyand itsassert!(client_id != 0); the preflight and register asserts are never reached. Delete is idempotent, so dropping dedup is safe.BTreeSetand stopping at the first not-yet-expired entry, so an idle tick is O(log n) instead of a full per-user scan.compio::time::timeout); no metadata-commit wake needed. Stop is observed between tokens; an in-flight submit is not cancel-safe, so the current delete finishes rather than being cut, boundingshutdown to one submit.
RegisterSubmitError->MetadataSubmitError: the error now covers register, logout, and PAT-delete submits.