Skip to content

HBASE-23205 Correctly update the position of WALs currently being replicated - #749

Closed
JeongDaeKim wants to merge 52 commits into
apache:branch-1from
JeongDaeKim:HBASE-23205
Closed

HBASE-23205 Correctly update the position of WALs currently being replicated#749
JeongDaeKim wants to merge 52 commits into
apache:branch-1from
JeongDaeKim:HBASE-23205

Conversation

@JeongDaeKim

@JeongDaeKimJeongDaeKim commented Oct 23, 2019

Copy link
Copy Markdown

https://issues.apache.org/jira/browse/HBASE-23205

I fixed a failed test which is not related with this PR. TestReplicationSmallTests.testEmptyWALRecovery,
and a minor bug which is updating replication buffer size wrongly by decreasing total buffer size with the size of bulk loaded files.

I removed the changes above and made a separate jira : https://issues.apache.org/jira/browse/HBASE-23254

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
💙reexec0m 49sDocker mode activated.
_ Prechecks _
💚dupname0m 0sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall9m 27sbranch-1 passed
💚compile0m 50sbranch-1 passed with JDK v1.8.0_232
💚compile0m 52sbranch-1 passed with JDK v1.7.0_242
💚checkstyle1m 51sbranch-1 passed
💚shadedjars3m 26sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 42sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 51sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 15sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 11sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 19sthe patch passed
💚compile0m 48sthe patch passed with JDK v1.8.0_232
💚javac0m 48sthe patch passed
💚compile0m 49sthe patch passed with JDK v1.7.0_242
💚javac0m 49sthe patch passed
💔checkstyle1m 46shbase-server: The patch generated 30 new + 44 unchanged - 10 fixed = 74 total (was 54)
💚whitespace0m 1sThe patch has no whitespace issues.
💚shadedjars3m 10spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 30sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 40sthe patch passed with JDK v1.8.0_232
💚javadoc0m 46sthe patch passed with JDK v1.7.0_242
💚findbugs3m 30sthe patch passed
_ Other Tests _
💔unit30m 44shbase-server in the patch failed.
💚asflicense0m 20sThe patch does not generate ASF License warnings.
76m 33s
ReasonTests
Failed junit testshadoop.hbase.master.TestCatalogJanitor
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/1/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux aa16fec098c2 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / ce65db3
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/1/artifact/out/diff-checkstyle-hbase-server.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/1/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/1/testReport/
Max. process+thread count740 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/1/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@JeongDaeKim

JeongDaeKim commented Oct 24, 2019

Copy link
Copy Markdown
Author

Failed tests are not related to this PR. Tests has broken since #731, and Those will be fixed at #748.

