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

Find a deeper fix for postgres concurrency issues, re. multiple commands updating a map's/user's edit-count #332

Open
Venryx opened this issue Jul 17, 2024 · 1 comment

Comments

@Venryx
Copy link
Collaborator

Venryx commented Jul 17, 2024

Debate-map should be more resilient to concurrent update commands. (which sometimes cause claimminer map generations to fail)

So for example:

  • We could reduce the isolation level for the transactions, eg. from Serializable to Repeatable Read. (perhaps selectively, when just updating the user's edit-count?)
  • Or we could change the way that "edit count" is stored, to reduce the chance/possibility of contention. (eg. postgres might have a native way to increment a number in a way that never has concurrency errors)
  • Or (for this specific case) a fix would also be to not update that "edit count" value when claim-miner is doing it for a map generation.
@Venryx
Copy link
Collaborator Author

Venryx commented Jul 17, 2024

I've pushed the following change:

  • MS the commands that increment edit-counts (of user and/or map) have a new field in their "input" structure called "incrementEdits", which allows for that edit-incrementing to be disabled.

Once claim-miner is updated to use the fields above (disabling edit-count incrementing during its import-related commands), this immediate problem should be fixed. (may still want to resolve it in a deeper way down the road)

@Venryx Venryx changed the title Fix that claimminer map generations sometimes fail, due to concurrency error Find a deeper fix for postgres concurrency issues, re. multiple commands updating a map's/user's edit-count Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏚️ Mid-term
Development

No branches or pull requests

1 participant