You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the findAll(Pageable) repository method in release 4.3.1, it throws an exception: com.google.datastore.v1.client.DatastoreException: Method google.datastore.v1.Datastore/RunAggregationQuery is unimplemented. Longer stack trace below.
Using release 4.3.0 works okay. Using findAll() with no parameters works okay too.
The example includes two tests, one with simple findAll() which works, and one that uses the PageRequest parameter and fails.
Stack trace
com.google.cloud.datastore.DatastoreException: Method google.datastore.v1.Datastore/RunAggregationQuery is unimplemented
at app//com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.translate(HttpDatastoreRpc.java:140)
at app//com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.translate(HttpDatastoreRpc.java:125)
at app//com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.runAggregationQuery(HttpDatastoreRpc.java:211)
at app//com.google.cloud.datastore.RetryAndTraceDatastoreRpcDecorator.lambda$runAggregationQuery$0(RetryAndTraceDatastoreRpcDecorator.java:109)
at app//com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:103)
at app//com.google.cloud.RetryHelper.run(RetryHelper.java:76)
at app//com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
at app//com.google.cloud.datastore.RetryAndTraceDatastoreRpcDecorator.invokeRpc(RetryAndTraceDatastoreRpcDecorator.java:115)
at app//com.google.cloud.datastore.RetryAndTraceDatastoreRpcDecorator.runAggregationQuery(RetryAndTraceDatastoreRpcDecorator.java:108)
at app//com.google.cloud.datastore.execution.AggregationQueryExecutor.execute(AggregationQueryExecutor.java:54)
at app//com.google.cloud.datastore.DatastoreImpl.runAggregation(DatastoreImpl.java:201)
at app//com.google.cloud.spring.data.datastore.core.DatastoreTemplate.count(DatastoreTemplate.java:264)
at app//com.google.cloud.spring.data.datastore.repository.support.SimpleDatastoreRepository.lambda$findAll$1(SimpleDatastoreRepository.java:100)
at app//com.google.cloud.spring.data.datastore.repository.support.SimpleDatastoreRepository.getOrComputeTotalCount(SimpleDatastoreRepository.java:248)
at app//com.google.cloud.spring.data.datastore.repository.support.SimpleDatastoreRepository.findAll(SimpleDatastoreRepository.java:100)
at java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base@17.0.5/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:568)
at app//org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:288)
at app//org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:136)
at app//org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:120)
at app//org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:516)
at app//org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:285)
at app//org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:628)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at app//org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:168)
at app//org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:143)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at app//org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at app//org.springframework.data.repository.core.support.MethodInvocationValidator.invoke(MethodInvocationValidator.java:94)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at app//org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
at app/jdk.proxy3/jdk.proxy3.$Proxy84.findAll(Unknown Source)
at app//com.tjasink.datastorefindalltest.BookRepositoryTest.find all books with pages and sorting(BookRepositoryTest.kt:45)
The text was updated successfully, but these errors were encountered:
stjasink
changed the title
Release 4.3.1 breaks findAll(Pageable) in spring-cloud-gcp-starter-data-datastore
Release 4.3.1 breaks findAll(Pageable) in spring-cloud-gcp-data-datastore
May 19, 2023
stjasink
changed the title
Release 4.3.1 breaks findAll(Pageable) in spring-cloud-gcp-data-datastore
Release 4.3.1 breaks findAll(PageRequest) in spring-cloud-gcp-data-datastore
May 19, 2023
Is this only an issue when using the Datastore Emulator? I've tested findAll(PageRequest) against the actual Datastore service and it worked for me.
cc: @kolea2
Based on the stack trace, it looks like #1782 is the change that's causing this. It uses the count aggregation query, which is currently not supported by the Datastore Emulator.
@meltsufin I have just run it against actual Datastore and it does work, so it looks like it is indeed only failing on the emulator. Thanks for investigating.
I'll have to disable some of my tests until the emulator supports aggregations 😬
Describe the bug
When using the
findAll(Pageable)
repository method in release 4.3.1, it throws an exception:com.google.datastore.v1.client.DatastoreException: Method google.datastore.v1.Datastore/RunAggregationQuery is unimplemented
. Longer stack trace below.Using release 4.3.0 works okay. Using
findAll()
with no parameters works okay too.Sample
I have an example at https://github.com/stjasink/datastore-find-all-test
The example includes two tests, one with simple
findAll()
which works, and one that uses thePageRequest
parameter and fails.Stack trace
The text was updated successfully, but these errors were encountered: