verify_uniqueness will be called only 1x ever per module and only if
configured to create entry if not found. That is, once called on a module,
that module will now have a persisted id; so, it will never be called again
on that module.


On Wed, Aug 7, 2013 at 1:29 PM, Christina Roberts
<notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/modulestore/split_mongo/split.py:
>
> > +        location_id = {'_id.org': location.org, '_id.course': location.course}
> > +        if location.category == 'course':
> > +            location_id['_id.name'] = location.name
> > +        return location_id
> > +
> > +    @staticmethod
> > +    def _block_id_is_guid(name):
> > +        return len(name) == 32 and re.search(r'[^0-9A-Fa-f]', name) is None
> > +
> > +    @staticmethod
> > +    def _verify_uniqueness(name, block_map):
> > +        '''
> > +        Verify that the name doesn't occur elsewhere in block_map. If it does, keep adding to it until
> > +        it's unique.
> > +        '''
> > +        for targets in block_map.itervalues():
>
> Are we at all concerned about performance with this method (when we have a
> lot of data stored)?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/601/files#r5637496>
> .
>