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

siva: add checkpoint as its own type. #6

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

mcarmonaa
Copy link
Collaborator

Signed-off-by: Manuel Carmona manu.carmona90@gmail.com

Signed-off-by: Manuel Carmona <manu.carmona90@gmail.com>
// Apply applies if necessary the operations on the siva file to
// leave it in the last correct state the checkpoint keeps.
func (c *Checkpoint) Apply() error {
if c.offset > 0 {
Copy link
Owner

@jfontan jfontan Feb 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would set offset to a negative number in the previous function when there is no checkpoint file as there's a case not done here. When we start a transaction with a siva file that does not exist, the checkpoint will contain 0. This means that if we find a checkpoint with offset 0 the file must be deleted.

@jfontan jfontan merged commit 3ed277b into jfontan:siva Feb 15, 2019
@mcarmonaa mcarmonaa deleted the siva-factorize-checkpoint branch February 15, 2019 17:17
jfontan pushed a commit that referenced this pull request Mar 22, 2019
Basic support for siva files
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