Firestore conflicting with Cloud Scheduler library
See original GitHub issueDescribe your environment
- Operating System version: AppEngine Java 8 standard
- Firebase SDK version: 6.10.0
- Library version: 6.10.0
- Firebase Product: Firestore
Describe the problem
Steps to reproduce:
I recently had to use Cloud Scheduler to trigger tasks for my AppEngine project.
Adding the dependency to the project :
implementation 'com.google.apis:google-api-services-cloudscheduler:v1-rev4-1.25.0'
implementation 'com.google.auth:google-auth-library-oauth2-http:0.17.2'
(The latest I had to add cause GoogleCredential depreciation)
From there, Firestore stopped working due to some opencensus library deprecation, logs are as follow :
java.lang.IllegalAccessError: tried to access field io.opencensus.trace.unsafe.ContextUtils.CONTEXT_SPAN_KEY from class io.grpc.internal.CensusTracingModule$TracingClientInterceptor
Checking the google-cloud-firestore library, it seems the problem was already fixed. So I tried to update my configuration as follow :
implementation("com.google.firebase:firebase-admin:6.10.0") {
exclude group: "com.google.cloud", module: "google-cloud-firestore"
}
implementation 'com.google.cloud:google-cloud-firestore:1.26.0'
From there, the dependency issue seems to be gone, although none of my query are performed correctly (at least in less than 60 seconds).
Relevant Code:
Reduced for lisibility :
FirestoreClient
.getFirestore()
.collection("my_collection")
.whereEqualTo("id", object.getId())
.get()
.get()
The collection contains 15 documents, id is indexed, and the query times out when the AppEngine thread serving is dying, but it spent 58 seconds performing it (which is almost 58 more seconds than our firebase client on the frontend for the same query)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Updated to Spring Cloud SR3, issue is fixed !
Thanks for your reply.
Let me takes this as a next step :
Will report my finding asap.