Skip to content

Commit 5223607

Browse files
committed
Say the 1.2 image updates an existing data volume
The 1.2 image runs ALTER EXTENSION ... UPDATE on a 1.0 or later volume at start, so the claim that a newer image leaves the schema alone is wrong once 1.2 is the latest image. Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
1 parent a86207e commit 5223607

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

‎app/services/articleService.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ${documentdbLocalTelemetryNote}
7373
> \`--init-data true\` seeds the built-in sample data into \`StoreData\`, which the
7474
> verification step below queries. It is **not** enabled by default — without it the
7575
> container starts with no \`StoreData\` database and \`use StoreData\` returns nothing. The data is
76-
> seeded once per data volume. Existing volumes are not migrated automatically;
76+
> seeded once per data volume. Existing volumes keep the sample data they were seeded with;
7777
> re-create the volume to seed again. See
7878
> [DocumentDB Local](/docs/documentdb-local) for \`--init-data-path\`, certificate setup,
7979
> and additional runtime options.
@@ -161,10 +161,13 @@ Until you remove it, re-running \`docker run --name documentdb\` fails with
161161
\`Conflict. The container name "/documentdb" is already in use\`. Mount a named volume
162162
(\`-v documentdb-data:/data\`) before storing anything you want to keep.
163163
164-
A newer image on an existing data volume does not update the DocumentDB schema in that
165-
volume ([documentdb#773](https://github.com/documentdb/documentdb/issues/773)). To move data
166-
from an earlier release or a 1.0 release candidate to 1.0, start the 1.0 image on a new
167-
volume and reload your data, for example with \`mongodump\` and \`mongorestore\`.
164+
From 1.2, the image updates the DocumentDB extensions on an existing 1.0 or later data volume
165+
when it starts, and logs \`Updating the DocumentDB extensions on this data volume\`. If the
166+
update fails, it is rolled back and the container exits with the volume unchanged. This only
167+
goes forward: an older image starts on the updated volume, but some commands then fail, so back
168+
up the volume first if you may need to go back. To move data from a release before 1.0 or a 1.0
169+
release candidate, start the image on a new volume and reload your data, for example with
170+
\`mongodump\` and \`mongorestore\`.
168171
169172
## Troubleshooting and debugging
170173

‎tests/packageArticles.test.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,15 @@ describe('Linux package articles', () => {
388388
'41,505 documents in `stores` and 2 documents in `ratings`',
389389
);
390390
expect(dockerGuide?.content).toContain(
391-
'Existing volumes are not migrated automatically',
391+
'Existing volumes keep the sample data they were seeded with',
392392
);
393393
expect(dockerGuide?.content).not.toContain('use sampledb');
394+
// The 1.2 image updates the extensions on a 1.0 or later volume at start, one way.
395+
expect(dockerGuide?.content).toContain(
396+
'the image updates the DocumentDB extensions on an existing 1.0 or later data volume',
397+
);
398+
expect(dockerGuide?.content).toContain('This only\ngoes forward');
399+
expect(dockerGuide?.content).not.toContain('does not update the DocumentDB schema');
394400

395401
const { readFile } = await import('node:fs/promises');
396402
const { fileURLToPath } = await import('node:url');

0 commit comments

Comments
 (0)