Skip to content

Do not share the broker data dictionary between usage reports - #5983

Merged
ramonsmits merged 1 commit into
masterfrom
fix-shared-broker-metadata-in-usage-report
Oct 9, 2026
Merged

ramonsmits merged 1 commit into
masterfrom
fix-shared-broker-metadata-in-usage-report

Conversation

@ramonsmits

Copy link
Copy Markdown
Member

The usage report adds its environment data to the broker data dictionary from the data store. When no broker data is stored, that dictionary is one static instance, so two reports generated at the same time show each other's values. This made When_reporting_the_environment fail at random in the parallel acceptance tests.

  • The report copies the broker data into a new dictionary.
  • The EF Core and RavenDB data stores return a new default instance instead of a shared static one.
  • New unit test: report generation does not change the stored broker data.

The usage report used the broker data dictionary from the data store as
its environment data, and then added its own keys to it. When no broker
data is stored, the EF Core and RavenDB data stores return one static
default instance. All reports in the process then write into the same
dictionary. Two reports that are generated at the same time can show
values of the other report.

This made When_reporting_the_environment fail at random. The acceptance
tests run in parallel, so the report of one test could contain the
redirect count, the report mask count or the heartbeat values of another
test.

- The report copies the broker data into a new dictionary.
- The EF Core and RavenDB data stores return a new default instance.
@ramonsmits
ramonsmits merged commit 39d4da5 into master Oct 9, 2026
36 checks passed
@ramonsmits
ramonsmits deleted the fix-shared-broker-metadata-in-usage-report branch October 9, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants