fix(supervisor): re-review changed sources instead of failing the run
This commit is contained in:
@@ -70,9 +70,10 @@ it('scans read-only, transfers at most 200 rows, yields without a transaction, a
|
||||
expect(wrote).toBe(true)
|
||||
expect(f.store.progress(f.runId).sources).toBe(450)
|
||||
expect(f.store.load(f.runId).initializing).toBeUndefined()
|
||||
// Frozen scan revisions must not silently advance to the concurrent write.
|
||||
await expect(f.store.resumeWithReader(f.runId, f.reader)).rejects.toThrow('source changed')
|
||||
expect(f.store.load(f.runId).restartRequired).toBe(true)
|
||||
// A concurrent write is detected on resume and that one source is re-frozen, not the whole run failed.
|
||||
await f.store.resumeWithReader(f.runId, f.reader)
|
||||
expect(f.store.progress(f.runId)).toMatchObject({ sources: 450, revisedSources: 1 })
|
||||
expect(f.store.load(f.runId).restartRequired).toBeUndefined()
|
||||
await expect(f.worker.call('reviewManifestPage', [f.runId, 0])).rejects.toThrow('lost its snapshot')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user