operator-framework / operator-framework/java-operator-sdk
read-cache-after-write consistency and event filtering for deletes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 944
- Forks
- 242
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 43
Description
See also parent issue.
This might be a bit problematic, for resource without finalizer:
If the resource does not implement a finalizer, we could just record the UID of the resource and filter out events until we receive the delete event, that removes the cached resource ID.
The issue is with the resources with a finalizer, there we could define this like:
-
Filter just the event that was caused by the delete operation (in this case, it just adds the deletion timestamp), and process subsequent events. By definition, only operations should happen afterwards, and that includes finalizer removals, but that is not enforced on the API level. Note that implementation-wise, this is an issue since the delete operation does not return the new resource nor it's version.
-
We could filter out all the subsequent events until we receive a delete event. - But this might be too opionated, and especially if the controller would be restarted, users might see the resources again (although still marked for deletion). So probably not the right thing to do.
Notes:
- optimistic locking does not seems to work for deletes either
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the read-cache and event-filtering paths for delete operations in the Java Operator SDK, then review the parent issue for the intended behavior. Compare resources with and without finalizers and the note about optimistic locking; this issue is done only after the delete-event filtering policy is decided and implemented consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kubernetes
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100