k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.54k stars 231 forks source link

About Naming conventions #310

Closed 985492783 closed 1 month ago

985492783 commented 1 month ago

Whether key is necessary to use the format of the file directory for naming?

brandond commented 1 month ago

What?

985492783 commented 1 month ago

after auto-compact, i rebot kine then take error = Failed to list / for revision 1928, because xxx was compact but when i change all key to "/" + key then take success QQ_1721020321944

brandond commented 1 month ago

I don't know off the top of my head what the expected behavior is here. Do you see the same behavior from etcd when listing / vs /key for a compacted revision?

brandond commented 1 month ago

Kine implements only the bits of the etcd api that are required for compatibility with Kubernetes. Kubernetes uses the etcd v3 api, but for historical reasons, stores all data in keys that are compatible with the etcd v2 key format:

etcd uses a file-system-like structure to represent the key-value pairs, therefore all keys start with /.

So this is what kine expects, yes.

985492783 commented 1 month ago

get