Skip to content

Commit a57796f

Browse files
authored
Fix issue 4441 (#4449)
Signed-off-by: Peng Huo <[email protected]>
1 parent 009b53d commit a57796f

File tree

3 files changed

+12
-45
lines changed

3 files changed

+12
-45
lines changed

docs/category.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"bash": [
33
"user/ppl/interfaces/endpoint.rst",
44
"user/ppl/interfaces/protocol.rst",
5-
"user/ppl/admin/settings.rst",
65
"user/optimization/optimization.rst",
76
"user/admin/settings.rst"
87
],
@@ -64,5 +63,8 @@
6463
"user/ppl/functions/string.rst",
6564
"user/ppl/general/datatypes.rst",
6665
"user/ppl/general/identifiers.rst"
66+
],
67+
"bash_settings": [
68+
"user/ppl/admin/settings.rst"
6769
]
6870
}

docs/user/ppl/admin/settings.rst

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,6 @@ PPL query::
7373
"status": 400
7474
}
7575

76-
Example 3
77-
---------
78-
79-
You can reset the setting to default value like this.
80-
81-
PPL query::
82-
83-
sh$ curl -sS -H 'Content-Type: application/json' \
84-
... -X PUT localhost:9200/_plugins/_query/settings \
85-
... -d '{"transient" : {"plugins.ppl.enabled" : null}}'
86-
{
87-
"acknowledged": true,
88-
"persistent": {},
89-
"transient": {}
90-
}
91-
9276
plugins.query.memory_limit
9377
==========================
9478

@@ -147,17 +131,6 @@ Change the size_limit to 1000::
147131
"transient": {}
148132
}
149133

150-
Rollback to default value::
151-
152-
sh$ curl -sS -H 'Content-Type: application/json' \
153-
... -X PUT localhost:9200/_plugins/_query/settings \
154-
... -d '{"persistent" : {"plugins.query.size_limit" : null}}'
155-
{
156-
"acknowledged": true,
157-
"persistent": {},
158-
"transient": {}
159-
}
160-
161134
Note: the legacy settings of ``opendistro.query.size_limit`` is deprecated, it will fallback to the new settings if you request an update with the legacy name.
162135

163136
plugins.calcite.all_join_types.allowed
@@ -270,22 +243,6 @@ PPL query::
270243
Example 2
271244
---------
272245

273-
Reset to default (unlimited) by setting to null:
274-
275-
PPL query::
276-
277-
sh$ curl -sS -H 'Content-Type: application/json' \
278-
... -X PUT localhost:9200/_plugins/_query/settings \
279-
... -d '{"transient" : {"plugins.ppl.values.max.limit" : null}}'
280-
{
281-
"acknowledged": true,
282-
"persistent": {},
283-
"transient": {}
284-
}
285-
286-
Example 3
287-
---------
288-
289246
Set to 0 explicitly for unlimited values:
290247

291248
PPL query::

doctest/test_docs.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,24 @@ def create_cli_suite(filepaths, parser, setup_func):
365365
# Entry point for unittest discovery
366366
def load_tests(loader, suite, ignore):
367367
tests = []
368+
settings_tests = []
368369
category_manager = CategoryManager()
369370

370371
for category_name in category_manager.get_all_categories():
371372
docs = category_manager.get_category_files(category_name)
372373
if not docs:
373374
continue
374375

375-
tests.append(get_test_suite(category_manager, category_name, get_doc_filepaths(docs)))
376+
suite = get_test_suite(category_manager, category_name, get_doc_filepaths(docs))
377+
if 'settings' in category_name:
378+
settings_tests.append(suite)
379+
else:
380+
tests.append(suite)
376381

377382
random.shuffle(tests)
383+
if settings_tests:
384+
random.shuffle(settings_tests)
385+
tests.extend(settings_tests)
378386
return DocTests(tests)
379387

380388
def get_test_suite(category_manager: CategoryManager, category_name, filepaths):

0 commit comments

Comments
 (0)