its 1000 by default
# spicedb
j
its 1000 by default
c
but
writeRelationships
does not provide the
deletionProgress
property in the response like
deleteRelationships
does. Does it mean i cannot use
writeRelationships
if i'll potentially run the touch or delete operation on more than 1000 relationships?
j
write relationships requires you to give the individual rels to add or delete
it can't exceed the number given because you're listing them
c
> write relationships requires you to give the individual rels to add or delete i know i've built a manager class that allows me to do
authorization().revoke().resource(resourceIds).relation.from.subject(subjectIds)
under the hood it builds a bunch of
RelationshipUpdate
and puts them in a
WriteRelationshipsRequest
so are you saying that if it would contain more than 1000
RelationshipUpdate
it will fail? 😬
> it can't exceed the number given because you're listing them what do you mean with this?
j
since you're adding them one by one
you can't exceed the 1000 limit because... you simply don't put more than that in the update call
vs Delete rels which supplies a matcher
and could easily exceed that
c
okay i confirmed it, wrote a test that tries to create 2000 relationship updates put into one relationship write request and it fails
so in my manager i need to implement batching, such that it never calls
writeRelationship
with more than 1000 relationship updates per call
?
j
yes
5 Views