Hi, I'm using inMemmory datastore and when I'm writing relationships looks like it takes from 0.5 to 3 second to make it available. I made a function for writing with sleep and test after, and even with 3 seconds timeout I'm getting error "failed to find relationship for resource" one time on 10 runs.
Here is my write function:
v
vroldanbet
11/14/2023, 8:56 AM
This is expected. If you want read-your-write kind of consistency, you need to:
- get the
zedtoken
from
WriteRelationships
- issue reads or checks with
at_least_as_fresh
consistency
vroldanbet
11/14/2023, 8:56 AM
SpiceDB has a tunable consistency model, so depending on your requirements you need to select the right consistency model.