image

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
💙reexec0m 41sDocker mode activated.
_ Prechecks _
💚dupname0m 0sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 25sbranch-1 passed
💚compile0m 45sbranch-1 passed with JDK v1.8.0_232
💚compile0m 46sbranch-1 passed with JDK v1.7.0_242
💚checkstyle1m 48sbranch-1 passed
💚shadedjars3m 10sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 44sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 43sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 9sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 4sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 5sthe patch passed
💚compile0m 41sthe patch passed with JDK v1.8.0_232
💚javac0m 41sthe patch passed
💚compile0m 47sthe patch passed with JDK v1.7.0_242
💚javac0m 47sthe patch passed
💚checkstyle1m 44shbase-server: The patch generated 0 new + 41 unchanged - 13 fixed = 41 total (was 54)
💚whitespace0m 0sThe patch has no whitespace issues.
💚shadedjars3m 4spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 8sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 30sthe patch passed with JDK v1.8.0_232
💚javadoc0m 42sthe patch passed with JDK v1.7.0_242
💚findbugs3m 5sthe patch passed
_ Other Tests _
💔unit139m 44shbase-server in the patch failed.
💚asflicense0m 29sThe patch does not generate ASF License warnings.
181m 50s
ReasonTests
Failed junit testshadoop.hbase.replication.TestReplicationKillMasterRS
hadoop.hbase.replication.multiwal.TestReplicationSyncUpToolWithMultipleWAL
hadoop.hbase.replication.regionserver.TestGlobalReplicationThrottler
hadoop.hbase.replication.TestReplicationSyncUpTool
hadoop.hbase.replication.TestReplicationMetricsforUI
hadoop.hbase.replication.TestPerTableCFReplication
hadoop.hbase.replication.TestReplicationConfigTracker
hadoop.hbase.replication.TestVerifyCellsReplicationEndpoint
hadoop.hbase.replication.TestReplicationSyncUpToolWithBulkLoadedData
hadoop.hbase.security.visibility.TestVisibilityLabelReplicationWithExpAsString
hadoop.hbase.replication.multiwal.TestReplicationKillMasterRSCompressedWithMultipleWAL
hadoop.hbase.regionserver.TestRegionReplicaFailover
hadoop.hbase.replication.TestReplicationDisableInactivePeer
hadoop.hbase.replication.TestReplicationStatus
hadoop.hbase.replication.TestReplicationSmallTests
hadoop.hbase.replication.TestReplicationKillSlaveRS
hadoop.hbase.security.visibility.TestVisibilityLabelsReplication
hadoop.hbase.replication.multiwal.TestReplicationEndpointWithMultipleWAL
hadoop.hbase.regionserver.TestBulkLoadReplication
hadoop.hbase.replication.TestReplicationWithTags
hadoop.hbase.replication.TestReplicationEndpoint
hadoop.hbase.replication.TestMultiSlaveReplication
hadoop.hbase.replication.TestReplicationKillMasterRSCompressed
hadoop.hbase.client.replication.TestReplicationAdminWithClusters
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/2/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux aa4ca70f49f8 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / f0999a1
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/2/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/2/testReport/
Max. process+thread count3803 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/2/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@JeongDaeKim

Copy link
Copy Markdown
Author

I made a typo when i fixed checkstyle warnings 😭 (a8244d2#diff-7d551f2261f4c83aec8a97b7d04427e2R137)

Let me fix it.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
💙reexec0m 35sDocker mode activated.
_ Prechecks _
💚dupname0m 1sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 29sbranch-1 passed
💚compile0m 44sbranch-1 passed with JDK v1.8.0_232
💚compile0m 49sbranch-1 passed with JDK v1.7.0_242
💚checkstyle2m 2sbranch-1 passed
💚shadedjars3m 50sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 44sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 48sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 56sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 53sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 35sthe patch passed
💚compile1m 3sthe patch passed with JDK v1.8.0_232
💚javac1m 3sthe patch passed
💚compile1m 2sthe patch passed with JDK v1.7.0_242
💚javac1m 2sthe patch passed
💚checkstyle2m 3shbase-server: The patch generated 0 new + 41 unchanged - 13 fixed = 41 total (was 54)
💚whitespace0m 1sThe patch has no whitespace issues.
💚shadedjars3m 32spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck6m 2sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 39sthe patch passed with JDK v1.8.0_232
💚javadoc0m 57sthe patch passed with JDK v1.7.0_242
💚findbugs3m 56sthe patch passed
_ Other Tests _
💔unit134m 14shbase-server in the patch failed.
💚asflicense0m 27sThe patch does not generate ASF License warnings.
182m 37s
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/3/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 4e1244156651 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / 41f6713
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/3/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/3/testReport/
Max. process+thread count3832 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/3/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@JeongDaeKim

Copy link
Copy Markdown
Author

added a minor fix in test code and rebased.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
💙reexec10m 24sDocker mode activated.
_ Prechecks _
💚dupname0m 0sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 35sbranch-1 passed
💚compile0m 47sbranch-1 passed with JDK v1.8.0_232
💚compile0m 50sbranch-1 passed with JDK v1.7.0_242
💚checkstyle2m 2sbranch-1 passed
💚shadedjars3m 35sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 45sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 48sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 36sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 32sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 25sthe patch passed
💚compile0m 47sthe patch passed with JDK v1.8.0_232
💚javac0m 47sthe patch passed
💚compile0m 51sthe patch passed with JDK v1.7.0_242
💚javac0m 51sthe patch passed
💚checkstyle1m 52shbase-server: The patch generated 0 new + 41 unchanged - 13 fixed = 41 total (was 54)
💚whitespace0m 0sThe patch has no whitespace issues.
💚shadedjars3m 34spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 52sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 38sthe patch passed with JDK v1.8.0_232
💚javadoc0m 48sthe patch passed with JDK v1.7.0_242
💚findbugs3m 45sthe patch passed
_ Other Tests _
💚unit120m 32shbase-server in the patch passed.
💚asflicense0m 27sThe patch does not generate ASF License warnings.
176m 55s
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/4/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 840d003e793d 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / 5e414f2
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/4/testReport/
Max. process+thread count3894 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/4/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@wchevreuilwchevreuil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the analysis. Had done a first round of reading through, but the PR seems a bit large to grasp it all in one go, hence some of the question in my comments.

It would be nice to keep changes to a minimal, adding only modifications really needed to fix the problem. For example, there are few variable/method renaming, moving to different class, just for personal/cosmetic preferences, together with additional unrelated fixes, such as the mentioned metric one (if that's not needed here, please open a separate jira to it).

break;
}
}
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the log position getting updated now if the current edit is not targeted to replication?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried not to update log position every single filtered entry. because I found a lot of updates (setData) happened in zookeeper tx logs, even though all entries were filtered.

