# Possible effects of not closing scroll

**URL:** <https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321>\
**Category:** Elasticsearch\
**Created:** [December 18, 2017, 10:16pm UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321 "2017-12-18T22:16:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [December 18, 2017, 10:16pm UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/1 "2017-12-18T22:16:23Z")

</div>

Hi,

I have the following setup. A java program, using ES6.0 high/low level libraries, it:

- queries an ES2.2 cluster, using scrolling
- creates new docs out of the 2.2 ones
- indexes them into a ES6.0 cluster

Of course, writing to the 6.0 cluster is no issue. Reading off the 2.2 index mostly works too, but it fails when trying to clear the scroll:

> ```
> clearScrollRequest.addScrollId(scrollId);
> 
> ```

`Unable to parse response body for Response{requestLine=DELETE /_search/scroll HTTP/1.1, host=http://...:9200, response=HTTP/1.1 200 OK}`

If I comment out this code it runs fine.

Now, I am tailing the 2.X index, so I run the scrolling query every min (long story...we are transitioning to 6.0 and this was a pragmatic way to keep the current setup working). Does it sound ok to run this without closing the scroll (remember, once a min...), or should I expect some issue ??

thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 19, 2017, 6:20am UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/2 "2017-12-19T06:20:58Z")

</div>

The rest Client is compatible only with the same major version of your nodes.

So you can't use rest 6.0 with elasticsearch 2.x nodes.  
That's why you have this error message I think.

In that case, I'd use the low level layer to clear the scroll request.

---

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [December 19, 2017, 9:13am UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/3 "2017-12-19T09:13:03Z")

</div>

yes, I am aware about it not being officially supported, my question was more about possible bad side effects of not clearing the scroll....I'l try with your suggestion, thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 19, 2017, 9:24am UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/4 "2017-12-19T09:24:41Z")

</div>

Bad effects:

It will hold the segments on disk as they are until the scroll is cleaned. Which means that even though some segment merges are happening, the "old" ones won't be removed until all locks are gone.

---

<div class="post-metadata">

**Author:** ![jmlucjav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmlucjav/32/5870_2.png) [@jmlucjav](https://discuss.elastic.co/u/jmlucjav)\
**Post date:** [December 19, 2017, 12:13pm UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/5 "2017-12-19T12:13:04Z")

</div>

using the low level worked, thanks!

---

<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:** [January 16, 2018, 12:13pm UTC](https://discuss.elastic.co/t/possible-effects-of-not-closing-scroll/112321/6 "2018-01-16T12:13:48Z")

</div>

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