[tor-bugs] #5232 [BridgeDB]: Import bridges into BridgeDB in a separate thread and database transaction

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun Feb 26 08:35:29 UTC 2012


#5232: Import bridges into BridgeDB in a separate thread and database transaction
----------------------+-----------------------------------------------------
 Reporter:  karsten   |          Owner:  aagbsn
     Type:  defect    |         Status:  new   
 Priority:  major     |      Milestone:        
Component:  BridgeDB  |        Version:        
 Keywords:            |         Parent:  #4499 
   Points:            |   Actualpoints:        
----------------------+-----------------------------------------------------
Changes (by karsten):

 * cc: nickm (added)


Comment:

 If you need to get a lock to swap the data structures and commit the
 transaction, does that mean readers also need to get a lock to get the
 data structure they're supposed to use?  Also, you may want to commit the
 transaction before swapping the data structures, as the commit may fail.

 This change sounds plausible to fix the problem, but it's also kinda
 invasive.  Are there things we could refactor before implementing this
 change, e.g., create a clean interface how distributors access the bridge
 copies in memory and in the database?  Ideally, the email distributor
 should not touch the database directly, and distributors shouldn't hold
 any references that we need to worry about when updating bridges.  I'm
 worried that this complexity is going to bite us.

 Speaking of invasive changes: do we have good ways to test BridgeDB?  If
 not, is it a good time to add a bunch of unit/integration tests before
 starting to code on this change?

 We should also ask nickm for his opinion.  I don't know the BridgeDB code
 well enough to brainstorm about code changes like this.  I cc'ed him in
 this ticket.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5232#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list