log position will be updated in these case.

  1. limits(quota, size, count) reached, or a batch has entries when eof reached.
  2. wal rolled
  3. when reader read all wals in recovery queue.

I think updating log position is required for 1) cleanup old logs, 2) replication queue recovery.
for 1) it would be enough to update log position only when log rolled.
for 2) the log position should be updated to the position of the last replicated entry.

in any case, we don't need to update log position aggressively for filtered entries. entries would be filtered again for recovery case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if a filtered edit came, any sub-sequent non-filterable one would need to wait for a log roll? That could take too long for some use cases.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any sub-sequent non-filterable one would need to wait for a log roll? That could take too long for some use cases.

If some use cases means "no mutations come for a long time, but a batch has entries", this case is the one of the 1) case i mentioned a batch has entries when eof reached. reader would reach the eof, and log position would be updated.

In addition, even while testing this issue with heavy writes, I observed the reader frequently reached EOF.

@wchevreuilwchevreuilNov 19, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some use cases means "no mutations come for a long time, but a batch has entries"

What if the whole WAL section read got no entries for replication? In this case, batch would be empty, so ReplicationSourceManager.logPositionAndCleanOldLogs does not ever get called (at least, I guess, until the log is rolled).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the answer to my question above is in the resetStream() that gets called at the end of the second while loop, which will update lastReadPosition variable that is now used for reading here.

@JeongDaeKimJeongDaeKimNov 20, 2019

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the whole WAL section read got no entries for replication? In this case, batch would be empty, so ReplicationSourceManager.logPositionAndCleanOldLogs does not ever get called (at least, I guess, until the log is rolled).

Yes, In that case, the position will be updated when log rolled. That is my intention. #749 (comment)

I think the answer to my question above is in the resetStream() that gets called at the end of the second while loop, which will update lastReadPosition variable that is now used for reading here.

Oh? Then, I think i didn't understand what your question is. 🤣

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine for the replication progress problem. One additional issue, though, is regarding monitoring. IIRC, DumpReplicationQueues relies on replication info available at ZK, so now it may not show an accurate position for the log queue. We may need to expose ReplicationSourceWALReaderThread.lastReadPosition via getter method for monitoring purposes.


