Opened 4 months ago

Closed 8 weeks ago

#31936 closed defect (wontfix)

Write usage metrics to disk before terminating

Reported by: phw Owned by:
Priority: Medium Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Normal Keywords: s30-o21a1
Cc: phw Actual Points: 0
Parent ID: #31274 Points: 1
Reviewer: Sponsor: Sponsor30-must

Description

BridgeDB writes its usage metrics to disk every 24 hours. It does not, however, write the metrics to disk when it's restarted, which means we are losing up to 24 hours worth of usage metrics after each restart. We should make BridgeDB write its incomplete metrics to disk before it terminates.

Let's also make sure that this fix plays well with our logrotate cronjob on polyanthum.

Child Tickets

Change History (1)

comment:1 Changed 8 weeks ago by phw

Actual Points: 0
Resolution: wontfix
Status: newclosed

Over at #31780, karsten pointed out that relays have the same issue and that's fine because writing unsanitised metrics to disk can be a security issue.

In the context of BridgeDB, this could be an issue if the service restarts, say, five minutes after it began a new measurement interval. Whoever used BridgeDB in these five minutes has a very small anonymity set to hide in. I think we're better off leaving the code as it is, so each measurement interval is guaranteed to cover 24 hours. Instead, we should minimise the number of times we have to restart BridgeDB.

Note: See TracTickets for help on using tickets.