Ahh I see, thanks for the information.
I don’t think that workaround will be possible for us, as we are storing a large history of data in our bucket; the recent data in RAM is most accessed but we need to have all of it accessible. Therefore the RAM required to store all keys is extremely high.
While not as high performing, do you think it would be reasonable for me to implement the AI id feature using CB locks? I’d prefer not to do this but if the 4.1 release is not soon forthcoming on CE I may need to implement some workaround.
Ah, ok I thougt “AI = Artifical intellegence”
I don’t think you should “reinvent the wheel” by using locks.
Google (or search this forum) for something like “couchbase sql auto increment implementation”, obviously, you are not the first one in the world with this problem.
“Think different”: does your application really needs “sequential ids” ? Try timestamps as IDs, data-chunk-hashes as IDs, user-defined ids etc. And google “different ideas” too.
Anyway, i think further discussion is out of bounds for current topic.
com.couchbase.client.java.error.DocumentDoesNotExistException
at com.couchbase.client.java.CouchbaseAsyncBucket$31.call(CouchbaseAsyncBucket.java:919)
at com.couchbase.client.java.CouchbaseAsyncBucket$31.call(CouchbaseAsyncBucket.java:904)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
at rx.observers.Subscribers$5.onNext(Subscribers.java:235)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext(OnSubscribeDoOnEach.java:101)
at rx.internal.producers.SingleProducer.request(SingleProducer.java:65)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
at rx.Subscriber.setProducer(Subscriber.java:205)
at rx.Subscriber.setProducer(Subscriber.java:205)
at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:103)
at com.couchbase.client.core.endpoint.AbstractGenericHandler.completeResponse(AbstractGenericHandler.java:384)
at com.couchbase.client.core.endpoint.AbstractGenericHandler.access$000(AbstractGenericHandler.java:69)
at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:402)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.kv.CounterResponse.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:118)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73)
… 20 more