Fixed a bug in the subscription cache #1716
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partial fix for issue #1715
The issue also talks about a crash. I've seen no such thing, unfortunately :(
When the broker starts up and there are "old" subscriptions in the database, the subscription cache needs to be populated with those subscriptions.
This issue fixes a bug for the entity projection (the field 'notification::attributes' of a subscription payload).
The attributes were compacted when added to the subscription cache.
This makes zero sense and the bug has been fixed.
Amazing how a bug this important has survived for so long ...
So, when restarting the broker, as the projection attributes were erroneous (wrong names), all notifications are sent without any attributes (that is if projection attributes were part of the subscription).