Opened 16 months ago

Last modified 6 weeks ago

#25950 assigned defect

Run "accounting_run_housekeeping" with a periodic event.

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 034-roadmap-subtask, 034-triage-20180328, 034-included-20180328
Cc: Actual Points:
Parent ID: #26070 Points: 5
Reviewer: Sponsor: Sponsor31-can

Description (last modified by nickm)

Here's an implementation sketch:

  • Make accounting_add_bytes() check whether limits are exceeded. Refactor the code as needed to make this check fast.
  • If a limit is exceeded, schedule consider_hibernation().
  • Also schedule consider_hibernation() again based on "shutdown_time", "hibernate_end_time", and "interval_wakeup_time".
  • Pull "accounting_run_housekeeping" apart:
    • Other logic to set interval_end_time if it isn't set but accounting is enabled.
    • A periodic event, only scheduled when network is on and accounting is enabled, to record bandwidth usage. Tie this into the or_state_save event.

Child Tickets

Change History (7)

comment:1 Changed 16 months ago by nickm

Description: modified (diff)

comment:2 Changed 16 months ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

This would still be good to do, but #26064 should be sufficient for now.

comment:3 Changed 16 months ago by nickm

Parent ID: #25375

comment:4 Changed 16 months ago by nickm

Parent ID: #26070

comment:5 Changed 2 months ago by nickm

Owner: nickm deleted
Sponsor: Sponsor31-can

comment:6 Changed 6 weeks ago by nickm

Points: 3

comment:7 Changed 6 weeks ago by nickm

Points: 35
Note: See TracTickets for help on using tickets.