You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2024/12/06 23:50:19 UTC
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22182
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
KUDU-613: Don't modify refs when moving entries
The current implementation of the SLRU cache temporarily
changes the reference count of entries when moving between
segments of the cache (either during an upgrade or downgrade).
A temporary decrement of the handle's ref count can cause a
concurrent Release call to the entry to think it's the last
reference to the entry and free it when it shouldn't be.
This patch changes this behavior by not modifying the ref
count of entries when moving between segments. A reproduction
scenario to trigger the concurrency error is added to cache-bench.
The existing behavior is to update the mem tracker when moving
entries between segments but that's not necessary. This patch
changes that behavior by not updating the mem tracker for
entries moving between segments.
Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Reviewed-on: http://gerrit.cloudera.org:8080/22132
Reviewed-by: Alexey Serbin <al...@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit 5b6aa7f6baac3eb4c14d9d349f81da5f5b8714c1)
---
M src/kudu/util/cache-bench.cc
M src/kudu/util/slru_cache.cc
M src/kudu/util/slru_cache.h
3 files changed, 111 insertions(+), 86 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/82/22182/1
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/783/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Sat, 07 Dec 2024 10:59:33 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1: Code-Review+1
Thanks for cherry-picking this change
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Sat, 07 Dec 2024 00:07:30 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Dec 2024 17:46:44 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1: Verified+1
unrelated test failures (known flaky tests) in DEBUG and RELEASE builds.
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Dec 2024 18:39:08 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/783/
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Fri, 06 Dec 2024 23:50:28 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
KUDU-613: Don't modify refs when moving entries
The current implementation of the SLRU cache temporarily
changes the reference count of entries when moving between
segments of the cache (either during an upgrade or downgrade).
A temporary decrement of the handle's ref count can cause a
concurrent Release call to the entry to think it's the last
reference to the entry and free it when it shouldn't be.
This patch changes this behavior by not modifying the ref
count of entries when moving between segments. A reproduction
scenario to trigger the concurrency error is added to cache-bench.
The existing behavior is to update the mem tracker when moving
entries between segments but that's not necessary. This patch
changes that behavior by not updating the mem tracker for
entries moving between segments.
Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Reviewed-on: http://gerrit.cloudera.org:8080/22132
Reviewed-by: Alexey Serbin <al...@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit 5b6aa7f6baac3eb4c14d9d349f81da5f5b8714c1)
Reviewed-on: http://gerrit.cloudera.org:8080/22182
Reviewed-by: Mahesh Reddy <mr...@cloudera.com>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
Tested-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/util/cache-bench.cc
M src/kudu/util/slru_cache.cc
M src/kudu/util/slru_cache.h
3 files changed, 111 insertions(+), 86 deletions(-)
Approvals:
Mahesh Reddy: Looks good to me, but someone else must approve
Abhishek Chennaka: Looks good to me, approved
Alexey Serbin: Verified
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: merged
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
[kudu-CR](branch-1.18.x) KUDU-613: Don't modify refs when moving entries
Posted by "Mahesh Reddy (Code Review)" <ge...@cloudera.org>.
Mahesh Reddy has posted comments on this change. ( http://gerrit.cloudera.org:8080/22182 )
Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................
Patch Set 1:
> Patch Set 1: Verified-1
>
> Build Failed
>
> http://jenkins.kudu.apache.org/job/pre_commit/783/ : FAILURE
unrelated C++ test failures in RELEASE and DEBUG:
- auto_rebalancer-test.0 in RELEASE
- security-itest.0 in DEBUG (known flaky)
- ts_tablet_manager-itest.0 in DEBUG
--
To view, visit http://gerrit.cloudera.org:8080/22182
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22182
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Comment-Date: Mon, 09 Dec 2024 18:37:02 +0000
Gerrit-HasComments: No