Skip to content
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

How to replay projections? #2

Open
CumpsD opened this issue Nov 9, 2020 · 0 comments
Open

How to replay projections? #2

CumpsD opened this issue Nov 9, 2020 · 0 comments
Assignees
Labels
research Topic being actively researched.

Comments

@CumpsD
Copy link
Contributor

CumpsD commented Nov 9, 2020

Replaying Projections

Problem

Sometimes bugs occur which cause projections to project the wrong data. Fixing the bug by itself is not enough to get the system back in a correct state. For this, the projection needs to be rebuilt with the fixed code.

Projections take time however, some more than others, and during this period it is not acceptable to have missing data in the system. The old buggy data should remain available until the new corrected data is done projecting.

How do we deal with this?

Constraints

  • Old data should remain available during a rebuild.
  • Automation is a nice to have, but not a requirement, manual deploys are permitted for (rare) cases like this.

Brainstorm Conclusion

During a brainstorm among developers, we came to the conclusion automating this is not worth the investment at the time. Given the fact that bugs requiring a full rebuild are rather rare, it is acceptable to have some manual effort to coordinate these rebuilds.

The chosen path is to:

  • Duplicate the existing buggy projection code as a new projection.
  • Deploy the new projection and let it populate.
  • Deploy a new version of the API which reads from the new fixed projection.
  • Remove the buggy projection from the codebase.

Additionally, we have to keep in mind breaking data changes for any of these and utilize versioning in the API if required.

@CumpsD CumpsD added the research Topic being actively researched. label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research Topic being actively researched.
Projects
None yet
Development

No branches or pull requests

5 participants