8000 add warmup documentation - #188 · arangodb/arangodb@0a55886 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a55886

Browse files
ObiWahnmchacki
authored andcommitted
add warmup documentation - #188
1 parent f7a4efd commit 0a55886

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

Documentation/Books/HTTP/Collection/Modifying.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Modifying a Collection
77
<!-- js/actions/api-collection.js -->
88
@startDocuBlock JSF_put_api_collection_unload
99

10+
<!-- js/actions/api-collection.js -->
11+
@startDocuBlock JSF_put_api_collection_warmup
12+
1013
<!-- js/actions/api-collection.js -->
1114
@startDocuBlock JSF_put_api_collection_properties
1215

Documentation/Books/Manual/Indexing/WorkingWithIndexes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ Same as above. Instead of an index an index handle can be given.
139139
@endDocuBlock col_dropIndex
140140

141141

142+
### Warmup index caches
143+
<!-- arangod/V8Server/v8-vocindex.cpp -->
144+
145+
146+
warms up index caches of a collection's indexes.
147+
`collection.warumup()`
148+
149+
Warms up indexes caches of a collection.
150+
Iterates over all indexes of a collection and
151+
reads data into index caches to speed up retrival.
152+
Index types that do not support the operation are
153+
silently ignored.
154+
155+
supported index types: Edge Index (RocksDB)
156+
142157

143158
Database Methods
144159
----------------
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
@startDocuBlock JSF_put_api_collection_warmup
3+
@brief Warmup index caches
4+
5+
@RESTHEADER{PUT /_api/collection/{collection-name}/warmup, Warmup Collection}
6+
7+
@RESTURLPARAMETERS
8+
9+
@RESTURLPARAM{collection-name,string,required}
10+
11+
@RESTDESCRIPTION
12+
Warms up indexes caches of a collection.
13+
Iterates over all indexes of a collection and
14+
reads data into index caches to speed up retrival.
15+
Index types that do not support the operation are
16+
silently ignored.
17+
18+
19+
- *id*: The identifier of the collection.
20+
21+
- *name*: The name of the collection.
22+
23+
- *status*: The status of the collection as number.
24+
25+
- *type*: The collection type. Valid types are:
26+
- 2: document collection
27+
- 3: edges collection
28+
29+
- *isSystem*: If *true* then the collection is a system collection.
30+
31+
supported index types: Edge Index (RocksDB)
32+
33+
@RESTRETURNCODES
34+
35+
@RESTRETURNCODE{400}
36+
If the *collection-name* is missing, then a *HTTP 400* is
37+
returned.
38+
39+
@RESTRETURNCODE{404}
40+
If the *collection-name* is unknown, then a *HTTP 404* is returned.
41+
42+
@EXAMPLES
43+
44+
@EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierWarmup}
45+
var cn = "products";
46+
db._drop(cn);
47+
var coll = db._create(cn, { waitForSync: true });
48+
var url = "/_api/collection/"+ coll.name() + "/warmup";
49+
50+
var response = logCurlRequest('PUT', url, '');
51+
52+
assert(response.code === 200);
53+
54+
logJsonResponse(response);
55+
db._drop(cn);
56+
@END_EXAMPLE_ARANGOSH_RUN
57+
58+
@endDocuBlock
59+

0 commit comments

Comments
 (0)
0