Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #7480

Closed (moved)
Open
Opened Nov 15, 2012 by Nick Mathewson@nickm🥄

cached_resolve_t expiration is overengineered

There are two misfeatures in the way we expire pending and cached DNS requests—maybe three.

  1. We schedule expiration with a priority queue. That's probably over-engineered. Instead, we could just walk the hash table periodically and remove expired entries. If we choose an appropriate interval, we shouldn't lose too much CPU to walking the hash table.

  2. We can't remove or re-order entries in the priority queue before they expire. That means that when a pending cached_resolve_t gets its answers/errors and becomes done, we don't currently remove it: instead we make a copy of it to represent the done cached_resolve_t, put that in the priority queue too, and wait for the pending one to expire on its own. How silly.

  3. Pending DNS requests probably don't need to be scheduled for expiration at all: we already have timeout logic in evdns.c to ensure that a DNS request that doesn't complete will get treated as an error. I don't think we need a separate means to expire them.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: unspecified
Milestone
Tor: unspecified
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#7480