[tor-bugs] #3015 [BridgeDB]: Enhance bucket functionality

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Apr 27 20:10:34 UTC 2015


#3015: Enhance bucket functionality
-----------------------------+-------------------------------
     Reporter:  kaner        |      Owner:  isis
         Type:  enhancement  |     Status:  needs_information
     Priority:  normal       |  Milestone:
    Component:  BridgeDB     |    Version:
   Resolution:               |   Keywords:  bridgedb-dist
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+-------------------------------

Comment (by isis):

 I should also add that, because the design of `Bucket.py` is in contrast
 to the current development direction for #12505, #12506, #12029, #12030,
 and #12031, and because:

  * the code in `Bucket.py` is no longer used, for reasons mentioned in
 [https://trac.torproject.org/projects/tor/ticket/3015#comment:7 my
 previous comment],
  * the code in `Bucket.py` never had unit/integration tests, and
  * the SQL schema governing how the bridges assigned to `Bucket`s are
 stored in the database is clunky, highly inefficient (one shouldn't have
 to do a
 [https://gitweb.torproject.org/bridgedb.git/tree/lib/bridgedb/Bridges.py?id=9ec5a96a437edd203ea0979a9a60c0297619f426#n453
 for loop over all the bridges] which BridgeDB has seen in the past 9 years
 to find the ones currently assigned to `Bucket`s), and gaining in
 inefficiency linearly every time a new bridge somewhere comes into
 existence,

 I am tempted to remove `Bucket.py` nearly entirely until it can be
 redesigned with some particular use-case(s) in mind. In removing the code,
 I'd like to retain:

   * functionality for extracting data about bridges still assigned (or
 historically assigned) to buckets from the databases (unfortunately, this
 will still retain the nasty `for` loop linked to above, unless we want to
 update the SQL schema once more before migrating to the new databases in
 #12030)

 and remove:

   * `Bucket.py`,
   * the ability to dump buckets to `.brdg` files,
   * the ability to create new buckets via the `BUCKET_FILES` config
 setting, and
   * the `SIGUSR1` handler for dumping buckets to `.brdg` files

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


More information about the tor-bugs mailing list