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

Conflict Resolution #25

Closed
rosibaj opened this issue Apr 8, 2019 · 2 comments
Closed

Conflict Resolution #25

rosibaj opened this issue Apr 8, 2019 · 2 comments
Assignees

Comments

@rosibaj
Copy link
Contributor

rosibaj commented Apr 8, 2019

What happens when 2 records do not match in 2 repositories?

Expected Behaviour

If the data of the same Analysis-ID does not match in two different song repositories, then:

  1. The analysis document should be deleted from the index.
  2. An alert for data-conflict-resolution should be sent to a message queue recording the repository and both analysis ids (is there a unique SONG record id for each of these as well?)

Critera to delete a record -
All fields must have the exact same value EXCEPT for date-time values like created_date or updated_date OR the info fields. If they have a single field that does not match, then delete the record.

@rosibaj rosibaj added this to the Platform - Sprint 1 milestone Apr 8, 2019
@rosibaj rosibaj self-assigned this Apr 8, 2019
@rosibaj rosibaj added specs-needed Specs are needed for issue specs-wip Specs are in progress question Further information is requested and removed specs-needed Specs are needed for issue labels Apr 8, 2019
@christinayung
Copy link
Member

Unless there's a timestamp on when the analysis is last updated/uploaded, I think all the fields should be the same. This expected behavior looks good.

@rosibaj rosibaj removed question Further information is requested specs-wip Specs are in progress labels Apr 12, 2019
@rosibaj rosibaj assigned blabadi and unassigned rosibaj Apr 22, 2019
@blabadi
Copy link
Contributor

blabadi commented Apr 30, 2019

Documenting a discussion that came up:

Song A (primary) - Song B

Problem with the current approach
if song A index a file then song B tries to index an invalid version of the file then maestro deletes the original file.
if song B tries again then the indexing will succeed (with no knowledge of the differing data in Song A until song A is attempted to index again)

The suggested approach is :

  • maestro is not the best place to govern data consistency in songs and it also can't force integrity on scores.
  • have a primary correct source (song A) for truth if changes are needed on an analysis files it has to happen there first. the others are mirrors that should reflect it.
  • have a reference field in each mirror that refer to the primary to be used to validate files and reference check if it has latest version.
  • that primary song has the priority to update the index, mirrors should only update the repository fields.
  • mirrors listen to events from their primary songs and update their copied versions accordingly & automatically.
    @rosibaj feel free to correct me or add things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants