# ElasticSearch 2.3.4 not updating after a client update (java API)

**URL:** <https://discuss.elastic.co/t/elasticsearch-2-3-4-not-updating-after-a-client-update-java-api/104924>\
**Category:** Elasticsearch\
**Created:** [October 23, 2017, 3:42pm UTC](https://discuss.elastic.co/t/elasticsearch-2-3-4-not-updating-after-a-client-update-java-api/104924 "2017-10-23T15:42:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arturcortereal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arturcortereal/32/23299_2.png) [@arturcortereal](https://discuss.elastic.co/u/arturcortereal)\
**Post date:** [October 23, 2017, 3:42pm UTC](https://discuss.elastic.co/t/elasticsearch-2-3-4-not-updating-after-a-client-update-java-api/104924/1 "2017-10-23T15:42:05Z")

</div>

Hey guys.

I'm having an issue and I would like to understand what is going on. I have a Dao class that executes the following code:

```
                    listOne.add(peanut);

		UpdateRequest updateRequest = new UpdateRequest();
		updateRequest.index(aux.getIndex());
		updateRequest.type(org.core.database.json.Element.classType);
		updateRequest.id(elementId.toString());
		updateRequest.doc("listOne",listOne);
		element.setListOne(listOne);
		
		// Retry 3 times before failing the update
		updateRequest.retryOnConflict(3);
		client.update(updateRequest).get();

```

The thing is.. imagine that I have 10 elements to be updated. It will run this Dao 10 times. The first 1/2 records are not properly updated, but the rest is fine.

I tried to print out the list after and before the update, and in some cases, it will update, and it will get the previous list (already updated). But sometimes the things are not ok, and it won't get the list updated. Probably something related to timings / delay?

Do you know what is the root cause?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 20, 2017, 3:43pm UTC](https://discuss.elastic.co/t/elasticsearch-2-3-4-not-updating-after-a-client-update-java-api/104924/2 "2017-11-20T15:43:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
