It makes it easy to reproduce - I did it pretty quickly with
import logging
|
import couchbase
|
from couchbase.cluster import Cluster, PasswordAuthenticator
|
from couchbase.exceptions import NotFoundError
|
|
logging.basicConfig(level=logging.DEBUG)
|
log = logging.root
|
|
couchbase.enable_logging()
|
|
cluster = Cluster('couchbase://10.143.193.101')
|
cluster.authenticate(PasswordAuthenticator("Administrator", "password"))
|
|
b = cluster.open_bucket("default")
|
try:
|
b.get("xxx")
|
except NotFoundError:
|
print('ok')
|
executed in a loop like this:
for i in $(seq 1 1000); do echo $1; python3 test.py || exit 1; done
Like, exactly that repro above but as vanilla as I could make it. I've seen this same error (though maybe not always a get) come up occasionally during tests, recently. But I couldn't repro it. Now I can! Yay!
Now, as for why? IDK. I'll start poking at it a bit harder now. My first thing I notice is I think this happens only when the document doesn't exist as I ran it for a doc that did, and it finished without incident. Or it is just much less frequent in that case. Or I was lucky. I'll run under lldb and see what I can come up with...
A customer is periodically seeing this error:
This error has very occasionally been seen in testing, and appears to be related to initialisation problems as when seen it always effects the first operation performed. So far we have been unable to reproduce it while attached to a debugger. I would theorise that there is some of race condition occurring that means that operations are called and are able to return NULL without setting an error with PyErr_Set/PyErr_Restore, but without a GDB/LLDB backtrace it is hard to prove.