kubewharf / kubebrain

A High Performance Metadata System for Kubernetes
Apache License 2.0
760 stars 79 forks source link

Changing the RV semantics in Upstream Kubernetes #39

Open nilekhc opened 1 month ago

nilekhc commented 1 month ago

We are codifying the schema of ResourceVersion in upstream Kubernetes with KEP.

tl;dr With this change, we are parsing ResourceVersion to an int, thus explicitly defining RV as an integer rather than an opaque string as it is today. Does this affect the project in any way?

divanodestiny commented 1 month ago

@nilekhc sorry for late response. i have check the KEP.

Using Garbage Collection Cache means using RV as an integer to validate the freshness of the cache. Approval from SigArch is required on this RV semantics. ref: beta

If I understand your idea right, you parsing ResourceVersion to an int just to validate the freshness of the cache. KubeBrain implement ResourceVersion as uint64. it could be a very large num. I advice that you should parse the string into uint64 or int64. It's what we do in pv controller now.

Though we implement RV as uint64 now, i am opposed to treat RV as integer in fact. it limit the extension of storage. In my opinion, a comparable vector is better than integer, but it's not accepted by community.