HTTPConnector mode: Servlet session datastore.put() call to save the session is flaky
Sometimes, when servlet sessions are enabled, the app gets an error in the like:
com.google.apphosting.api.ApiProxy$CancelledException: The API call datastore_v3.Put() was explicitly cancelled. at com.google.apphosting.utils.runtime.ApiProxyUtils.convertApiError(ApiProxyUtils.java:75) at com.google.apphosting.utils.runtime.ApiProxyUtils.getApiError(ApiProxyUtils.java:202) at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:691) at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:588) at com.google.apphosting.runtime.http.HttpApiHostClient.receivedResponse(HttpApiHostClient.java:296) at com.google.apphosting.runtime.http.JettyHttpApiHostClient$Listener.onComplete(JettyHttpApiHostClient.java:206) at
It seems related to a possible flake in the API server backend, having a race condition between the close statement of the HTTP request and the API request, and when the API is really called, the API ticket is null, and it should not be null.
Possible code change on java side https://github.com/GoogleCloudPlatform/appengine-java-standard/pull/278 does not seems enough. Looking at C++ server side now.
C++ code is now in experiment mode. ETA: 3 weeks to full prod.
C++ code is now in experiment mode. ETA: 3 weeks to full prod.
Ready to test when it's deployed
Thanks! Prod push is taking longer due to other internal constraints like a prod being frozen preparing Cloud Next conference. I will ping this bug when fully deployed.
Code is now is prod. Let us know if you still see some issues.