Hi
I started using the version 2 of the SDK. I like how it is developed.
However I am experiencing an undesired behaviour.
I am trying to write large volume of data at once. So I am using the asynchronous bucket.
But I sometimes miss between %10 to %20 of my documents and I don’t see any errors.
Has anyone had similar problems?
Sample samplePdf = new Sample("Alex", "Dorandish");
InputStream inputStream = CacheClientTestOffline.class.getResourceAsStream("1.pdf");
byte[] pdf = new byte[inputStream.available()];
inputStream.read(pdf,0, inputStream.available());
samplePdf.setPdf(pdf);
String id = System.currentTimeMillis()+"-";
for(int i=0;i<5000;i++) {
CouchbaseDao.getInstance().insertObject(id+i, samplePdf);
}
Then I change the asynchronous to synchronous in this method:
public void insertObject(final String key, final Serializable document) {
final Document doc = SerializableDocument.create(key, document);
this.bucketSynch.insert(doc);
}
Same problem. what am I doing wrong? It is simple sequential insertion. why am I missing data?