File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ SNAPSHOT_FILE="$1"
160
160
NAMESPACE=" $2 "
161
161
162
162
echo " Generated incremental snapshot $SNAPSHOT_FILE for namespace $NAMESPACE "
163
+
164
+ # At this point we can ship the snapshot file to whereever we would like but we
165
+ # must delete it from its location on disk or else sqld will panic.
166
+ rm $SNAPSHOT_FILE
163
167
```
164
168
165
169
and then configure ` sqld ` to generate an incremental snapshot every 5 seconds and invoke the shell script when ` sqld ` generates a snapshot:
@@ -216,6 +220,12 @@ async fn main() {
216
220
}
217
221
```
218
222
223
+ When applying snapshots the format of the file name gives certain information.
224
+ The format is ` {namespace}:{log_id}:{start_frame_no:020x}-{end_frame_no:020x}.snap ` where log_id represents the unqiue write ahead log and then
225
+ for each unique log_id there will be snapshots starting at frame ` 0 ` up until
226
+ the end. Snapshots must be applied sequentially for each log_id starting at
227
+ frame 0.
228
+
219
229
## Multitenancy
220
230
221
231
The ` sqld ` server supports more than one database. To create a database, send a create namespace request to the [ admin API] ( ADMIN_API.md ) .
You can’t perform that action at this time.
0 commit comments