-
Type: Bug
-
Resolution: Incomplete
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Centos: 6.5
python 2.6
mongodb 2.6.3
pymongo 2.7.1
-
Linux
Hi,
Recently, i have encountered a blocking issue.
I'm trying to upsert a document "10 times" in a sharded collection, this latter is indexed on two keys (date and key).
In addition if i execute the same operation in mongo shell it succeed
I use pymongo driver.
the following code explains my operations:
for i in xrange(10): # @UnusedVariable
collection.update(
,
{ "$set" : data }, upsert=True)
if self.kpi_data_exist(None, data["key"], data["date"]):
break
gevent.sleep(0.2)
else:
raise Exception("Insertion fail of:"+str(data))