hbase icon indicating copy to clipboard operation
hbase copied to clipboard

HBASE-27354 EOF thrown by WALEntryStream causes replication blocking

Open ddupg opened this issue 1 year ago • 3 comments

In WALEntryStream#readNextEntryAndRecordReaderPosition, it is possible that we read uncommitted data. If we read beyond the committed file length, then reopen inputStream and seek back.

In our use, we found that the position where seek back may be exactly the length of the file being written, which may cause EOF. The thrown EOF is finally caught by ReplicationSourceWALReader.run, but totalBufferUsed is not cleanup up.

After a long run, all peers will go slow and eventually block completely.

ddupg avatar Sep 01 '22 11:09 ddupg

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 1m 48s 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 3m 25s master passed
+1 :green_heart: compile 2m 50s master passed
+1 :green_heart: checkstyle 0m 34s master passed
+1 :green_heart: spotless 0m 45s branch has no errors when running spotless:check.
+1 :green_heart: spotbugs 1m 36s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 3m 1s the patch passed
+1 :green_heart: compile 2m 45s the patch passed
+1 :green_heart: javac 2m 45s the patch passed
+1 :green_heart: checkstyle 0m 31s the patch passed
+1 :green_heart: whitespace 0m 0s The patch has no whitespace issues.
+1 :green_heart: hadoopcheck 11m 50s Patch does not cause any errors with Hadoop 3.2.4 3.3.4.
+1 :green_heart: spotless 0m 52s patch has no errors when running spotless:check.
+1 :green_heart: spotbugs 2m 4s the patch passed
_ Other Tests _
+1 :green_heart: asflicense 0m 13s The patch does not generate ASF License warnings.
39m 28s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4756/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/4756
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 81bb2deb506b 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 308cd729d2
Default Java AdoptOpenJDK-1.8.0_282-b08
Max. process+thread count 64 (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-4756/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Sep 01 '22 12:09 Apache-HBase

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 0m 24s 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 2m 50s master passed
+1 :green_heart: compile 0m 48s master passed
+1 :green_heart: shadedjars 3m 48s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 29s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 2m 34s the patch passed
+1 :green_heart: compile 0m 46s the patch passed
+1 :green_heart: javac 0m 46s the patch passed
+1 :green_heart: shadedjars 3m 45s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 26s the patch passed
_ Other Tests _
+1 :green_heart: unit 198m 49s hbase-server in the patch passed.
216m 26s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4756/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/4756
Optional Tests javac javadoc unit shadedjars compile
uname Linux ecf1ce559af5 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 308cd729d2
Default Java AdoptOpenJDK-11.0.10+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4756/1/testReport/
Max. process+thread count 2622 (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-4756/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Sep 01 '22 15:09 Apache-HBase

:confetti_ball: +1 overall

Vote Subsystem Runtime Comment
+0 :ok: reexec 1m 46s Docker mode activated.
-0 :warning: yetus 0m 4s 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 29s master passed
+1 :green_heart: compile 0m 48s master passed
+1 :green_heart: shadedjars 4m 32s branch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 34s master passed
_ Patch Compile Tests _
+1 :green_heart: mvninstall 3m 10s 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 4m 25s patch has no errors when building our shaded downstream artifacts.
+1 :green_heart: javadoc 0m 24s the patch passed
_ Other Tests _
+1 :green_heart: unit 214m 42s hbase-server in the patch passed.
236m 48s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4756/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/4756
Optional Tests javac javadoc unit shadedjars compile
uname Linux 5b90b302641b 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 308cd729d2
Default Java AdoptOpenJDK-1.8.0_282-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4756/1/testReport/
Max. process+thread count 2330 (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-4756/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Sep 01 '22 15:09 Apache-HBase

After a long run, all peers will go slow and eventually block completely.

@ddupg curious if you have any workaround for this on live cluster? do you restart regionservers?

virajjasani avatar Sep 29 '22 04:09 virajjasani

Any updates here @ddupg ? If not, I think we could open a new issue to land the improvement here first, no harm.

Thanks.

Apache9 avatar Oct 08 '22 11:10 Apache9

@ddupg curious if you have any workaround for this on live cluster? do you restart regionservers?

@virajjasani Previously we had to restart regionservers, after this patch, the problem still exist, but the frequency has slowed to an acceptable level.

ddupg avatar Nov 09 '22 06:11 ddupg