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

add transactions to repositories #4

Merged
merged 3 commits into from
Feb 15, 2019
Merged

add transactions to repositories #4

merged 3 commits into from
Feb 15, 2019

Conversation

jfontan
Copy link
Owner

@jfontan jfontan commented Feb 14, 2019

Now library has a flag to set it transactional and is used with all
locations and repositories below it. Transaction is managed from the
location with Commit and Rollback methods. While a transaction is being
made no other transaction can start.

When a transaction starts a new siva filesystem is created for it and
the previous cachedFS kept. This way previously created repositories
from that location should work the same as before. It should also be
able to create new repositories.

NOTE: Needs mutexes and a way to check which repository is doing the transaction.

Now library has a flag to set it transactional and is used with all
locations and repositories below it. Transaction is managed from the
location with Commit and Rollback methods. While a transaction is being
made no other transaction can start.

When a transaction starts a new siva filesystem is created for it and
the previous cachedFS kept. This way previously created repositories
from that location should work the same as before. It should also be
able to create new repositories.

Signed-off-by: Javi Fontan <jfontan@gmail.com>
@codecov-io
Copy link

codecov-io commented Feb 14, 2019

Codecov Report

Merging #4 into siva will increase coverage by 1.13%.
The diff coverage is 65.82%.

Impacted file tree graph

@@            Coverage Diff            @@
##            siva       #4      +/-   ##
=========================================
+ Coverage   55.6%   56.74%   +1.13%     
=========================================
  Files         10       10              
  Lines        642      712      +70     
=========================================
+ Hits         357      404      +47     
- Misses       227      239      +12     
- Partials      58       69      +11
Impacted Files Coverage Δ
siva/library.go 63.51% <100%> (+0.49%) ⬆️
siva/repository.go 73.33% <50%> (+6.66%) ⬆️
siva/location.go 53.23% <65.67%> (+4.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7d824a...d5cb709. Read the comment docs.

Signed-off-by: Javi Fontan <jfontan@gmail.com>
Signed-off-by: Javi Fontan <jfontan@gmail.com>
@jfontan jfontan changed the title WIP: add transactions to repositories add transactions to repositories Feb 15, 2019
@jfontan jfontan merged commit ed49009 into siva Feb 15, 2019
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

Successfully merging this pull request may close these issues.

2 participants