sirikata/sirikata — Issue #485: Random choice of port IDs eventually fails when too many are allocated
Author: ewencp
Created: 2012-01-26 02:46:59+00:00
State: open

#484 is probably not due to actual exhaustion of port identifiers, but rather because we just try selecting them randomly and eventually give up. We should probably do the random selection up to a point (e.g. trying 10 times), then fall back on some other strategy, e.g. an expensive linear scan or even maintain an extra bitset (which might be too memory intensive with a lot of HostedObjects).

It took about 30k objects to cause failure in the space server, so this is probably straightforward to reproduce.