GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(feature-flags): generalize driver-side cache by cathleeny · Pull Request #496 · databricks/databricks-sql-go

Conversation

@cathleeny

@cathleeny cathleeny commented Oct 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Summary

  • Move and generalize the existing telemetry feature-flag cache into internal/featureflags; retain all returned values and add six typed getters.
  • Share values by workspace ID, with normalized host as a fallback, and use authenticated transport supplied by each caller.
  • Honor the connector-service TTL, falling back to 15 minutes when it is missing or invalid.

Validation

  • Full unit suite: go test ./... passed.
  • Feature-flag and telemetry tests passed with the race detector.
  • Cold-load/workspace and stale-reader concurrency tests passed for 30 repeated race-detector runs.
  • The new stale-reader regression test failed before the fix and passed afterward.
  • go vet ./... and golangci-lint passed (0 issues).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cathleeny added 2 commits October 6, 2026 21:29
@cathleeny
Generalize driver feature flag cache and honor server TTL
3e1f6ee
Signed-off-by: Cathleen Yan <[email protected]>
@cathleeny
fix(feature-flags): keep stale readers non-blocking during refresh
ef1968b
Signed-off-by: Cathleen Yan <[email protected]>
@cathleeny cathleeny mentioned this pull request Oct 6, 2026
feat(feature-flags): generalize driver-side cache #495
Closed
cathleeny added 2 commits October 7, 2026 00:30
@cathleeny
fix(feature-flags): decouple cache lifetime from telemetry
e75abf3
Signed-off-by: Cathleen Yan <[email protected]>
@cathleeny
chore(kernel): bump to merged feature flag cache
ac375f5
Signed-off-by: Cathleen Yan <[email protected]>
@cathleeny cathleeny added the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Go integration tests triggered (sea / passthrough). View workflow runs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
cathleeny marked this pull request as ready for review October 7, 2026 17:38
peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 7, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread KERNEL_REV Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
docs(feature-flags): update shared cache usage guide
fe36481
Signed-off-by: Cathleen Yan <[email protected]>
@github-actions github-actions Bot removed the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Integration test approval reset.

New commits were pushed to this PR. Label(s) integration-test-kernel were removed for security.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 8, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/featureflags/cache.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
cathleeny requested a review from jay-xiao446 October 12, 2026 18:48
cathleeny added 2 commits October 12, 2026 18:54
@cathleeny
Merge main and retain merged kernel telemetry revision
f5f7b45
Signed-off-by: Cathleen Yan <[email protected]>
@cathleeny
Fix shared flag-fetch cancellation and sync pinned kernel header
b188769
Signed-off-by: Cathleen Yan <[email protected]>
peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 12, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/featureflags/cache.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread internal/featureflags/cache.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
docs(featureflags): clarify value encoding and refresh cancellation
310037b
Signed-off-by: Cathleen Yan <[email protected]>
peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 12, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/backend/kernel/include/databricks_kernel.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

jay-xiao446
jay-xiao446 reviewed Oct 12, 2026
View reviewed changes
Comment thread internal/backend/kernel/include/databricks_kernel.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
chore: drop unrelated kernel header sync
537eee4
Signed-off-by: Cathleen Yan <[email protected]>
jay-xiao446
jay-xiao446 reviewed Oct 12, 2026
View reviewed changes
Comment thread connector.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread connector.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 12, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cathleeny
fix(feature-flags): share lazy cache across driver backends
1bf0d6b
Signed-off-by: Cathleen Yan <[email protected]>
peco-review-bot[bot]
peco-review-bot Bot approved these changes Oct 13, 2026
View reviewed changes

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/featureflags/cache.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread internal/featureflags/cache.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

jay-xiao446
jay-xiao446 approved these changes Oct 13, 2026
View reviewed changes

@jay-xiao446 jay-xiao446 left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks for addressing my comments

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cathleeny
cathleeny enabled auto-merge October 13, 2026 23:42
@cathleeny
cathleeny added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 59f8bae Oct 13, 2026
17 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@cathleeny
cathleeny deleted the cathleeny/general-driver-flags branch October 13, 2026 23:49
This was referenced Oct 14, 2026
[coverage] Conformance findings: FEATUREFLAG-001 adbc-drivers/databricks#707
Open
[coverage] Conformance findings: FEATUREFLAG-001 #499
Open
[coverage] Conformance findings: FEATUREFLAG-001 databricks/databricks-sql-python#984
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@peco-review-bot peco-review-bot[bot] peco-review-bot[bot] approved these changes
@jay-xiao446 jay-xiao446 jay-xiao446 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@cathleeny @jay-xiao446
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.