kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel

Home Page:https://kmesh.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor CacheFactory and CacheFlush

hzxuzhonghu opened this issue · comments

Why is this needed:

type CacheFactory interface {
	StatusFlush(status core_v2.ApiStatus) int
	StatusDelete(status core_v2.ApiStatus)
	StatusReset(old, new core_v2.ApiStatus)
}

CacheFactory is the interface to update and delete xds resources that received from xds control plane.

But currently the cache flushing procedure is quite hard to understand, And there are other caveats:

  1. It does not support delta cache flush, which is useful for delta xds.
  2. the underlying implementor of CacheFactory stores redundant resources