Opened 5 years ago

Closed 5 years ago

#12485 closed defect (implemented)

Reduce time to write guard-related changes to the state file

Reported by: asn Owned by:
Priority: Low Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-guard, 026-triaged-1, nickm-patch, asn-review
Cc: bastik.public@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

We have:

void
entry_guards_changed(void)
{
  time_t when;
  entry_guards_dirty = 1;

  /* or_state_save() will call entry_guards_update_state(). */
  when = get_options()->AvoidDiskWrites ? time(NULL) + 3600 : time(NULL)+600;
  or_state_mark_dirty(get_or_state(), when);
}

Which means that Tor saves guard-related changes to the state file after 10 minutes, or 1 hour if AvoidDiskWrites is enabled.

Maybe this time should be reduced, since we are considering guard-related changes as quite important? It would be a pity to settle on a guard node, then close the Tor client fast and lose that information.

Child Tickets

Change History (7)

comment:1 Changed 5 years ago by bastik

Cc: bastik.public@… added

comment:2 Changed 5 years ago by nickm

Keywords: 026-triaged-1 added

comment:3 Changed 5 years ago by nickm

Status: newneeds_review

fix in branch "bug12485" in my public repository. Please review? I arbitrarily picked 30 seconds and 10 minutes (instead of 10 minutes and 1 hour).

comment:4 Changed 5 years ago by nickm

Keywords: nickm-patch added

Add the nickm-patch keyword to a bunch of needs_review tickets.

comment:5 Changed 5 years ago by nickm

Keywords: asn-review added

comment:6 Changed 5 years ago by asn

Looks good to me. Thanks!

comment:7 Changed 5 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Merged. Thanks for the review!

Note: See TracTickets for help on using tickets.