Repository navigation
rbd: open image once in setAllMetadata/unsetAllMetadata - #6509
Conversation
1310233 to
8245a71
Compare
nixpanic
left a comment
There was a problem hiding this comment.
thanks, looks like a simple and beneficial performance improvement
|
/queue |
|
@Mergifyio rebase |
🛑 The pull request rule doesn't match anymoreDetailsThis action has been cancelled. |
setAllMetadata called rbdImage.SetMetadata once per key, and each call opened and closed the RBD image on its own. On the CreateVolume path this meant the image was opened at least three times (the parameters map plus the clusterName and mounter keys), which is wasteful. Open the image once at the start of setAllMetadata and issue all SetMetadata calls against that single handle, closing it via defer. Apply the same change to the symmetric unsetAllMetadata, which had the identical open-per-key pattern. Behaviour is unchanged: the same keys are set/unset, the same error messages are returned, and unsetAllMetadata still tolerates ErrNotExist. Signed-off-by: Yite Gu <[email protected]>
8245a71 to
c0006b1
Compare
|
/test ci/centos/k8s-e2e-external-storage/1.34 |
|
/test ci/centos/k8s-e2e-external-storage/1.36 |
|
/test ci/centos/mini-e2e-helm/k8s-1.34 |
|
/test ci/centos/mini-e2e-helm/k8s-1.36 |
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/mini-e2e/k8s-1.36 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/mini-e2e-helm/k8s-1.35 |
|
/test ci/centos/mini-e2e/k8s-1.35 |
|
/retest ci/centos/mini-e2e/k8s-1.35 |
|
/test ci/centos/mini-e2e-helm/k8s-1.35 |
|
/test ci/centos/mini-e2e-helm/k8s-1.34 |
Failed with NFS: |
CephFS deployment issue: |
|
Deprecation notice: This pull request comes from a fork and was queued with |
Merge Queue Status
This pull request spent 8 seconds in the queue, including 1 second running CI. Required conditions to merge
|
setAllMetadata called rbdImage.SetMetadata once per key, and each call opened and closed the RBD image on its own. On the CreateVolume path this meant the image was opened at least three times (the parameters map plus the clusterName and mounter keys), which is wasteful.
Open the image once at the start of setAllMetadata and issue all SetMetadata calls against that single handle, closing it via defer.
Apply the same change to the symmetric unsetAllMetadata, which had the identical open-per-key pattern.
Behaviour is unchanged: the same keys are set/unset, the same error messages are returned, and unsetAllMetadata still tolerates ErrNotExist.
Describe what this PR does
Provide some context for the reviewer
Is there anything that requires special attention
Do you have any questions?
Is the change backward compatible?
Are there concerns around backward compatibility?
Provide any external context for the change, if any.
For example:
Related issues
Mention any github issues relevant to this PR. Adding below line
will help to auto close the issue once the PR is merged.
Fixes: #issue_number
Future concerns
List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.
Checklist:
guidelines in the developer
guide.
Request
notes
updated with breaking and/or notable changes for the next major release.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>: retest the<job-name>after unrelatedfailure (please report the failure too!)