user
01/27/2022, 7:04 PMuser
01/27/2022, 7:04 PMecordell
01/27/2022, 7:05 PMvroldanbet
01/27/2022, 7:09 PMuser
01/27/2022, 7:11 PMgo tool pprof
to get a profile download, then I share it with the team on share.polarsignals.com. We've been meaning to setup Parca for a long term solution.user
01/27/2022, 7:12 PMuser
01/27/2022, 7:15 PMvroldanbet
01/27/2022, 7:16 PMvroldanbet
01/28/2022, 12:16 PMspicedb
. work as a library? 👀vroldanbet
01/28/2022, 12:17 PMvroldanbet
01/28/2022, 12:18 PMvroldanbet
01/28/2022, 12:20 PMJake
01/28/2022, 12:36 PMsoufian044
01/28/2022, 3:42 PMdivision:*#viewer@group:admin#member
in the playground i get : Error running validation - Incomplete response
if not is there way to achieve this without having a 3rd type all_divisions ?Joey
01/28/2022, 3:45 PMJoey
01/28/2022, 3:45 PMJoey
01/28/2022, 3:46 PMdefinition organization {
relation admin: group#member
}
definition division {
relation parent_org: organization
relation viewer: group#member
permission view = viewer + parent_org->admin
}
Joey
01/28/2022, 3:46 PMparent_org
relationship for each division, and then you can add the group to the admin
of the organization, and they would be granted permission to view all divisions for that organizationsoufian044
01/28/2022, 4:39 PMsoufian044
01/28/2022, 4:40 PMJoey
01/28/2022, 4:40 PMSleipnir
01/28/2022, 10:11 PMdeal
that says permission view = investment->view + sponsor
. I do the permission check using at_least_as_fresh
set to the max zedtoken of the deal and the user. This doesn't always work right away, because if an investment is added after the deal is created/modified, it has a later zedtoken than either deal or user, and when using at_least_as_fresh
, spicedb queries postgres based on the max of that zedtoken and whatever it thinks is the latest transaction (e.g. if it hasn't updated from postgres since the last write to relation_tuple_transaction
)Sleipnir
01/28/2022, 10:11 PMSleipnir
01/28/2022, 10:17 PMrelation_tuple_transaction
and serialize the zedtoken from that?Joey
01/28/2022, 10:23 PMinvestment
is a relation on deal
, I imagine if you update that rel, you'd also store the updated zedtoken for the deal
, since deal
is being modified as the resourceSleipnir
01/28/2022, 10:28 PMSleipnir
01/28/2022, 10:29 PMrelation_tuple_transaction
directly from the trigger, serializing ZedTokens in trigger code etc.Sleipnir
01/28/2022, 10:31 PMinvestment
has a foreign key index to deal
on the column deal_id
Joey
01/28/2022, 10:38 PMJoey
01/28/2022, 10:39 PMdeal
, then its zedtoken generally needs to update