From 40a7155a7d242dabe3a741d119b99c8fccbfe83f Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Fri, 11 Jun 2021 05:41:24 -0400 Subject: [PATCH 1/2] Update RESTORE_FROM_SQLITE.md --- DOC/RESTORE_FROM_SQLITE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOC/RESTORE_FROM_SQLITE.md b/DOC/RESTORE_FROM_SQLITE.md index 3127e92c..cd141fda 100644 --- a/DOC/RESTORE_FROM_SQLITE.md +++ b/DOC/RESTORE_FROM_SQLITE.md @@ -56,7 +56,7 @@ $ rqlite +----+-------+ ``` -**Note that you must convert the backup file (in the above examples the file named `restore.sqlite`) to the list of SQL commands**. You cannot restore using SQLite backup file. +**Note that you must convert the SQLite file (in the above examples the file named `restore.sqlite`) to the list of SQL commands**. You cannot restore using the actual SQLite database file. ## Caveats The behavior of the restore operation when data already exists on the cluster is undefined -- you should only restore to a cluster that has no data, or a brand-new cluster. Also, please **note that SQLite dump files normally contain a command to disable Foreign Key constraints**. If you wish to re-enable Foreign Key constraints after the load operation completes, check out [this documentation](https://github.com/rqlite/rqlite/blob/master/DOC/FOREIGN_KEY_CONSTRAINTS.md). From 01a8a2a1419221cc0d9d4d7536101e87c7798d69 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Sat, 12 Jun 2021 18:04:22 -0400 Subject: [PATCH 2/2] Update DESIGN.md --- DOC/DESIGN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOC/DESIGN.md b/DOC/DESIGN.md index eb7c59d7..9dd03cc9 100644 --- a/DOC/DESIGN.md +++ b/DOC/DESIGN.md @@ -34,7 +34,7 @@ The diagram below shows a high-level view of an rqlite node. The Raft layer always creates a file -- it creates the _Raft log_. The log stores the set of committed SQLite commands, in the order which they were executed. This log is authoritative record of every change that has happened to the system. It may also contain some read-only queries as entries, depending on read-consistency choices. ### SQLite -By default the SQLite layer doesn't create a file. Instead it creates the database in RAM. rqlite can create the SQLite database on disk, if so configured at start-time. +By default the SQLite layer doesn't create a file. Instead it creates the database in memory. rqlite can create the SQLite database on disk, if so configured at start-time, by passing `-on-disk` to `rqlited` at startup. Regardless of whether rqlite creates a database entirely in memory, or on disk, the SQLite database is completely recreated everytime `rqlited` starts, using the information stored in the Raft log. ## Log Compaction and Truncation rqlite automatically performs log compaction, so that disk usage due to the log remains bounded. After a configurable number of changes rqlite snapshots the SQLite database, and truncates the Raft log. This is a technical feature of the Raft consensus system, and most users of rqlite need not be concerned with this.