Skip to content

Fix blob size in writeBlob() method#13574

Merged
tlrx merged 1 commit intoelastic:masterfrom
tlrx:fix-blob-size-in-write-blob-snapshot-api
Sep 30, 2015
Merged

Fix blob size in writeBlob() method#13574
tlrx merged 1 commit intoelastic:masterfrom
tlrx:fix-blob-size-in-write-blob-snapshot-api

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Sep 15, 2015

It seems that #13434 computes a wrong blob size when writing snapshot files.

@imotov Can you please have a look?

@tlrx tlrx added review :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v2.1.0 v5.0.0-alpha1 labels Sep 15, 2015
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The first condition seems to be redundant, but it might be ok to leave it in for clarity.

@imotov
Copy link
Copy Markdown
Contributor

imotov commented Sep 16, 2015

Great catch! I wonder if it might make more sense to move this logic into fileInfo. So long partBytes(); would become long partBytes(int part); similar to howpartName` returns the name for each part. What do you think?

@tlrx
Copy link
Copy Markdown
Member Author

tlrx commented Sep 18, 2015

@imotov thanks for your review! I agree with your last comment and updated the code. Can you please have another look?

I tested it for #13578.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe length() % partBytes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure

@imotov
Copy link
Copy Markdown
Contributor

imotov commented Sep 22, 2015

Left one minor comment. LGTM.

@tlrx tlrx force-pushed the fix-blob-size-in-write-blob-snapshot-api branch from 4c4bfb6 to d715dfd Compare September 30, 2015 10:33
@tlrx tlrx merged commit d715dfd into elastic:master Sep 30, 2015
@tlrx tlrx added v2.2.0 and removed review labels Sep 30, 2015
@tlrx tlrx deleted the fix-blob-size-in-write-blob-snapshot-api branch September 30, 2015 10:42
s1monw added a commit that referenced this pull request Sep 30, 2015
s1monw added a commit that referenced this pull request Sep 30, 2015
s1monw added a commit that referenced this pull request Sep 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v2.1.0 v2.2.0 v5.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants