Repository navigation
feat(feature-flags): generalize driver-side cache - #496
Conversation
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
|
Go integration tests triggered ( |
There was a problem hiding this comment.
Verdict: 1 Low
Clean, well-tested migration of the telemetry feature-flag cache into internal/featureflags. No dangling references to the deleted telemetry/featureflag.go symbols remain in code; the Acquire/Release ref-count stays balanced (telemetry init only runs on the Thrift path, which implies !UseKernel, which guarantees a prior Acquire); and the stale-reader concurrency (whole-map replacement under lock + singleflight cold path + TryLock refresh) is race-safe. Two minor notes: (1) one Low finding on the unrelated KERNEL_REV bump; (2) telemetry/ADDING_FEATURE_FLAGS.md (not in this diff) is now stale — it instructs developers to edit the deleted featureflag.go and references removed getFeatureFlagCache()/getAllFeatureFlags()/isTelemetryEnabled APIs, so it should be rewritten for the new Cache/typed-getter surface in a follow-up.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
|
Integration test approval reset. New commits were pushed to this PR. Label(s) A maintainer must re-review and re-add a label to preview tests again. (The real gate runs in the merge queue.) Latest commit: fe36481 |
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested refactor that generalizes the feature-flag cache and correctly moves refcount ownership to the connector/conn lifecycle (Acquire in Connect, Release on error and in Close, balanced across kernel and Reyden-recovery paths). The go.mod/depguard changes properly accompany the new singleflight import, and the copy-on-write map replacement keeps the lock-free reads race-free. One low-severity note on cold-path singleflight context sharing.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 2 Low
Looks good — a clean, well-tested generalization of the telemetry flag cache into internal/featureflags. Acquire/Release reference counting is balanced across all connect/close paths (including Reyden→kernel recovery and kernel-skip), and the lock-free reads are safe because flags maps are published immutably. Two low-severity behavioral notes inline (stale-refresh context asymmetry; JSON-literal requirement for the new string getters) — neither blocks merge.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — the feature-flags cache refactor is solid and well-tested (ref-count balance across Connect error paths and Close, cold-fetch singleflight, stale-reader non-blocking refresh, typed getters), with the depguard allowlist and go.mod direct-dep promotion correctly handled and no dangling references to removed symbols. One low-severity scope concern: an unrelated kernel C-ABI header change is bundled in.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 2 Low
Looks good — a clean, well-tested generalization of the telemetry feature-flag cache into internal/featureflags. The refcount lifecycle is correctly moved to connection ownership (balanced Acquire/Release across failed-open and Close, with a nil-guard against double release), the map-swap + singleflight concurrency design is sound and race-tested, and the depguard allowlist / go.mod direct-vs-indirect moves properly accompany the new singleflight dependency. Two low-severity notes only: a potential refresh-starvation edge under short-deadline readers, and a slightly misleading GetStringList error message.
jay-xiao446
left a comment
There was a problem hiding this comment.
lgtm! thanks for addressing my comments
Summary
Validation