When creating an index on mongo, pymongo raised following exception:
Exception in thread 858:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "parallel_index_creation.py", line 17, in thread_run
col.ensure_index('field1', cache_for=-1)
File ".../pymongo/collection.py", line 1406, in ensure_index
self.__name, name):
File ".../pymongo/mongo_client.py", line 439, in _cached
now < cache[dbname][coll][index])
KeyError: u'field1_1'
I have attached small script that reproduces it (after few runs).