Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for DR reindex endpoint #21446

Merged
merged 4 commits into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions website/content/api-docs/system/replication/replication-dr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -672,3 +672,56 @@ $ curl \
--data @payload.json \
http://127.0.0.1:8200/v1/sys/replication/dr/secondary/operation-token/delete
```

## Reindex Replication

This endpoint reindexes the local data storage. This can cause a very long delay
depending on the number and size of objects in the data store.

**This endpoint requires a disaster recovery operation token.**

| Method | Path |
| :----- | :--------------------------------------- |
| `POST` | `/sys/replication/dr/secondary/reindex` |

### Parameters

- `diff` `(bool: false)` – Enables a slower re-indexing which will perform a key
level check to diagnose issues. Defaults false.

- `force` `(bool: false)` – Forces a complete re-indexing which only scans data
available in the storage. Defaults false.

- `skip_flush` `(bool: false)` – Skips the tree flushing stage of the reindex
process. This setting can be used to reduce the amount of time the tree is locked
during a reindex process. If this node is killed before the full tree has been
asynchronously flushed the reindex may not have applied fully and a new reindex
may need to be done. Defaults false.

- `dr_operation_token` `(string: <required>)` - DR operation token used to authorize
this request.

### Sample Payload

```json
{
"dr_operation_token": "..."
}
```

### Sample Request

```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
http://127.0.0.1:8200/v1/sys/replication/dr/secondary/reindex
```

### Sample Response

```json
{
"warnings": ["..."]
}
```