glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

glusterd: reduce pressure to THIS

Open dmantipov opened this issue 2 years ago • 15 comments

Prefer transport-internal xlator pointer over THIS in RPC request handlers, adjust related code.

Signed-off-by: Dmitry Antipov [email protected] Updates: #1000

dmantipov avatar Jul 11 '22 14:07 dmantipov

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 36de2e11d..37918725a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2421,10 +2421,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 11 '22 14:07 gluster-ant

/run regression

dmantipov avatar Jul 11 '22 16:07 dmantipov

1 test(s) failed ./tests/basic/ec/self-heal.t

0 test(s) generated core

6 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/afr/self-heal.t ./tests/basic/ec/self-heal.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2624/

gluster-ant avatar Jul 11 '22 18:07 gluster-ant

/run regression

dmantipov avatar Jul 11 '22 19:07 dmantipov

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 36de2e11d..37918725a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2421,10 +2421,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 13 '22 18:07 gluster-ant

/run regression

dmantipov avatar Jul 13 '22 18:07 dmantipov

0 test(s) failed

1 test(s) generated core ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t

3 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t https://build.gluster.org/job/gh_centos7-regression/2630/

gluster-ant avatar Jul 13 '22 19:07 gluster-ant

/run regression

dmantipov avatar Jul 14 '22 09:07 dmantipov

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 36de2e11d..37918725a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2421,10 +2421,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 14 '22 09:07 gluster-ant

1 test(s) failed ./tests/basic/volume-snapshot-clone.t

1 test(s) generated core ./tests/basic/volume-snapshot-clone.t

5 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/basic/volume-snapshot-clone.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2634/

gluster-ant avatar Jul 14 '22 11:07 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 36de2e11d..37918725a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2421,10 +2421,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 14 '22 13:07 gluster-ant

/run regression

dmantipov avatar Jul 14 '22 13:07 dmantipov

1 test(s) failed ./tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t

1 test(s) generated core ./tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t

5 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/bitrot/bug-1373520.t ./tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t

3 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/2635/

gluster-ant avatar Jul 14 '22 16:07 gluster-ant

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 36de2e11d..37918725a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2421,10 +2421,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 15 '22 04:07 gluster-ant

/run regression

dmantipov avatar Jul 15 '22 05:07 dmantipov

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Feb 18 '23 05:02 stale[bot]

Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.

stale[bot] avatar Mar 19 '23 03:03 stale[bot]