Hi All,
I would like to know what is a better approach to handle a frequent update of a sample document multiple time.
My scenario is - I am doing performance testing of a REST API to do a GET and PUT call on a same couchbase document. I ran the test for 10 iteration and i started getting error from N1QL query.
019-08-06 09:06:46.165 ERROR 14945 — [-computations-1] exception-handler : {“b”:“demo”,“r”:“13.13.XX.XX:8093”,“s”:“n1ql”,“c”:“6BEDCBFD94723A8B/FFFFFFFFF7E58670”,“t”:7500000,“i”:“6740a945-4953-42c3-93fe-e757d78878ef”,“l”:“10.100.0.16:59738”}
java.util.concurrent.TimeoutException: {“b”:“swipe”,“r”:“13.13.XX.XX:8093”,“s”:“n1ql”,“c”:“6BEDCBFD94723A8B/FFFFFFFFF7E58670”,“t”:7500000,“i”:“6740a945-4953-42c3-93fe-e757d78878ef”,“l”:“13.13.XX.XX:59738”}
at com.couchbase.client.java.bucket.api.Utils$1.call(Utils.java:131) ~[java-client-2.7.3.jar!/:na]
at com.couchbase.client.java.bucket.api.Utils$1.call(Utils.java:127) ~[java-client-2.7.3.jar!/:na]
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140) ~[rxjava-1.3.8.jar!/:1.3.8]
at rx.internal.operators.OnSubscribeTimeoutTimedWithFallback$TimeoutMainSubscriber.onTimeout(OnSubscribeTimeoutTimedWithFallback.java:166) ~[rxjava-1.3.8.jar!/:1.3.8]
at rx.internal.operators.OnSubscribeTimeoutTimedWithFallback$TimeoutMainSubscriber$TimeoutTask.call(OnSubscribeTimeoutTimedWithFallback.java:191) ~[rxjava-1.3.8.jar!/:1.3.8]
Any help will be great
Regards
Hi,
By setting the below properties i see some improvement.
-Dcom.couchbase.mutationTokensEnabled=true -Dcom.couchbase.kvServiceEndpoints=2 -Dcom.couchbase.computationPoolSize=5
But still some time SELECT query take too long time to respond back and get exception on Java side. Even though i have created indexes on the filter parameter.
Regards,
Could you show us the query you are using? And what indexes you have created to make it run efficiently?
Hi,
The query is
SELECT META(test
).id AS _ID, META(test
).cas AS _CAS, test
.* FROM test
WHERE person.id.value
= “9774-e3bf-4c69-9fd2-2ca753b45fb1”
AND _class
= “com.example.userprofile.ProfileDocument”
I have created a seconday index on the field “person.id.value
” . Also the couchbase spring data repository have the annotation @N1qlSecondaryIndexed(indexName = “person_id_value_index”).
The index creation statement is
CREATE INDEX person_id_value_index
ON test
(((person
.id
).value
))
Also i set the consistency level as READ_YOUR_OWN_WRITES
At time i also see below error logs too
019-08-06 13:40:48.871 WARN 20020 — [tionScheduler-1] c.c.c.c.endpoint.AbstractGenericHandler : [XXXX7.eu-west-1.compute.amazonaws.com/XX.XX.XX.XX:11210][KeyValueEndpoint]: Got error while consuming KeepAliveResponse.
java.util.concurrent.TimeoutException: null
at rx.internal.operators.OnSubscribeTimeoutTimedWithFallback$TimeoutMainSubscriber.onTimeout(OnSubscribeTimeoutTimedWithFallback.java:166) ~[rxjava-1.3.8.jar!/:1.3.8]
at rx.internal.operators.OnSubscribeTimeoutTimedWithFallback$TimeoutMainSubscriber$TimeoutTask.call(OnSubscribeTimeoutTimedWithFallback.java:191) ~[rxjava-1.3.8.jar!/:1.3.8]
at rx.internal.schedulers.EventLoopsScheduler$EventLoopWorker$2.call(EventLoopsScheduler.java:189) ~[rxjava-1.3.8.jar!/:1.3.8]
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) ~[rxjava-1.3.8.jar!/:1.3.8]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
Regards,
@Forum: can I have some input on this topic