Conditions page: mention that conditions don't reduce what Check reads
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
The change belongs in the Limitations section of the Conditions page at openfga.dev/docs/modeling/conditions, so find that page's source file in the docs repository. Add the suggested paragraph from the issue, keeping its link to the Multi-tenant SaaS use case, and check that the link resolves in the local docs build. Done when the paragraph appears in the Limitations section and the site builds without broken links.
Written by the indexing model from the issue text.
Description
Hi! The Conditions page explains the use cases and limits well. One thing we learned the hard way: a condition is evaluated after OpenFGA reads the tuples, so it doesn't reduce how many tuples a Check reads.
That's fine for time windows or IP rules. But if a condition is used to pick one tuple out of many, for example an org id on a relation shared by every org, each Check reads all of them first. In our case p95 went from 26 ms to about 1.5 s as that relation grew from ~1,300 to ~67,000 tuples (details in openfga/openfga#3380).
Suggested note for the Limitations section:
Conditions are checked after tuples are read, so they don't reduce how many tuples a Check reads. If a condition is used to pick one tuple out of many (for example, one per tenant on a shared relation), consider giving each tenant its own objects instead. See Multi-tenant SaaS.
Happy to open a PR if that's easier.
- Dominant language
- MDX
- Stars
- 52
- Forks
- 110
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openfga/openfga.dev
-
needs discussion
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openfga/openfga.dev#1436 · 1 comment ·
Maintainers usually reply within 2 days
-
No Docker Compose Example for preshared key authentication configurationPossibly taken @NopeCharon claimed this 10 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
openfga/openfga.dev#788 · 1 reaction ·
Maintainers usually reply within 2 days
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 45/100
openfga/openfga.dev#964 · 1 comment ·
Maintainers usually reply within 2 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
openfga/openfga.dev#963 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
openfga/openfga.dev#946 · 2 comments ·
Maintainers usually reply within 2 days
All issues in openfga/openfga.dev
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#335 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100