-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Send stream should only list included snaps #8533
Conversation
@ahrens I would really appreciate it if you could review this. My methodology involved a little more whack-a-mole-ing issues that came up when I ran the test suite than I would have liked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach makes sense to me and is in line with what you described previosly
d4ba7de
to
f7ca926
Compare
@alek-p your comments have been addressed. |
Currently, zfs send streams will include a list of all snapshots on the source side if the '-p' option is provided. This can cause performance problems on the receive side, especially if those snapshots aren't present on the destination. These problems arise because guid_to_name(), which is used for several receive side functions, will serach the entire receive-side pool if it can't find a snapshot with a matching guid. This patch corrects the issue by ensuring only streams that require this list of snapshots include them. Signed-off-by: Tom Caputi <tcaputi@datto.com>
f7ca926
to
1fc1578
Compare
Codecov Report
@@ Coverage Diff @@
## master #8533 +/- ##
==========================================
- Coverage 78.72% 78.71% -0.01%
==========================================
Files 380 380
Lines 116440 116464 +24
==========================================
+ Hits 91665 91679 +14
- Misses 24775 24785 +10
Continue to review full report at Codecov.
|
Can't honestly say that I have a great grasp on the overall context of this code, but the change seems OK to me. If this approach seems too brittle, maybe an alternative would be to increase the performance of the receive where we don't have a matching snapshot. For example, by caching the list (or hashtable or avl tree) of snapshot GUIDs that exist on the target, so that we only have to discover them once? |
@ahrens The context of this patch comes from @kpande. He was doing a test for me with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently, zfs send streams will include a list of all snapshots
on the source side if the '-p' option is provided. This can cause
performance problems on the receive side, especially if those
snapshots aren't present on the destination. These problems arise
because guid_to_name(), which is used for several receive side
functions, will search the entire receive-side pool if it can't
find a snapshot with a matching guid. This patch corrects the
issue by ensuring only streams that require this list of snapshots
include them.
Signed-off-by: Tom Caputi tcaputi@datto.com
Types of changes
Checklist:
Signed-off-by
.