Opened 14 months ago

Last modified 8 days 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:
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 (5)

comment:1 Changed 14 months ago by nickm

Description: modified (diff)

comment:2 Changed 14 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 14 months ago by nickm

Parent ID: #25375

comment:4 Changed 14 months ago by nickm

Parent ID: #26070

comment:5 Changed 8 days ago by nickm

Owner: nickm deleted
Sponsor: Sponsor31-can
Note: See TracTickets for help on using tickets.