Andrei Matei
unread,Apr 24, 2018, 11:49:40 AM4/24/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vivek Menezes, Daniel Harrison, Raphael 'kena' Poss, CockroachDB
+cc dan
>I see that you have created issue #25022 to highlight how the problem
> surfaces in SHOW FINGERPRINTS. I think SHOW FINGERPRINTS can be altered
> to avoid this bug, however that is a mere workaround.
The real issue I'm running into is that we have code that, in the middle of executing a statement, reuses the planner to plan an execute a different, "internal" statement. That's horrible, so I'm trying to migrate it to more clean execution of that internal statement (we generally should be avoiding the need for such internal statements, but whatevs). Except that, when reusing the planner, the inner statement was inheriting the avoidCachedDescriptor bit by design or by accident. In a cleaner execution, there's no such inheritance. So on occasions I have to do crap like look whether the outer statement had an AOST clause, and copy it in the inner statement. But that's quite horrible; everything about this avoidCachedDescriptor bothers me, because the timestamp at which a statement is running should be sufficient in deciding what descriptors it should use.
Now, there's also a related issue that comes up, that I generally don't know what to do about: the theology says that, at any timestamp, one can use either of two descriptor versions. They should produce equivalent results. Except we have code that behaves differently depending on the version - it's generally code that has special provisions for dealing with indexes or columns in the process of being added or dropped. EXPERIMENTAL_FINGERPRINTS is one such example - it fingerprints indexes in the process of being added. I suspect this was a bad idea, because now it suddenly means that if you use the other one of the two valid versions, one such index will not be seen (e.g. in an AOST statement you're more likely to not use the latest version valid for a timestamp, but the one before it). So based on the whim of the system, you might get one fingerprint or another at the same timestamp.
+Dan