-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add documentation on fileset migrations
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Fileset Migrations | ||
|
||
Occasionally, changes will be made to the format of fileset files on disk. When those changes need to be applied to already existing filesets, a fileset migration is required. Migrating existing filesets is beneficial so that improvements made in newer releases can be applied to all filesets, not just newly created ones. | ||
|
||
## Migration Process | ||
Migrations are executed during the initial stages of the bootstrap. When enabled, the filesystem bootstrapper will scan for filesets that should be migrated and migrate any filesets found. A fileset is determined to be in need of a migration based on the `MajorVersion` and `MinorVersion` found in the info file. If `MajorVersion.MinorVersion` is less than the target migration version, then that fileset will be scheduled for migration. | ||
|
||
If migrations are deemed necessary, the bootstrap process pauses until the migrations complete. If a failure occurs while migrating, an error is logged and the process continues. If a fileset is not successfully migrated, the non-migrated version of the fileset is used going forward. In other words, whether they succeed or fail, migrations should leave filesets in a good state. | ||
|
||
## Enabling Migrations | ||
Migrations are enabled by setting the following fields in the M3 configuration (`m3dbnode.yml`): | ||
|
||
``` | ||
db: | ||
bootstrap: | ||
fs: | ||
migration: | ||
targetMigrationVersion: "1.1" | ||
# Optional. Defaults to the number of available CPUs / 2. | ||
concurrency: <# of concurrent workers> | ||
``` | ||
|
||
## Valid Target Migration Versions | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Version</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr> | ||
<td><code>"none"</code></td> | ||
<td>Disables migrations. Effectively the same as not including the migration option in the M3 configuration</td> | ||
</tr> | ||
<tr> | ||
<td><code>"1.1"</code></td> | ||
<td>Migrates to version 1.1. Version 1.1 adds checksum values to individual entries in the index file of data filesets. This speeds up bootstrapping as validating the index file no longer requires loading and calculating the checksum of the entire file against the value in the digests file.</td> | ||
</tr> | ||
</tbody> | ||
</table> |