Skip to content

Batch migration delay - #1288

Merged
mxsrc merged 9 commits into
mainfrom
batch-migration-delay
Sep 4, 2026
Merged

Batch migration delay#1288
mxsrc merged 9 commits into
mainfrom
batch-migration-delay

Conversation

@EbiRider

@EbiRider EbiRider commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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

@EbiRider
EbiRider force-pushed the batch-migration-delay branch from e33e221 to 4c4ff55 Compare September 1, 2026 19:23

@mxsrc mxsrc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is simply return self._attach_locks.setdefault(key, threading.Lock()).

f"src={key[0][:8]} tgt={key[1][:8]}"
)
return entry
except Exception:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not catch blanket exceptions. RPCException is what should be caught here.

@mxsrc
mxsrc merged commit 5957aca into main Sep 4, 2026
15 checks passed
@mxsrc
mxsrc deleted the batch-migration-delay branch September 4, 2026 12:44
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