Repository navigation
fix(store): give an imported request a usage id of the importing deployment's #2189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
feb4243
4aeecdc
bc9d1ca
4be1ded
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| -- +goose Up | ||
|
|
||
| -- The usage id a request had where it was first recorded, kept by an import, which gives the row | ||
| -- a usage id of this deployment's: a row taken back where it was recorded is then known there. | ||
| ALTER TABLE requests ADD COLUMN IF NOT EXISTS source_usage_id uuid; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Should fix] R2.1 No |
||
|
|
||
| -- +goose Down | ||
| ALTER TABLE requests DROP COLUMN IF EXISTS source_usage_id; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Should fix] R2.2 A mutation survives the whole
DataMoveSuite:picked[j] = "r.usage_id"(keep the sent usage id, notorigin, assource_usage_id). Then a copy of a copy of a copy stores the first copy's derived id as its origin, and a row sent home after two hops lands twice.TestARequestMovedOnFromACopyIsOneRowWhereverItLandspasses under it only by chance: it deletes the original, and the second hop then finds the copy by its derived id.Ready row for
DataMoveSuite(passes on head, fails under the mutant with 2 rows):home := s.takenRequest(s.source, id);s.move("acme", "acme"); import each row ofexportFrom(s.destination, "acme")intos.destinationasglobex; import each row ofexportFrom(s.destination, "globex")intos.sourceasacme; thenexportFrom(s.source, "acme").of("requests")has 1 row withusage_id == home.UsageID.