docker / Tiltfile
# spicedb
r
docker / Tiltfile we have our own charts . When I pin my container to tag: v1.34.0 everything works, but not for 1.35 Today I can debug further, as if you are unware of possible issues, then it is probably more characteristic of my setup and I can try to debug further. Using postman, hitting a wrapper service that then grpcs to spiceDb We have been using spiceDb for 2+ years now.
v
what datastore are you using?
are you using namespace prefixes in your schema?
r
postgres. No. I am not aware of prefix feature
v
unclear. I'd suggest debugging, or alternatively create a redacted zed backup to us with a repro, will look into it best effort
r
in v35, the last query that is ran is the following:
do $$ begin assert (select pg_xact_status(824::text::xid8) != 'in progress'), 'replica missing revision';end;$$;SELECT serialized_config, created_xid FROM namespace_config WHERE pg_visible_in_snapshot(created_xid,  '825:825:' ) =  't'  AND pg_visible_in_snapshot(deleted_xid,  '825:825:' ) =  'f'  AND (namespace =  'teste' )
and outputs no serialized config and` xid 823` in v34 the query is a bit different
Copy code
SELECT serialized_config, created_xid FROM namespace_config WHERE pg_visible_in_snapshot(created_xid, $1) = $2 AND pg_visible_in_snapshot(deleted_xid, $3) = $4 AND (namespace = $5)
2024-10-04 16:26:06.185 GMT [3056] DETAIL:  parameters: $1 = '825:825:', $2 = 't', $3 = '825:825:', $4 = 'f', $5 = 'teste'
the output is the same. From here v34, continues to a
select from relation_tuple
but v35 does not. Do you have any theory?
v
oh, are you using replica support?
or are you pointing your SpiceDB to a load-balancer with replicas in it?
@Joey does that ring a bell?
r
yes I am trying to configure it. perhaps thats the problem? locally I wanted to set it up, but I tried to trick spiceDB by setting the same connection string
example of my secret values:
Copy code
url: "postgres://postgres:postgres@supreme-authorisation-service-postgresql:5432/myDatabase?sslmode=disable"
  readonly_url: "postgres://postgres:postgres@supreme-authorisation-service-postgresql:5432/myDatabase?sslmode=disable"
(local stuff)
j
wait
are you enabling read replica support?
sorry, yeah
you can't point the read replica to the same instance as the primary
it won't work
r
Thank you
why wont it work? just curious aout my underlying tech
j
read replicas have special logic injected into the SQL to ensure that the revision requested has been properly replicated
it should in theory work once everything has been replicated
but that was never tested - it was always intended to be a "try and fallback" scenario