Skip to content

Conversation

hardillb
Copy link
Contributor

fixes #6141

Description

This adds a 5000 entry LRU cache with a 30min expiry to buffer updating topic entries for the MQTTTopicSchema table from the TeamBroker authorization check.

Related Issue(s)

#6141

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

fixes #6141

This adds a 5000 entry LRU cache with a 30min expirary to updating
topic entries for the TeamBroker.
@hardillb hardillb self-assigned this Oct 16, 2025
Copy link
Member

@knolleary knolleary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teamId -> TeamId fix

Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.82%. Comparing base (f414859) to head (ab53177).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
forge/ee/lib/teamBroker/index.js 85.71% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6142   +/-   ##
=======================================
  Coverage   76.81%   76.82%           
=======================================
  Files         381      381           
  Lines       19296    19306   +10     
  Branches     4646     4647    +1     
=======================================
+ Hits        14823    14831    +8     
- Misses       4473     4475    +2     
Flag Coverage Δ
backend 76.82% <86.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hardillb and others added 3 commits October 16, 2025 11:19
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
@hardillb hardillb requested a review from knolleary October 16, 2025 10:22
@knolleary
Copy link
Member

Unrelated UI test failures - merging as-is

@knolleary knolleary merged commit f5a397c into main Oct 16, 2025
22 of 23 checks passed
@knolleary knolleary deleted the cache-topic-updates branch October 16, 2025 10:35
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.

Scaling: improve caching of MQTTTopicSchemas to reduce db load

2 participants