Open lachlan-roberts opened 5 days ago
@gregw @ludoch the error still occurs after these changes, and I can see that for Jetty94, the datastore.put()
for DatastoreSessionStore
is always called before the requestManager.finishRequest()
even in case of the error. And these are also called by the same thread.
So I do not know why we get the error "the API call to datastore_v3.Put() was explicitly cancelled". Because we are not out of the scope of the request because we have not called RequestManager.finishRequest()
yet.
Thanks Lachlan for the deep investigation. Its indicates that where the issue is: in the backend C++ api server and request manager, which has a potential of race condition between the end of the request and the 'release' of the API ticket necessary to do the last datastore put to store the session... I am inclined on trying to fix this race condition on the appserver side, not Java side. In fact, searching this ApiProxy$CancelledException error in our internal bug system shows that it happened a little bit in the past, and then stopped showing up so no actions were taken...
Working on the server side fix in C++
For the HttpConnector mode we now do not call
RequestManager#finishRequest
until we getHttpStream
completion in Jetty12, orHttpChannel
completion in Jetty-9.4.