Skip to content

Commit ddfbb66

Browse files
authored
Add PUT /_admin/compact to HTTP docs (cockroachdb#552)
1 parent 4257959 commit ddfbb66

File tree

8 files changed

+188
-2
lines changed

8 files changed

+188
-2
lines changed

3.5/generated/allComments.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41140,6 +41140,64 @@ x-content-type-options: nosniff
4114041140

4114141141

4114241142

41143+
@endDocuBlock
41144+
41145+
41146+
<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/put_admin_compact.md -->
41147+
@startDocuBlock put_admin_compact
41148+
41149+
@brief compact all databases
41150+
41151+
@RESTHEADER{PUT /_admin/compact, Compact the entire database system data, RestCompactHandler}
41152+
41153+
@HINTS
41154+
{% hint 'warning' %}
41155+
This command can cause a full rewrite of all data in all databases, which may
41156+
take very long for large databases. It should thus only be used with care and
41157+
only when additional I/O load can be tolerated for a prolonged time.
41158+
{% endhint %}
41159+
41160+
@RESTDESCRIPTION
41161+
This endpoint can be used to reclaim disk space after substantial data
41162+
deletions have taken place. It requires superuser access.
41163+
41164+
@RESTBODYPARAM{changeLevel,boolean,optional,}
41165+
whether or not compacted data should be moved to the minimum possible level.
41166+
The default value is *false*.
41167+
41168+
@RESTBODYPARAM{compactBottomMostLevel,boolean,optional,}
41169+
Whether or not to compact the bottommost level of data.
41170+
The default value is *false*.
41171+
41172+
@RESTRETURNCODES
41173+
41174+
@RESTRETURNCODE{200}
41175+
Compaction started successfully
41176+
41177+
@RESTRETURNCODE{401}
41178+
if the request was not authenticated as a user with sufficient rights
41179+
41180+
@EXAMPLES
41181+
41182+
41183+
<div class="example-container" id="RestAdminCompact_container">
41184+
<div id="RestAdminCompact_long">
41185+
<pre>
41186+
<span class="hljs-meta">shell&gt;</span><span class="bash"> curl -X PUT --header <span class="hljs-string">'accept: application/json'</span> --dump - http://localhost:8529/_admin/compact</span>
41187+
41188+
HTTP/<span class="hljs-number">1.1</span> OK
41189+
content-type: application/json
41190+
x-content-type-options: nosniff
41191+
41192+
{
41193+
}
41194+
</pre>
41195+
</div>
41196+
</div>
41197+
41198+
41199+
41200+
4114341201
@endDocuBlock
4114441202

4114541203

3.5/http/administration-and-monitoring.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ Cluster
4343
Other
4444
-----
4545

46+
<!-- arangod/RocksDBEngine/RocksDBRestHandlers.cpp -->
47+
{% docublock put_admin_compact %}
48+
4649
<!-- js/actions/api-system.js -->
4750
{% docublock get_admin_routing_reloads %}

3.6/generated/allComments.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25865,6 +25865,64 @@ x-content-type-options: nosniff
2586525865

2586625866

2586725867

25868+
@endDocuBlock
25869+
25870+
25871+
<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/put_admin_compact.md -->
25872+
@startDocuBlock put_admin_compact
25873+
25874+
@brief compact all databases
25875+
25876+
@RESTHEADER{PUT /_admin/compact, Compact the entire database system data, RestCompactHandler}
25877+
25878+
@HINTS
25879+
{% hint 'warning' %}
25880+
This command can cause a full rewrite of all data in all databases, which may
25881+
take very long for large databases. It should thus only be used with care and
25882+
only when additional I/O load can be tolerated for a prolonged time.
25883+
{% endhint %}
25884+
25885+
@RESTDESCRIPTION
25886+
This endpoint can be used to reclaim disk space after substantial data
25887+
deletions have taken place. It requires superuser access.
25888+
25889+
@RESTBODYPARAM{changeLevel,boolean,optional,}
25890+
whether or not compacted data should be moved to the minimum possible level.
25891+
The default value is *false*.
25892+
25893+
@RESTBODYPARAM{compactBottomMostLevel,boolean,optional,}
25894+
Whether or not to compact the bottommost level of data.
25895+
The default value is *false*.
25896+
25897+
@RESTRETURNCODES
25898+
25899+
@RESTRETURNCODE{200}
25900+
Compaction started successfully
25901+
25902+
@RESTRETURNCODE{401}
25903+
if the request was not authenticated as a user with sufficient rights
25904+
25905+
@EXAMPLES
25906+
25907+
25908+
<div class="example-container" id="RestAdminCompact_container">
25909+
<div id="RestAdminCompact_long">
25910+
<pre>
25911+
<span class="hljs-meta">shell&gt;</span><span class="bash"> curl -X PUT --header <span class="hljs-string">'accept: application/json'</span> --dump - http://localhost:8529/_admin/compact</span>
25912+
25913+
HTTP/<span class="hljs-number">1.1</span> OK
25914+
content-type: application/json
25915+
x-content-type-options: nosniff
25916+
25917+
{
25918+
}
25919+
</pre>
25920+
</div>
25921+
</div>
25922+
25923+
25924+
25925+
2586825926
@endDocuBlock
2586925927

2587025928

3.6/http/administration-and-monitoring.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,8 @@ Cluster
4646
Other
4747
-----
4848

49+
<!-- arangod/RocksDBEngine/RocksDBRestHandlers.cpp -->
50+
{% docublock put_admin_compact %}
51+
4952
<!-- js/actions/api-system.js -->
5053
{% docublock get_admin_routing_reloads %}

3.7/generated/allComments.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31357,6 +31357,64 @@ x-content-type-options: nosniff
3135731357

3135831358

3135931359

31360+
@endDocuBlock
31361+
31362+
31363+
<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/put_admin_compact.md -->
31364+
@startDocuBlock put_admin_compact
31365+
31366+
@brief compact all databases
31367+
31368+
@RESTHEADER{PUT /_admin/compact, Compact the entire database system data, RestCompactHandler}
31369+
31370+
@HINTS
31371+
{% hint 'warning' %}
31372+
This command can cause a full rewrite of all data in all databases, which may
31373+
take very long for large databases. It should thus only be used with care and
31374+
only when additional I/O load can be tolerated for a prolonged time.
31375+
{% endhint %}
31376+
31377+
@RESTDESCRIPTION
31378+
This endpoint can be used to reclaim disk space after substantial data
31379+
deletions have taken place. It requires superuser access.
31380+
31381+
@RESTBODYPARAM{changeLevel,boolean,optional,}
31382+
whether or not compacted data should be moved to the minimum possible level.
31383+
The default value is *false*.
31384+
31385+
@RESTBODYPARAM{compactBottomMostLevel,boolean,optional,}
31386+
Whether or not to compact the bottommost level of data.
31387+
The default value is *false*.
31388+
31389+
@RESTRETURNCODES
31390+
31391+
@RESTRETURNCODE{200}
31392+
Compaction started successfully
31393+
31394+
@RESTRETURNCODE{401}
31395+
if the request was not authenticated as a user with sufficient rights
31396+
31397+
@EXAMPLES
31398+
31399+
31400+
<div class="example-container" id="RestAdminCompact_container">
31401+
<div id="RestAdminCompact_long">
31402+
<pre>
31403+
<span class="hljs-meta">shell&gt;</span><span class="bash"> curl -X PUT --header <span class="hljs-string">'accept: application/json'</span> --dump - http://localhost:8529/_admin/compact</span>
31404+
31405+
HTTP/<span class="hljs-number">1.1</span> OK
31406+
content-type: application/json
31407+
x-content-type-options: nosniff
31408+
31409+
{
31410+
}
31411+
</pre>
31412+
</div>
31413+
</div>
31414+
31415+
31416+
31417+
3136031418
@endDocuBlock
3136131419

3136231420

3.7/http/administration-and-monitoring.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,8 @@ Cluster
5656
Other
5757
-----
5858

59+
<!-- arangod/RocksDBEngine/RocksDBRestHandlers.cpp -->
60+
{% docublock put_admin_compact %}
61+
5962
<!-- js/actions/api-system.js -->
6063
{% docublock get_admin_routing_reloads %}

3.8/generated/allComments.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42075,9 +42075,9 @@ x-content-type-options: nosniff
4207542075
<!-- filename: /work/ArangoDB/Documentation/DocuBlocks/Rest/Administration/put_admin_compact.md -->
4207642076
@startDocuBlock put_admin_compact
4207742077

42078-
@brief compact entire database
42078+
@brief compact all databases
4207942079

42080-
@RESTHEADER{PUT /_admin/compact, Compact the entire database data, RestCompactHandler}
42080+
@RESTHEADER{PUT /_admin/compact, Compact the entire database system data, RestCompactHandler}
4208142081

4208242082
@HINTS
4208342083
{% hint 'warning' %}

3.8/http/administration-and-monitoring.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,8 @@ Cluster
5656
Other
5757
-----
5858

59+
<!-- arangod/RocksDBEngine/RocksDBRestHandlers.cpp -->
60+
{% docublock put_admin_compact %}
61+
5962
<!-- js/actions/api-system.js -->
6063
{% docublock get_admin_routing_reloads %}

0 commit comments

Comments
 (0)