Batch migration delay - #1288
Merged
Merged
Conversation
EbiRider
force-pushed
the
batch-migration-delay
branch
from
September 1, 2026 19:23
e33e221 to
4c4ff55
Compare
mxsrc
reviewed
Sep 3, 2026
mxsrc
left a comment
Collaborator
There was a problem hiding this comment.
Some minor things should be addressed. Also I'm wondering why we use the return-error-style in the hub manager, that's something we want to avoid for new code.
| final_step_rpc = src_node.rpc_client(timeout=15, retry=2) | ||
| ret = final_step_rpc.bdev_lvol_batch_transfer_final_step( | ||
| lvol_names, lvol_ids, snapshot_names, 16, hub_bdev, "migrate") | ||
| lvol_names, lvol_ids, snapshot_names, 256, hub_bdev, "migrate") |
Collaborator
There was a problem hiding this comment.
Why are these values (along with the other task runner) changed? They seem to be matching, is that out of necessity? What's the reasoning for 16, 256, or any value for that matter? I think it's best to extract a constant that can be commented with the justification.
Comment on lines
+219
to
+223
| lock = self._attach_locks.get(key) | ||
| if lock is None: | ||
| lock = threading.Lock() | ||
| self._attach_locks[key] = lock | ||
| return lock |
Collaborator
There was a problem hiding this comment.
This is simply return self._attach_locks.setdefault(key, threading.Lock()).
| f"src={key[0][:8]} tgt={key[1][:8]}" | ||
| ) | ||
| return entry | ||
| except Exception: |
Collaborator
There was a problem hiding this comment.
Do not catch blanket exceptions. RPCException is what should be caught here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the original intention of this PR was creating optimizations towards reducing the delay for batch lvol migration
however the tests proved that they didn't bring down the time and at some cases were just an overhead so it was reverted
a fix for hublvol manager is the only thing worth having from this PR