Skip to content

Conversation

@apurtell
Copy link
Contributor

No description provided.

@apurtell apurtell requested review from Apache9 and virajjasani July 27, 2022 00:07
Copy link
Contributor Author

@apurtell apurtell left a comment

Choose a reason for hiding this comment

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

Notable findings exclusive to branch-2.

handleException();
if (this.closed) {
return null;
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were missing an inner try here.


@Override
public void close() {
lock.lock();
Copy link
Contributor Author

@apurtell apurtell Jul 27, 2022

Choose a reason for hiding this comment

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

Not a bug like above but still a nit.

* Global nonceGenerator shared per client. Currently there's no reason to limit its scope. Once
* it's set under nonceGeneratorCreateLock, it is never unset or changed.
*/
// XXX: It is a bad pattern to assign a value to a static field from a constructor. However
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Declined to fix the issue because we'd have to use a Configuration instance at static class init time, not the Configuration that gets passed into the Constructor. However, marked it as a code smell with XXX.

public void mergeRegions(final byte[] nameOfRegionA, final byte[] nameOfRegionB,
final boolean forcible) throws IOException {
mergeRegionsAsync(nameOfRegionA, nameOfRegionB, forcible);
try {
Copy link
Contributor Author

@apurtell apurtell Jul 27, 2022

Choose a reason for hiding this comment

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

mergeRegions will return immediately without waiting for or surfacing any exception from the operation. This seems wrong. We don't expect to wait for the master to complete the merge but we would expect to surface an IOException from the RPC. Yet, it is a semantic change over previously released versions. For discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC this is a known issue. You can see the comments in the Admin interface.

  /**
   * Merge two regions. Asynchronous operation.
   * @param nameOfRegionA encoded or full name of region a
   * @param nameOfRegionB encoded or full name of region b
   * @param forcible      <code>true</code> if do a compulsory merge, otherwise we will only merge
   *                      two adjacent regions
   * @throws IOException if a remote or network exception occurs
   * @deprecated Since 2.0. Will be removed in 3.0. Use
   *             {@link #mergeRegionsAsync(byte[], byte[], boolean)} instead.
   */
  @Deprecated
  void mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible)
    throws IOException;

Copy link
Contributor Author

@apurtell apurtell Jul 27, 2022

Choose a reason for hiding this comment

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

I'm not sure an IOException will get thrown as expected because we don't get() the Future. On the other hand this has been the behavior for a long time. I will stick to warning cleanups and come back to this later.

// call out to master to do split now
splitRegionAsync(r, splitPoint);
try {
splitRegionAsync(r, splitPoint).get();
Copy link
Contributor Author

@apurtell apurtell Jul 27, 2022

Choose a reason for hiding this comment

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

split will return immediately without waiting for or surfacing any exception from the operation. This seems wrong. We don't expect to wait for the split to complete but we would expect to surface an IOException from the RPC. Yet, it is a semantic change over previously released versions. For discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be the same with mergeRegions method.

Copy link
Contributor Author

@apurtell apurtell Jul 27, 2022

Choose a reason for hiding this comment

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

Same, will come back to this later.

return this.maxLatency.getAndSet(0);
}

@SuppressWarnings("FutureReturnValueIgnored")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same

private long fastFailClearingTimeMilliSec;

private final ThreadLocal<MutableBoolean> threadRetryingInFastFailMode = new ThreadLocal<>();
private static final ThreadLocal<MutableBoolean> threadRetryingInFastFailMode =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ThreadLocals should to be class fields not instance fields. Otherwise the coder may get the false impression interactions with the thread local is also scoped to the instance. They are not, they are scoped to the thread.


/**
* Set the tracker that should be used for tracking statistics about the server
* @deprecated Does nothing. Since 2.5.0, will be removed in 4.0.0.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this in 3.0.0 instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

This class is IA.Private so we are free to remove it at any time.

throw new IOException("Imposible? Arrive at an unreachable line...");
}

@SuppressWarnings("FutureReturnValueIgnored")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suppressed here because scheduling the callable returns a future we don't care about.


private boolean reloginInProgress;

@SuppressWarnings("FutureReturnValueIgnored")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suppressed here because the scheduling returns a future we don't care about.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 7s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 18s branch-2 passed
+1 💚 compile 0m 18s branch-2 passed
+1 💚 shadedjars 3m 43s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 19s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 8s the patch passed
+1 💚 compile 0m 20s the patch passed
+1 💚 javac 0m 20s the patch passed
+1 💚 shadedjars 3m 38s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 16s the patch passed
_ Other Tests _
+1 💚 unit 2m 33s hbase-client in the patch passed.
18m 14s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #4651
Optional Tests javac javadoc unit shadedjars compile
uname Linux 093629bc8d87 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 4c08a8a
Default Java AdoptOpenJDK-1.8.0_282-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/testReport/
Max. process+thread count 169 (vs. ulimit of 12500)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/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
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 56s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-2 Compile Tests _
+1 💚 mvninstall 2m 55s branch-2 passed
+1 💚 compile 0m 51s branch-2 passed
+1 💚 checkstyle 0m 23s branch-2 passed
+1 💚 spotless 1m 6s branch has no errors when running spotless:check.
+1 💚 spotbugs 1m 7s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 39s the patch passed
+1 💚 compile 0m 50s the patch passed
-0 ⚠️ javac 0m 50s hbase-client generated 69 new + 36 unchanged - 109 fixed = 105 total (was 145)
+1 💚 checkstyle 0m 21s hbase-client: The patch generated 0 new + 283 unchanged - 83 fixed = 283 total (was 366)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 8m 50s Patch does not cause any errors with Hadoop 3.1.2 3.2.1.
+1 💚 spotless 0m 56s patch has no errors when running spotless:check.
+1 💚 spotbugs 1m 5s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 9s The patch does not generate ASF License warnings.
29m 37s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4651
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 906aacbf0f85 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 4c08a8a
Default Java AdoptOpenJDK-1.8.0_282-b08
javac https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-client.txt
Max. process+thread count 64 (vs. ulimit of 12500)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/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
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 43s Docker mode activated.
-0 ⚠️ yetus 0m 7s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+1 💚 mvninstall 4m 27s branch-2 passed
+1 💚 compile 0m 34s branch-2 passed
+1 💚 shadedjars 5m 55s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 41s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 4m 12s the patch passed
+1 💚 compile 0m 30s the patch passed
+1 💚 javac 0m 30s the patch passed
+1 💚 shadedjars 5m 45s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s hbase-client generated 0 new + 81 unchanged - 11 fixed = 81 total (was 92)
_ Other Tests _
+1 💚 unit 3m 24s hbase-client in the patch passed.
29m 34s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4651
Optional Tests javac javadoc unit shadedjars compile
uname Linux a35b2be73d55 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 4c08a8a
Default Java AdoptOpenJDK-11.0.10+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/1/testReport/
Max. process+thread count 200 (vs. ulimit of 12500)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4651/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.

@apurtell
Copy link
Contributor Author

apurtell commented Jul 27, 2022

Rolled back the HBaseAdmin changes called out above, just cleanups now, proceeding to merge. I will file a follow up for that, with a more considered set of changes.

@apurtell apurtell merged commit 29f51c0 into apache:branch-2 Jul 27, 2022
@apurtell apurtell deleted the HBASE-27203-2 branch July 27, 2022 22:58
asfgit pushed a commit that referenced this pull request Jul 27, 2022
Sign up for free to 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.

4 participants