Skip to content

docs: replace outdated State Resync Events section - #2026

Open
vaibhav8a wants to merge 1 commit into
open-feature:mainfrom
vaibhav8a:docs-remove-resync-section
Open

docs: replace outdated State Resync Events section#2026
vaibhav8a wants to merge 1 commit into
open-feature:mainfrom
vaibhav8a:docs-remove-resync-section

Conversation

@vaibhav8a

Copy link
Copy Markdown

Closes #1809.

The State Resync Events section documents a fallback that flagd no longer performs. This replaces it with the current behaviour and states the resulting guideline.

What I verified in the code first

Rather than take the issue at face value, I traced the current behaviour:

  • SetState() no longer returns a resync signal, removed in feat!: enable parsing of array flag configurations for flagd #1797 (its description confirms the IEvaluator contract "no longer returns detailed event information or a resync boolean").
  • Store.Update handles a dropped flag by txn.DeleteAll(flagsTable, flagSetIdKeySourceCompoundIndex, ...), scoped to the source that dropped it. Nothing re-requests definitions from the other sources.
  • ISync.ReSync() still exists, but it is a sync source operation for fetching a full configuration, and its only non-test callers are in flagd-proxys subscription manager. It is not the merged-state resync the docs describe, so I left it alone.

The important detail is why the fallback is gone rather than merely dormant. The primary index is unique on flag set ID + key, and flags without a flagSetId share one process-wide nilFlagSetId. So in the docs example, source-A and source-Bs foo are never stored at all, only the winner from source-C. When source-C drops foo, there is nothing left to fall back to, and the flag disappears entirely. That is exactly the FLAG_NOT_FOUND case the old text promised resync would prevent.

Changes

  • Retitled the section to "Duplicate flags across sources" and rewrote it to describe what actually happens on a delete.
  • Kept a short note recording that older versions emitted a resync event, so readers upgrading from that behaviour are not left confused.
  • Documented the guideline from the issue: the same flag set ID and key must not be supplied by more than one source, and flags without a flagSetId share an implicit flag set, so plain duplicate keys collide the same way.
  • Deleted flag-merge-3.svg and flag-merge-4.svg. They only illustrated the resync flow and were referenced solely by this section. Happy to restore them if you would rather keep the assets.

markdownlint-cli2 passes on the file, including the repos max-one-sentence-per-line rule.

One thing I noticed but left alone

core/pkg/evaluator/json_test.go:1039 still declares expectedResync bool in the TestState_Evaluator table. It is dead, with no other reference anywhere in the repo, and looks like a leftover from #1797. I kept this PR docs-only to match the issue, but happy to remove it here or in a follow-up.

flagd no longer emits state resync events. Since flag storage moved to
keying flags by flag set ID and key, `SetState()` no longer returns a
resync signal, and `Store.Update` deletes only the rows belonging to the
source that dropped the flag. Nothing re-requests the full definition
from the remaining sources or rebuilds the merged state.

Because only the highest priority definition of a given flag set ID and
key is stored, removing that definition leaves no flag behind at all, so
the documented fallback to a lower priority source no longer happens.

Document the current behaviour and the resulting guideline that a flag
must be supplied by exactly one source, and drop the two diagrams that
illustrated the resync flow.

Closes open-feature#1809

Signed-off-by: Vaibhav Srivastava <vaibhavsri1712@gmail.com>
@vaibhav8a
vaibhav8a requested review from a team as code owners August 15, 2026 12:15
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 15, 2026
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for polite-licorice-3db33c ready!

Name Link
🔨 Latest commit a26043f
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/6a8058783188880008150617
😎 Deploy Preview https://deploy-preview-2026--polite-licorice-3db33c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27d5b5c5-3dc7-4253-bd4a-e3e046bb8f39

📥 Commits

Reviewing files that changed from the base of the PR and between e045237 and a26043f.

⛔ Files ignored due to path filters (2)
  • docs/images/flag-merge-3.svg is excluded by !**/*.svg
  • docs/images/flag-merge-4.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • docs/concepts/syncs.md

📝 Walkthrough

Walkthrough

The sync documentation replaces the state resynchronization section with guidance on duplicate flags across sources, deletion behavior, evaluation results, and unique flag set ID/key requirements.

Changes

Sync source documentation

Layer / File(s) Summary
Duplicate flag guidance
docs/concepts/syncs.md
Documents that lower-priority duplicate flags are discarded, deletions do not trigger fallback or resynchronization, evaluations return FLAG_NOT_FOUND with the default value, and flag set ID/key pairs must be unique across sources.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a2604

This is a localized documentation update with no runtime or product behavior changes, and no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: aepfli

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the replacement of the outdated State Resync Events documentation.
Description check ✅ Passed The description directly explains the documentation update, current behavior, rationale, and related asset removal.
Linked Issues check ✅ Passed The changes remove outdated resync guidance and document duplicate-source limitations, risks, and configuration requirements from issue #1809.
Out of Scope Changes check ✅ Passed The reviewed changes are limited to the requested documentation update and removal of obsolete resync diagrams.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC] Remove outdated Resync Event section for Sync sources

1 participant