From ba3118673f3373ef1e4cfbb0563bcd05c5370db5 Mon Sep 17 00:00:00 2001 From: Aschen Date: Tue, 3 Mar 2020 06:21:24 +0100 Subject: [PATCH 1/5] add-scroll-info --- doc/7/controllers/document/search/index.md | 11 +++++++++++ doc/7/core-classes/search-result/next/index.md | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/doc/7/controllers/document/search/index.md b/doc/7/controllers/document/search/index.md index 3609c7f11..23cb0f60d 100644 --- a/doc/7/controllers/document/search/index.md +++ b/doc/7/controllers/document/search/index.md @@ -16,6 +16,17 @@ That limit is by default set at 10000 documents, and you can't get over it even When processing a large number of documents (i.e. more than 1000), it is advised to paginate the results using [SearchResult.next](/sdk/js/7/core-classes/search-result/next) rather than increasing the size parameter. ::: +::: warning +When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. +It can lead to memory leaks in a too great scroll duration is provided or if too many scroll session are open simultaneously. +::: + +::: info + +You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll session under the `services.storage.maxScroll` configuration key. +::: + +
```js diff --git a/doc/7/core-classes/search-result/next/index.md b/doc/7/core-classes/search-result/next/index.md index 843ca788b..7edf298f9 100644 --- a/doc/7/core-classes/search-result/next/index.md +++ b/doc/7/core-classes/search-result/next/index.md @@ -40,6 +40,16 @@ For that reason, this method is guaranteed to return consistent results, even if This is the most consistent way to paginate results, however, this comes at a higher computing cost for the server. +::: warning +When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. +It can lead to memory leaks in a too great scroll duration is provided or if too many scroll session are open simultaneously. +::: + +::: info + +You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll session under the `services.storage.maxScroll` configuration key. +::: + <<< ./snippets/scroll.js ### Strategy: sort / size From 1daf2f68698dc820ed483b81c51a8d08dbd1970d Mon Sep 17 00:00:00 2001 From: Adrien Maret Date: Thu, 5 Mar 2020 05:03:57 +0100 Subject: [PATCH 2/5] Update doc/7/controllers/document/search/index.md Co-Authored-By: Yoann-Abbes <44844010+Yoann-Abbes@users.noreply.github.com> --- doc/7/controllers/document/search/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/7/controllers/document/search/index.md b/doc/7/controllers/document/search/index.md index 23cb0f60d..56a350742 100644 --- a/doc/7/controllers/document/search/index.md +++ b/doc/7/controllers/document/search/index.md @@ -18,7 +18,7 @@ When processing a large number of documents (i.e. more than 1000), it is advised ::: warning When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. -It can lead to memory leaks in a too great scroll duration is provided or if too many scroll session are open simultaneously. +It can lead to memory leaks if a too great scroll duration is provided or if too many scroll sessions are open simultaneously. ::: ::: info From 3063f1b93e0a55a23dddd828d6c2fb1bc1c59e8f Mon Sep 17 00:00:00 2001 From: Adrien Maret Date: Thu, 5 Mar 2020 05:04:23 +0100 Subject: [PATCH 3/5] Apply suggestions from code review Co-Authored-By: Yoann-Abbes <44844010+Yoann-Abbes@users.noreply.github.com> --- doc/7/controllers/document/search/index.md | 2 +- doc/7/core-classes/search-result/next/index.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/7/controllers/document/search/index.md b/doc/7/controllers/document/search/index.md index 56a350742..e7ca41e2c 100644 --- a/doc/7/controllers/document/search/index.md +++ b/doc/7/controllers/document/search/index.md @@ -23,7 +23,7 @@ It can lead to memory leaks if a too great scroll duration is provided or if too ::: info -You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll session under the `services.storage.maxScroll` configuration key. +You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll sessions under the `services.storage.maxScroll` configuration key. ::: diff --git a/doc/7/core-classes/search-result/next/index.md b/doc/7/core-classes/search-result/next/index.md index 7edf298f9..15789bf67 100644 --- a/doc/7/core-classes/search-result/next/index.md +++ b/doc/7/core-classes/search-result/next/index.md @@ -42,12 +42,12 @@ This is the most consistent way to paginate results, however, this comes at a hi ::: warning When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. -It can lead to memory leaks in a too great scroll duration is provided or if too many scroll session are open simultaneously. +It can lead to memory leaks if a too great scroll duration is provided or if too many scroll sessions are open simultaneously. ::: ::: info -You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll session under the `services.storage.maxScroll` configuration key. +You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll sessions under the `services.storage.maxScroll` configuration key. ::: <<< ./snippets/scroll.js From 4ee5b4cd62c8051e4131fc8cefca4ec1c12eaa6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cottinet?= Date: Fri, 6 Mar 2020 11:15:46 +0100 Subject: [PATCH 4/5] Typos --- doc/7/controllers/document/search/index.md | 2 +- doc/7/core-classes/search-result/next/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/7/controllers/document/search/index.md b/doc/7/controllers/document/search/index.md index e7ca41e2c..cf72a5c01 100644 --- a/doc/7/controllers/document/search/index.md +++ b/doc/7/controllers/document/search/index.md @@ -18,7 +18,7 @@ When processing a large number of documents (i.e. more than 1000), it is advised ::: warning When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. -It can lead to memory leaks if a too great scroll duration is provided or if too many scroll sessions are open simultaneously. +It can lead to memory leaks if a scroll duration too great is provided, or if too many scroll sessions are open simultaneously. ::: ::: info diff --git a/doc/7/core-classes/search-result/next/index.md b/doc/7/core-classes/search-result/next/index.md index 15789bf67..5e3dc9199 100644 --- a/doc/7/core-classes/search-result/next/index.md +++ b/doc/7/core-classes/search-result/next/index.md @@ -42,7 +42,7 @@ This is the most consistent way to paginate results, however, this comes at a hi ::: warning When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session. -It can lead to memory leaks if a too great scroll duration is provided or if too many scroll sessions are open simultaneously. +It can lead to memory leaks if ascroll duration too great is provided, or if too many scroll sessions are open simultaneously. ::: ::: info From b70c25fa0332257bd8a55858866e20187fac980b Mon Sep 17 00:00:00 2001 From: scottinet Date: Fri, 6 Mar 2020 11:44:08 +0100 Subject: [PATCH 5/5] fix deadlinks --- doc/7/core-classes/kuzzle-error/introduction/index.md | 2 +- doc/7/essentials/error-handling/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/7/core-classes/kuzzle-error/introduction/index.md b/doc/7/core-classes/kuzzle-error/introduction/index.md index 8a2128fad..9ec909920 100644 --- a/doc/7/core-classes/kuzzle-error/introduction/index.md +++ b/doc/7/core-classes/kuzzle-error/introduction/index.md @@ -10,4 +10,4 @@ order: 0 Inherits from the standard `Error` class. -The KuzzleError class represents an [error response from Kuzzle API](/core/2/api/essentials/errors). \ No newline at end of file +The KuzzleError class represents an [error response from Kuzzle API](/core/2/api/essentials/error-handling). diff --git a/doc/7/essentials/error-handling/index.md b/doc/7/essentials/error-handling/index.md index e8d2ab062..d12d09b35 100644 --- a/doc/7/essentials/error-handling/index.md +++ b/doc/7/essentials/error-handling/index.md @@ -17,7 +17,7 @@ All SDK methods return a promise, that can be rejected with a `KuzzleError` valu | `status` |
number
| Status following [HTTP Standards](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) | | `stack` |
string
| Error stacktrace (Only in development mode) | -You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/2/api/essentials/errors). +You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/2/api/essentials/error-codes/core). #### Example with a promise chain