Description
If a service have resources that can be partitioned and need to be distributed across multiple nodes, then, it can utilise cbgt to do so.
One such service is Sync-Gateway. It use cbgt for DCP feed sharding across multiple nodes.
https://review.couchbase.org/c/cbgt/+/161467 removed PLAN_PINDEXES_KEY from the list of keys that janitor loop subscribe to.
This change was done to avoid redundant cfg get operations and was a valid change for users of cfgMetaKV.
CfgMetaKV's set operation on PLAN_PINDEXES_KEY also update the value of PLAN_PINDEXES_DIRECTORY_STAMP. Thus making janitor subscribe to PLAN_PINDEXES_DIRECTORY_STAMP is enough.
But, Non-metakv cfg implementation (like cfgMem or Sync-gateway's implemention) do not tie updates to PlanPindexes with PLAN_PINDEXES_DIRECTORY_STAMP.
This resulted in missing janitor kicks for such implementations.
Even for the old metaKV implementation ( which use sharedPlan instead of LeanPlan , protected by feature flag LeanPlanVersion ), this change is a problem.
We want cbgt to keep PLAN_PINDEXES_KEY in the list of keys that janitor subscribe to. (Only for metakV implementation with LeanPlanVersion, we can choose to not keep it )