-
Notifications
You must be signed in to change notification settings - Fork 51
feat: flagd file polling for offline mode #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: flagd file polling for offline mode #614
Conversation
1f11f07
to
acd5ab9
Compare
...enfeature/contrib/providers/flagd/resolver/process/storage/connector/file/FileConnector.java
Show resolved
Hide resolved
...ature/contrib/providers/flagd/resolver/process/storage/connector/file/FileConnectorTest.java
Outdated
Show resolved
Hide resolved
1d7d45c
to
60d389e
Compare
...enfeature/contrib/providers/flagd/resolver/process/storage/connector/file/FileConnector.java
Show resolved
Hide resolved
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.
Approving with this question. I will let you consider it and decide if you think it's something we should worry about in this PR.
Thanks for the review. Regarding the concurrency concern, I will address it in a dedicated PR. As described here only possibility for concurrent issues is if the same provider get registered multiple times (which is allowed in spec). And I think we need to check this edge case in other lang. implementations as well. |
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Kavindu Dodanduwa <[email protected]>
5bd774d
to
014c940
Compare
…ature#614) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR
Enhance flagd in-process offline mode introduced through #473 by adding polling support and align with the change proposed at flagd js-sdk (open-feature/js-sdk-contrib#708)
Polling happens at intervals of 5 seconds and runs concurrently. If an update is observed, connect offers the newest content to the storage through the connector contract.
Note on polling
The reason to use polling is the known limitation of Java WatchService when it comes to non-local file systems. This blog post 1 extensively describes the problem. Besides, the offline mode is intended for limited use cases such as testing, local development efforts or POC deployments where the impact of polling is minimal.
Footnotes
https://blog.arkey.fr/2019/09/13/watchservice-and-bind-mount/ ↩