[Rt-devel] piping up about having proper referential integrity in the DB...
Vick Khera
vivek at khera.org
Wed Oct 21 12:01:25 EDT 2009
On Tue, Oct 20, 2009 at 3:18 PM, Jesse Vincent <jesse at bestpractical.com> wrote:
>> I turned on statement logging in postgres, and tracing the queries RT
>> made, discovered that his ID was still listed as a member of the group
>> in the GroupMembers table.
>
> But not in the CachedGroupMembers table? That seems surprising since all
> changes to those two tables should happen in lockstep inside a
> transaction that gets rolled back on failure.
This confused me as well. Not having been through the schema of RT in
years (last time I dug thru it was for RT 3.4 when I came up with some
better indexing for postgres) I didn't know where else to look. But
whatever the page was using to check membership was not finding it...
I'll assume that was CachedGroupMembers.
I also recall the last time this was discussed. From what I remember,
there were issues with certain values being used to represent "no
relation" state, rather than using NULL. I also remember something
about needing trigger functions to enforce certain relationships, and
that was not viable for MySQL at the time. But that's all vague...
Perhaps I'll dig into it again once I get updated to RT 3.8. Our
server is slated for a major overhaul, so it will happen sometime
soon...
More information about the Rt-devel
mailing list