open-feature / open-feature/java-sdk-contrib

Why is there no guarantee that a provider event will be emitted after flag values have changed?

Open
#1,761 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
49
Forks
81
Avg merge
20h 3m
Merged PRs (30d)
6

Description

I noticed that after many incorrect JSON flag data there was no client.onProviderError.
The reason is here. Is it possible for the provider to send an event for every new flag data?

Additionally,FlagStore may ignore sending events if its queue is full. Is this behavior intentional, and is it possible to fix it?

I need the provider to emit an event after the data has been sent to it for next task.

I need to pass only validated flags to the app, but flags can only be validated after they come into a provider.
I decided to create providers with checked and unchecked domains. Once flags come into the unchecked domain, validation should be performed; if it succeeds, flags are passed into the checked domain.
However, to avoid deadlocks or race conditions, an event should be emitted every time flags are passed to the unchecked domain, but currently, it isn't.

Could you fix this? Or I can try and make a PR?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with FlagdProvider.java near line 233 and FlagStore.java near line 83 to trace how invalid flag data and a full event queue affect provider events. Review the surrounding event and queue-handling logic, then verify that every transfer of new flag data to the unchecked domain produces an event without losing updates when the queue is full.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.