Opened at 2013-11-27T21:04:39Z
Last modified at 2013-11-29T21:25:17Z
#2119 new defect
Don't pre-convert all serverids to ServerTrackers
Reported by: | markberger | Owned by: | markberger |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | unknown | Version: | 1.10.0 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
In immutable/upload.py we have the following code:
def _get_next_allocation(self): """ Return the next share allocation that we need to make. Specifically, I return a tuple (tracker, shares_to_ask), where tracker is a ServerTracker instance and shares_to_ask is a set of shares that we should store on that server. If there are no more allocations to make, I return None. """ while self.trackers: tracker = self.trackers.pop(0) # TODO: don't pre-convert all serverids to ServerTrackers assert isinstance(tracker, ServerTracker)
As part of #1382 I am removing the TODO comment and creating a ticket for it instead.
Change History (2)
comment:1 Changed at 2013-11-29T05:38:28Z by zooko
- Owner changed from daira to markberger
comment:2 Changed at 2013-11-29T21:24:39Z by markberger
It wasn't clear to me why someone left the comment either, but I decided to open a ticket just in case. I'm also fine with marking it as wontfix.
Note: See
TracTickets for help on using
tickets.
So, why not convert all serverids to ServerTrackers right away? Looking at the code for ServerTracker, it doesn't look like creating it has any problematic side-effects or uses up major resources, so unless there's something I didn't notice, I propose we just close this ticket as wontfix. Re-assigning to markberger to explain why this would be better.
By the way, good job cleaning up the TODOs out of the source code! ☺