What's changed
Bug Fixes (4)
-
messages: global variable replacement (#7334)
Fixes a bug that resulted in only the first instance of a template
variable (i.e. ##username##) being replaced in in-app messages. -
subsequences: keep value key when pendingReview (#7344)
Exporting submission data (XLSX, CSV, etc.) could fail when a
transcription or translation was still awaiting review. -
userReports: replace per-user OR submission query with a single bounded scan (#7350)
User Reports stays reliable on very busy servers: the job that
precomputes billing and usage figures no longer risks exhausting the
database's memory during large bursts of incoming submissions.The background job behind the admin User Reports screen counts, for
every organization, the submissions made during its current billing
period. On servers handling a large volume of incoming submissions, the
way that calculation queried the database could make it allocate a very
large amount of memory at once, which contributed to a recent outage. It
now computes the exact same figures with a lighter, more predictable
query. -
userReports: reduce snapshot refresh cadence and mid-run MV refreshes (#7354)
Reduces the load from the User Reports background job on busy servers:
it now runs 3 times a day instead of every 15 minutes, and rebuilds its
data view at most once an hour during a pass instead of every 15
minutes.Urgent mitigation while the fuller rework is in progress. The background
job that keeps organizations' billing and usage figures up to date was
running every 15 minutes and rebuilding its underlying data view every
15 minutes during each multi-hour pass, which contributed to database
lock contention and memory pressure. This lowers its cadence to 3 times
a day and rebuilds the view at most once an hour during a pass (plus
once at the end).
Full Changelog: https://github.com/kobotoolbox/kpi/compare/2.026.27c..2.026.27d