hbase icon indicating copy to clipboard operation
hbase copied to clipboard

HBASE-28620 fix replication quota leak when peer changes

Open wangxin97-02 opened this issue 1 year ago • 8 comments

When peer changes, replication closes the reader and shipper created earlier. However, after the specified timeout, the shipper still does not automatically close (It was interrupted, but it didn't close properly). The existing code simply returns without releasing quota. Not cleaning buffer usage. In one practice of my company, in this case, the quota was full because it was not released in time, so wal reader could not continue read new data and replication had a backlog.

wangxin97-02 avatar May 27 '24 14:05 wangxin97-02

long timeout = EnvironmentEdgeManager.currentTime() + this.shipEditsTimeout; this.shipEditsTimeout = this.conf.getInt(HConstants.REPLICATION_SOURCE_SHIPEDITS_TIMEOUT, HConstants.REPLICATION_SOURCE_SHIPEDITS_TIMEOUT_DFAULT);`

This timeout is configurable. In this case, is there any other better way to solve the problem? @Apache9

wangxin97-02 avatar May 27 '24 14:05 wangxin97-02

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 37s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+1 :green_heart: hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 :green_heart: mvninstall 2m 53s master passed
+1 :green_heart: compile 2m 40s master passed
+1 :green_heart: checkstyle 0m 38s master passed
+1 :green_heart: spotless 0m 44s branch has no errors when running spotless:check.
+1 :green_heart: spotbugs 1m 33s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 41s the patch passed
+1 :green_heart: compile 2m 37s the patch passed
+1 :green_heart: javac 2m 37s the patch passed
+1 :green_heart: checkstyle 0m 35s the patch passed
+1 :green_heart: whitespace 0m 0s The patch has no whitespace issues.
+1 :green_heart: hadoopcheck 4m 52s Patch does not cause any errors with Hadoop 3.3.6.
+1 :green_heart: spotless 0m 43s patch has no errors when running spotless:check.
+1 :green_heart: spotbugs 1m 38s the patch passed
_ Other Tests _
+1 :green_heart: asflicense 0m 11s The patch does not generate ASF License warnings.
28m 31s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 7e773afa6a00 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2130e5410f
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 79 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar May 27 '24 14:05 Apache-HBase

:broken_heart: -1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 28s Docker mode activated.
-0 :warning: yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 :green_heart: mvninstall 2m 49s master passed
+1 :green_heart: compile 0m 39s master passed
+1 :green_heart: shadedjars 5m 41s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 24s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 23s the patch passed
+1 :green_heart: compile 0m 40s the patch passed
+1 :green_heart: javac 0m 40s the patch passed
+1 :green_heart: shadedjars 5m 38s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 23s the patch passed
_ Other Tests _
-1 :x: unit 11m 11s hbase-server in the patch failed.
31m 46s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests javac javadoc unit shadedjars compile
uname Linux 0f5f6fbaca5e 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2130e5410f
Default Java Temurin-1.8.0_352-b08
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/testReport/
Max. process+thread count 1688 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar May 27 '24 14:05 Apache-HBase

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 26s Docker mode activated.
-0 :warning: yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 :green_heart: mvninstall 3m 7s master passed
+1 :green_heart: compile 0m 52s master passed
+1 :green_heart: shadedjars 5m 31s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 27s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 42s the patch passed
+1 :green_heart: compile 0m 50s the patch passed
+1 :green_heart: javac 0m 50s the patch passed
+1 :green_heart: shadedjars 5m 29s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 25s the patch passed
_ Other Tests _
+1 :green_heart: unit 209m 29s hbase-server in the patch passed.
233m 4s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests javac javadoc unit shadedjars compile
uname Linux e4b6103fb5d3 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2130e5410f
Default Java Eclipse Adoptium-17.0.10+7
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/testReport/
Max. process+thread count 4502 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar May 27 '24 18:05 Apache-HBase

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 36s Docker mode activated.
-0 :warning: yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 :green_heart: mvninstall 3m 3s master passed
+1 :green_heart: compile 0m 51s master passed
+1 :green_heart: shadedjars 5m 14s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 28s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 47s the patch passed
+1 :green_heart: compile 0m 49s the patch passed
+1 :green_heart: javac 0m 49s the patch passed
+1 :green_heart: shadedjars 5m 12s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 27s the patch passed
_ Other Tests _
+1 :green_heart: unit 232m 41s hbase-server in the patch passed.
256m 37s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests javac javadoc unit shadedjars compile
uname Linux 79ac1395b56f 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 2130e5410f
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/testReport/
Max. process+thread count 4584 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar May 27 '24 18:05 Apache-HBase

I think the solution is to increase the timeout so we do not timeout here, once timeout, just break and call the cleanup of replication quota may introduce data race and still cause incorrect quota usage, if the comment is correct...

Apache9 avatar Jun 05 '24 14:06 Apache9

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 42s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: hbaseanti 0m 0s Patch does not have any anti-patterns.
_ master Compile Tests _
+1 :green_heart: mvninstall 3m 0s master passed
+1 :green_heart: compile 2m 54s master passed
+1 :green_heart: checkstyle 0m 38s master passed
+1 :green_heart: spotbugs 1m 35s master passed
+1 :green_heart: spotless 0m 44s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 53s the patch passed
+1 :green_heart: compile 2m 54s the patch passed
+1 :green_heart: javac 2m 54s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
+1 :green_heart: checkstyle 0m 37s the patch passed
+1 :green_heart: spotbugs 1m 39s the patch passed
+1 :green_heart: hadoopcheck 11m 41s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 :green_heart: spotless 1m 0s patch has no errors when running spotless:check.
_ Other Tests _
+1 :green_heart: asflicense 0m 13s The patch does not generate ASF License warnings.
38m 8s
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 9fe0e95f9625 5.4.0-186-generic #206-Ubuntu SMP Fri Apr 26 12:31:10 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7b77ac6b3d0b950165300baeb41f9779fdefeb88
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 83 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/2/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Jul 24 '24 06:07 Apache-HBase

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 39s Docker mode activated.
-0 :warning: yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 :green_heart: mvninstall 3m 2s master passed
+1 :green_heart: compile 0m 58s master passed
+1 :green_heart: javadoc 0m 30s master passed
+1 :green_heart: shadedjars 5m 20s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 57s the patch passed
+1 :green_heart: compile 0m 58s the patch passed
+1 :green_heart: javac 0m 58s the patch passed
+1 :green_heart: javadoc 0m 32s the patch passed
+1 :green_heart: shadedjars 5m 22s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 :x: unit 252m 43s /patch-unit-hbase-server.txt hbase-server in the patch failed.
277m 54s
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/5949
Optional Tests javac javadoc unit compile shadedjars
uname Linux 33cde6dcea0a 5.4.0-186-generic #206-Ubuntu SMP Fri Apr 26 12:31:10 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7b77ac6b3d0b950165300baeb41f9779fdefeb88
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/2/testReport/
Max. process+thread count 4718 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5949/2/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Jul 24 '24 10:07 Apache-HBase