From 9d88381c899aa6ae82f0c5e93a7ee4471f408845 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Mon, 14 Jan 2019 15:43:46 -0800 Subject: [PATCH] Online deletion edits per review - Cleaned up can_delete method fields, errors - Changed commands to delete old db files in full history tutorial - Clarified RocksDB w/ rotational disks - Clarified how many ledgers may be stored w/ online deletion --- .../ledger-history/online-deletion.md | 5 ++++- .../can_delete.md | 19 +++++++++---------- .../configuration/configure-full-history.md | 6 +++--- .../installation/capacity-planning.md | 4 +++- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/content/concepts/the-rippled-server/ledger-history/online-deletion.md b/content/concepts/the-rippled-server/ledger-history/online-deletion.md index c543308aed..5ec0f0939d 100644 --- a/content/concepts/the-rippled-server/ledger-history/online-deletion.md +++ b/content/concepts/the-rippled-server/ledger-history/online-deletion.md @@ -22,7 +22,10 @@ Inside the ledger store, ledger data is "de-duplicated". In other words, data th The online deletion settings configure how many ledger versions the `rippled` server should keep available in the ledger store at a time. However, the specified number is a guideline, not a hard rule: - The server never deletes data more recent than the configured number of ledger versions, but it may have less than that amount available if it has not been running for long enough or if it lost sync with the network at any time. (The server attempts to backfill at least some history; see [fetching history](ledger-history.html#fetching-history) for details.) -- The server may store up to twice the configured number of ledger versions if online deletion is set to run automatically. (Each time it runs, it reduces the number of stored ledger versions to approximately the configured number.) +- The server may store up to just over twice the configured number of ledger versions if online deletion is set to run automatically. (Each time it runs, it reduces the number of stored ledger versions to approximately the configured number.) + + If online deletion is delayed because the server is busy, ledger versions can continue to accumulate. When functioning normally, online deletion begins when the server has twice the configured number of ledger versions, but it may not complete until after several more ledger versions have accumulated. + - If advisory deletion is enabled, the server stores all the ledger versions that it has acquired and built until its administrator calls the [can_delete method][]. The amount of data the server stores depends on how often you call [can_delete][can_delete method] and how big an interval of time your `online_delete` setting represents: diff --git a/content/references/rippled-api/admin-rippled-methods/logging-and-data-management-methods/can_delete.md b/content/references/rippled-api/admin-rippled-methods/logging-and-data-management-methods/can_delete.md index db8f1ea407..ca647a42bb 100644 --- a/content/references/rippled-api/admin-rippled-methods/logging-and-data-management-methods/can_delete.md +++ b/content/references/rippled-api/admin-rippled-methods/logging-and-data-management-methods/can_delete.md @@ -43,16 +43,15 @@ rippled can_delete 11320417 -The request includes the following optional parameter: +The request accepts the following parameter: | `Field` | Type | Description | |:-------------|:------------------|:------------------------------------------| -| `can_delete` | String or Integer | The [Ledger Index][] of the maximum ledger version to allow to be deleted. The special case `never` disables online deletion. The special case `always` enables automatic online deletion as if advisory deletion was disabled. The special case `now` allows online deletion one time at the next validated ledger that meets or exceeds the configured `online_delete` value. | +| `can_delete` | String or Integer | _(Optional)_ The [Ledger Index][] of the maximum ledger version to allow to be deleted. The special case `never` disables online deletion. The special case `always` enables automatic online deletion as if advisory deletion was disabled. The special case `now` allows online deletion one time at the next validated ledger that meets or exceeds the configured `online_delete` value. If omitted, the server makes no changes (but still replies with the current `can_delete` value). | -If no parameter is specified, no change is made. +### Response Format -The response follows the [standard format][], with -a successful result containing the following fields: +The response follows the [standard format][], with a successful result containing the following fields: | `Field` | Type | Description | |:-------------|:--------|:----------------------------------------------------| @@ -62,11 +61,11 @@ Use this command with no parameter to query the existing `can_delete` setting. ### Possible Errors -* Any of the [universal error types][]. -* `notEnabled` - Not enabled in configuration. -* `notReady` - Not ready to handle this request. -* `lgrNotFound` - Ledger not found. -* `invalidParams` - Invalid parameters. +- Any of the [universal error types][]. +- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. +- `lgrNotFound` - The ledger specified by the `can_delete` field of the request does not exist, or it does exist but the server does not have it. +- `notEnabled` - If either online deletion or advisory deletion are not enabled in the server's configuration. +- `notReady` - The server is not ready to run online deletion at the moment. This usually means the server has just started up and has not yet acquired a validated ledger. ## See Also diff --git a/content/tutorials/manage-the-rippled-server/configuration/configure-full-history.md b/content/tutorials/manage-the-rippled-server/configuration/configure-full-history.md index fd7a96d5a1..d859cf08c6 100644 --- a/content/tutorials/manage-the-rippled-server/configuration/configure-full-history.md +++ b/content/tutorials/manage-the-rippled-server/configuration/configure-full-history.md @@ -59,9 +59,9 @@ To configure your server to acquire and store full history, complete the followi After disabling online deletion, the server ignores any data that was downloaded while online deletion was enabled, so you may as well clear up the disk space. For example: - rm -r /var/lib/rippled/db/rocksdb/* - rm /var/lib/rippled/db/*.db - rm /var/lib/rippled/db/*.sqlite + rm -r /var/lib/rippled/db/* + + **Warning:** Be sure that you have not put any files you want to keep in the folder before you delete it. It is generally safe to delete all of a `rippled` server's database files, but you should only do this if the configured database folder is not used for anything other than `rippled`'s databases. 0. Start the `rippled` server, importing the database dump if you have one available: diff --git a/content/tutorials/manage-the-rippled-server/installation/capacity-planning.md b/content/tutorials/manage-the-rippled-server/installation/capacity-planning.md index 7296e9a286..9bdaec4e07 100644 --- a/content/tutorials/manage-the-rippled-server/installation/capacity-planning.md +++ b/content/tutorials/manage-the-rippled-server/installation/capacity-planning.md @@ -53,7 +53,9 @@ The example `rippled-example.cfg` file has the `type` field in the `[node_db]` s #### More About Using RocksDB -[RocksDB](https://rocksdb.org/docs/getting-started.html) is an embeddable persistent key-value store that works well with both rotational disks and solid state disks. +[RocksDB](https://rocksdb.org/docs/getting-started.html) is an embeddable persistent key-value store. + +RocksDB works well on solid-state disks. RocksDB performs better than NuDB when used with rotational disks, but you may still encounter performance problems unless you use solid-state disks. RocksDB requires approximately one-third less [disk storage](#disk-space) than NuDB and provides better I/O latency. However, the better I/O latency comes as result of the large amount of RAM RocksDB requires to store data indexes.