Details
Description
While inserting a new fresh document using python sdk "couchbase.n1ql.N1QLError" is raised cause: Duplicate Key <key>', u'code': 12009
PLEASE NOTE: The document is getting created properly in the bucket even after the exception.
Another observation is that sometimes this exception is not coming and <couchbase.n1ql.N1QLRequest object at 0x1083ce250> is returned properly.
Step to reproduce:
1. Load a fresh bucket: default
2. Using python sdk try to insert few documents:
from couchbase.bucket import Bucket
from couchbase.n1ql import N1QLQuery
cb = Bucket('couchbase://10.142.160.101//default',username="Administrator", password="password")
cb.n1ql_query('INSERT INTO `default` (KEY, VALUE) VALUES ("4odwalla-juice1",
)').execute()
cb.n1ql_query('INSERT INTO `default` (KEY, VALUE) VALUES ("odwalla-juice",
{ "productId": "odwalla-juice1"})').execute()
cb.n1ql_query('INSERT INTO `default` (KEY, VALUE) VALUES ("abc",
{ "productId": "odwalla-juice1"})').execute()