Skip to content

feat: retry remove finalizer #1249

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

Merged
merged 17 commits into from
May 30, 2022
Merged

feat: retry remove finalizer #1249

merged 17 commits into from
May 30, 2022

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented May 27, 2022

No description provided.

@csviri csviri self-assigned this May 27, 2022
@csviri csviri linked an issue May 27, 2022 that may be closed by this pull request
@csviri csviri marked this pull request as ready for review May 27, 2022 13:11
@csviri csviri requested a review from metacosm May 27, 2022 13:11
@csviri csviri marked this pull request as draft May 27, 2022 14:44
@csviri csviri marked this pull request as ready for review May 30, 2022 09:36
Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

LGTM apart from some confusion on some of the comments / doc

@@ -19,7 +20,7 @@ class EventMarker {

public enum EventingState {
/** Event but NOT Delete event present */
Copy link
Collaborator

Choose a reason for hiding this comment

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

This javadoc is confusing since it's unclear to which constant it applies…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 167 to 173
* if already processed mark for deletion we want to override that mark in case a custom
* resource in the cache and not it is not marked for deletion. This could happen in an edge
* case, when the resource is deleted while websocket was disconnected. And meanwhile a
* resource with same ResourceID was deleted and created again. So resource should not be
* marked received if processedMarkForDeletion present it's still marked for deletion, but
* otherwise yes.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't really understand the comment…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reformulated, it's more like documenting an edge case that is not explicit, hope its better now

@@ -35,6 +37,8 @@
*/
class ReconciliationDispatcher<R extends HasMetadata> {

public static final int MAX_FINALIZER_REMOVAL_RETRY = 10;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe that should be configurable from the ConfigurationService?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would do it a separate PR TBH. Ideally this retry passes after 1-2 attemt, it's unlikely that there will be more than 3-4 finalizers.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this should be done in a different PR for sure.

@csviri csviri requested a review from metacosm May 30, 2022 15:27
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

72.8% 72.8% Coverage
0.0% 0.0% Duplication

@csviri csviri merged commit 51a37fa into main May 30, 2022
@csviri csviri deleted the finalizer-remove-retry branch May 30, 2022 15:39
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.

Finalizer Removal Using Retried Update with Optimistic Locking
2 participants