uatuko / ruek

🔐 Lightning fast, global scale authorization service without the overhead of a yet another DSL.
Apache License 2.0
94 stars 6 forks source link

ReBAC: Optimise when creating relations #98

Closed uatuko closed 5 months ago

uatuko commented 6 months ago

This change utilises the optimise flag to compute and store derived relations when creating a new relation. The cost_limit can be used to avoid expensive DB operations during an insert.

💡 If the cost of storing derived tuples is larger than the cost_limit, the response will have a negative cost indicating the process has been aborted.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 90.54054% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 92.90%. Comparing base (703fddf) to head (a080023).

Files Patch % Lines
src/svc/relations.cpp 87.75% 2 Missing and 4 partials :warning:
src/db/tuples.cpp 95.65% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #98 +/- ## ========================================== + Coverage 92.79% 92.90% +0.11% ========================================== Files 18 18 Lines 1069 1128 +59 Branches 115 126 +11 ========================================== + Hits 992 1048 +56 Misses 61 61 - Partials 16 19 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.