Skip to content

Add denormalised columns to messageDependencies table

akwizgran requested to merge 545-message-dependencies into master

This branch removes two of the remaining join queries from the DB by keeping a denormalised copy of the message state in the messageDependencies table. This speeds up the getMessageDependencies() and getMessageDependents() methods, which are used by the validator.

I also experimented with removing the last remaining join from getMessagesToShare() by replacing the shared flag with a new DELIVERED_SHARED state, but the performance test results were inconclusive, so I haven't included those changes in this branch.

The handling of cross-group dependencies (which are invalid) has been tightened up: they're now treated in the same way as missing dependencies, which should reduce the chances of group subscriptions being revealed through side-channels.

Could be backported.

Merge request reports