@Test
public void testReplicationSourceUpdatesLogPositionOnFilteredEntries() throws Exception {
public void testReplicationSourceWALReaderThreadRecoveredQueue() throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this test has been changed from it's original purpose of checking for upating wal position when no edits targeted to replication are read? Also the name does not seem accurate, it does not seem to create a recovered queue scenario.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed testReplicationSourceUpdatesLogPositionOnFilteredEntries, because the behavior of the reader is changed. (no updates every filtered entry).

And, i made recovered queue scenario by setting queue info as recovered queue. getQueueInfo("1-1")
https://github.com/apache/hbase/pull/749/files/114aa1b1a7b9919c5429fadcb74079cd08629513#diff-05e8e2a626166f52e5737f8bcdc49e39R401

If it is not well recognized as intended, let me add comments or getRecoveredQueueInfo()?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the method name to getRecoveredQueueInfo()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually yeah, this is indeed simulating recovered queue when creating it as recovered. I think this test is fine.

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
@JeongDaeKim

Copy link
Copy Markdown
Author

Thanks for the review!

there are few variable/method renaming, moving to different class, just for personal/cosmetic preferences

I see. I'll make my changes smaller to remain only necessary ones.

together with additional unrelated fixes, such as the mentioned metric one (if that's not needed here, please open a separate jira to it).

Let me file a new jira then 👍

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
💙reexec0m 35sDocker mode activated.
_ Prechecks _
💚dupname0m 0sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 26sbranch-1 passed
💚compile0m 42sbranch-1 passed with JDK v1.8.0_232
💚compile0m 48sbranch-1 passed with JDK v1.7.0_242
💚checkstyle1m 47sbranch-1 passed
💚shadedjars3m 9sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 36sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 42sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 3sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 1sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 5sthe patch passed
💚compile0m 41sthe patch passed with JDK v1.8.0_232
💚javac0m 41sthe patch passed
💚compile0m 46sthe patch passed with JDK v1.7.0_242
💚javac0m 46sthe patch passed
💚checkstyle1m 41shbase-server: The patch generated 0 new + 42 unchanged - 12 fixed = 42 total (was 54)
💚whitespace0m 0sThe patch has no whitespace issues.
💚shadedjars3m 7spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 11sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 30sthe patch passed with JDK v1.8.0_232
💚javadoc0m 42sthe patch passed with JDK v1.7.0_242
💚findbugs3m 6sthe patch passed
_ Other Tests _
💚unit118m 17shbase-server in the patch passed.
💚asflicense0m 28sThe patch does not generate ASF License warnings.
159m 54s
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/5/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux f4a65f785f70 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / 4bcc397
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/5/testReport/
Max. process+thread count3765 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/5/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

wchevreuiland others added 6 commits October 31, 2019 17:11
…CallableWithReplicas (apache#780)
Signed-off-by: Sean Busbey <busbey@apache.org>
…alue every time [Take2] (apache#748)
* HBASE-23185 Fix test failure by HBASE-23185 changes
* HBASE-23185 Fix high cpu usage because getTable()#put() gets config value every time
This reverts commit db2ce23.
Signed-off-by: Andrew Purtell <apurtell@apache.org>
…che#789)
Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Guangxu Cheng <guangxucheng@gmail.com>
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
💙reexec9m 52sDocker mode activated.
_ Prechecks _
💚dupname0m 0sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 33sbranch-1 passed
💚compile0m 40sbranch-1 passed with JDK v1.8.0_232
💚compile0m 47sbranch-1 passed with JDK v1.7.0_242
💚checkstyle1m 47sbranch-1 passed
💚shadedjars3m 7sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 37sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 42sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 4sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs3m 0sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 5sthe patch passed
💚compile0m 42sthe patch passed with JDK v1.8.0_232
💚javac0m 42sthe patch passed
💚compile0m 47sthe patch passed with JDK v1.7.0_242
💚javac0m 47sthe patch passed
💔checkstyle1m 44shbase-server: The patch generated 1 new + 42 unchanged - 12 fixed = 43 total (was 54)
💚whitespace0m 0sThe patch has no whitespace issues.
💚shadedjars3m 4spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 10sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 31sthe patch passed with JDK v1.8.0_232
💚javadoc0m 42sthe patch passed with JDK v1.7.0_242
💚findbugs3m 7sthe patch passed
_ Other Tests _
💚unit119m 47shbase-server in the patch passed.
💚asflicense0m 27sThe patch does not generate ASF License warnings.
170m 44s
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/6/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux e4ff635ca663 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / 3f9ce86
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/6/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/6/testReport/
Max. process+thread count3964 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/6/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
💙reexec0m 35sDocker mode activated.
_ Prechecks _
💚dupname0m 1sNo case conflicting files found.
💚hbaseanti0m 0sPatch does not have any anti-patterns.
💚@author0m 0sThe patch does not contain any @author tags.
💚test4tests0m 0sThe patch appears to include 4 new or modified test files.
_ branch-1 Compile Tests _
💚mvninstall8m 28sbranch-1 passed
💚compile0m 41sbranch-1 passed with JDK v1.8.0_232
💚compile0m 48sbranch-1 passed with JDK v1.7.0_242
💚checkstyle1m 47sbranch-1 passed
💚shadedjars3m 8sbranch has no errors when building our shaded downstream artifacts.
💚javadoc0m 37sbranch-1 passed with JDK v1.8.0_232
💚javadoc0m 41sbranch-1 passed with JDK v1.7.0_242
💙spotbugs3m 2sUsed deprecated FindBugs config; considering switching to SpotBugs.
💚findbugs2m 58sbranch-1 passed
_ Patch Compile Tests _
💚mvninstall2m 5sthe patch passed
💚compile0m 40sthe patch passed with JDK v1.8.0_232
💚javac0m 40sthe patch passed
💚compile0m 48sthe patch passed with JDK v1.7.0_242
💚javac0m 48sthe patch passed
💚checkstyle1m 44shbase-server: The patch generated 0 new + 42 unchanged - 12 fixed = 42 total (was 54)
💚whitespace0m 0sThe patch has no whitespace issues.
💚shadedjars3m 4spatch has no errors when building our shaded downstream artifacts.
💚hadoopcheck5m 8sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
💚javadoc0m 30sthe patch passed with JDK v1.8.0_232
💚javadoc0m 42sthe patch passed with JDK v1.7.0_242
💚findbugs3m 7sthe patch passed
_ Other Tests _
💔unit121m 10shbase-server in the patch failed.
💚asflicense0m 27sThe patch does not generate ASF License warnings.
162m 39s
ReasonTests
Failed junit testshadoop.hbase.client.TestReplicasClient
SubsystemReport/Notes
DockerClient=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/7/artifact/out/Dockerfile
GITHUB PR#749
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 65d46fa7b0b2 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-749/out/precommit/personality/provided.sh
git revisionbranch-1 / 3f9ce86
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/7/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/7/testReport/
Max. process+thread count3887 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-749/7/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

…ould be at INFO
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
@JeongDaeKim

JeongDaeKim commented Nov 6, 2019

Copy link
Copy Markdown
Author

image

The failed test seems not related to this pr. (It failed after a commit just adding a new line), and I can't reproduce it in my local repo.

I think PR is ready to get review. please have a look. @wchevreuil

@JeongDaeKim

Copy link
Copy Markdown
Author

No further comments on this PR? If any lacks of description or something for code reviews, please let me know. If not, I just want this PR to be merged, and backported to 1.4.

@wchevreuil Do you still have something to be changed in this PR?

@wchevreuil

Copy link
Copy Markdown
Contributor

Hi @JeongDaeKim , apologies for the delay. I think the solution is good, but since this is changing considerably how we track log reading position, am just taking a conservative approach. I would like to do a bit of testing. Please give me until end of this week to approve it, or suggest changes.

@wchevreuilwchevreuil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience, @JeongDaeKim ! I think I finally got a better understanding of the chages logic, along with the new and modified tests. I had put on some additional comments within the code, but some additional thoughts:

  1. We might want to expose ReplicationSourceWALReaderThread.lastReadPosition, in order to eventually have an accurate monitoring info. Currently we have _DumpReplicationQueues` which just reads info from ZK. Maybe we should print a warning there that reported log position may not be accurate.
  2. Can we add a 3rd test on TestWalEntryStream that adds few filterable entries, then adds a non filterable one, and checks if this non filterable comes in from the batch?


@Test
public void testReplicationSourceUpdatesLogPositionOnFilteredEntries() throws Exception {
public void testReplicationSourceWALReaderThreadRecoveredQueue() throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually yeah, this is indeed simulating recovered queue when creating it as recovered. I think this test is fine.

break;
}
}
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine for the replication progress problem. One additional issue, though, is regarding monitoring. IIRC, DumpReplicationQueues relies on replication info available at ZK, so now it may not show an accurate position for the log queue. We may need to expose ReplicationSourceWALReaderThread.lastReadPosition via getter method for monitoring purposes.

Comment on lines +461 to +470
// reader won't put any batch, even if EOF reached.
ExecutorService executor = Executors.newSingleThreadExecutor();
Future<WALEntryBatch> future = executor.submit(new Callable<WALEntryBatch>() {
@Override
public WALEntryBatch call() throws Exception {
return reader.take();
}
});
Thread.sleep(2000);
assertFalse(future.isDone());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up here: we may simplify this part if we decide to make ReplicationSourceWALReaderThread.lastReadPosition exposed via getter method.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

busbeyand others added 7 commits December 3, 2019 23:03
)
- switch to nexus-staging-maven-plugin for asf-release
- cleaned up some tabs in the root pom
(differs from master because there are no release scripts here.)
Signed-off-by: stack <stack@apache.org>
(cherry picked from commit 97e0107)
…ction disabled in branch-1 (apache#899)
Signed-off-by: Balazs Meszaros <meszibalu@apache.org>
Signed-off-by Anoop Sam John <anoopsamjohn@apache.org>
…File is a reference file
Signed-off-by: Lijin Bin <binlijin@apache.org>
… to a capacity rule (apache#894)
Signed-off-by Wellington Chevreuil <wchevreuil@apache.org>
We have this nice description in the java doc on ITBLL but it's
unformatted and thus illegible. Add some formatting so that it can be
read by humans.
Signed-off-by: Jan Hentschel <janh@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
@JeongDaeKim

Copy link
Copy Markdown
Author

We might want to expose ReplicationSourceWALReaderThread.lastReadPosition, in order to eventually have an accurate monitoring info. Currently we have _DumpReplicationQueues` which just reads info from ZK. Maybe we should print a warning there that reported log position may not be accurate

I think "reported log position" from DumpReplicationQueues could not be current read position before this PR (no updates during making a batch). DumpReplicationQueues works well for their purpose.
If we want to see lastReadPosition for monitoring, what about adding some messages to https://github.com/apache/hbase/blob/branch-1.4/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java#L474

Can we add a 3rd test on TestWalEntryStream that adds few filterable entries, then adds a non filterable one, and checks if this non filterable comes in from the batch?

I see, added a new test

…pache#896)
Differs from original by removing Capacity Unit examples since that feature isn't on this branch.
(cherry picked from commit a553b78)
(cherry picked from commit 2a1efe0)

@wchevreuilwchevreuil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1.

Let me try run the pre-commit hook before merging just to make sure.

@wchevreuil

Copy link
Copy Markdown
Contributor

No luck with the pre-commit. I tried a rebase, but still the job fails while starting. Ain't sure if it's something specific to the PR commits. @JeongDaeKim , would u mind squash these commits on one of you local branches, then open a new PR for branch-1 with this? Please ping me once you open the new PR.

@wchevreuil

Copy link
Copy Markdown
Contributor

Merged PR 944, so am closing this one. Thanks for the contribution and patience, @JeongDaeKim !

@JeongDaeKim
JeongDaeKim deleted the HBASE-23205 branch January 3, 2020 07:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

19 participants

@JeongDaeKim@Apache-HBase@wchevreuil@busbey@bitterfox@apurtell@rabi-kumar@virajjasani@Apache9@guangxuCheng@liuml07@ZhaoBQ@joshelser@gjacoby126@bharathv@ndimiduk@brfrn169@lhofhansl@PierreZ