Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Add atomic modifyRepairRun method to storage #96

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Bj0rnen
Copy link
Contributor

@Bj0rnen Bj0rnen commented Apr 20, 2015

Also, marking updateRepairRun as deprecated. The next step is to
replace all uses of that method with the new one, and then remove
updateRepairRun from IStorage.

I think that the postgress storage version can probably be implemented in a better way, using transactions rather than locks. But the current approach should be correct.

@varjoranta
Copy link
Contributor

As you said, we could also utilise Postgres functions and LANGUAGE sql or plpgsql. In general, if using databases that will live longer, and be extended during the lifetime, it makes sense to use database functions for everything. Using database side functions creates an abstraction layer that is usable for separating DBA and developer concerns, making it easy to optimise the database side separately from the code, change the schema, add support for sharding, etc. easier.
But for Reaper, I guess we are fine with what we have, and let's add more complexity database side only when really required.

Bj0rnen added 3 commits April 21, 2015 14:38
Also, marking updateRepairRun as deprecated. The next step is to
replace all uses of that method with the new one, and then remove
updateRepairRun from IStorage.
@Bj0rnen Bj0rnen force-pushed the Bj0rnen/ModifyRepairRun branch from 61bd4ce to 3457d92 Compare April 21, 2015 12:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants