Skip to content

HBASE-28158 Decouple RIT list management from TRSP - #7375

Merged
Apache9 merged 9 commits into
apache:masterfrom
Umeshkumar9414:HBASE-28158_2
Dec 1, 2025
Merged

HBASE-28158 Decouple RIT list management from TRSP#7375
Apache9 merged 9 commits into
apache:masterfrom
Umeshkumar9414:HBASE-28158_2

Conversation

@Umeshkumar9414

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Umeshkumar9414
Umeshkumar9414 marked this pull request as ready for review October 14, 2025 09:45
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

return regionInTransitionTracker.isRegionInTransition(regionInfo);
}

public int getOngoingTRSPCount() {

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.

Call it getInTransitCount()?

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.

"Transit" means something different than "in transition". Javadoc the explaination.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

how about scheduledRegionTransition ?

}

public boolean isInTransition() {
public boolean isOngoingTRSP() {

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.

How about isInTransit?

And javadoc that "transit" means something different than "in transition".

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

how about changing to isTransitionScheduled?

removeRegionInTransition(regionInfo);
}

private List<RegionState.State> getExceptedRegionStates(RegionStateNode regionStateNode) {

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 this method should be renamed and the code should be documented with comments. You are not really "excepting" regions.

You are basically waiting for the assignment state machine to complete and reach the desired terminal state by checking the region's current state against the table's state (ENABLED vs. DISABLED) to determine if the region is in the terminal state. If not, the region is added to the RIT list; otherwise, it is removed.

Your method naming and comments should communicate this theory of operation.

Related, there may be a minor race condition here. Consider if the table's state is changed (e.g., from ENABLED to DISABLING) at the same time a region for that table reports a state change. I think the tracker can momentarily use a stale table state here. However, this is self-correcting. As the region proceeds through its state transitions each subsequent call to the tracker will re-evaluate its status, and it will eventually be removed from RIT correctly.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Correct me if I am wrong but I think this race condition might not occur as before changing the state of any table of region (or running any procedure) we first take a lock (setState using HBCK may be an exception). And this lock might save us from this case.

static void removeNonDefaultReplicas(MasterProcedureEnv env, Stream<RegionInfo> regions,
int regionReplication) {
// Remove from in-memory states
// TODO should we not confirm here that replica region are closed or not ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@apurtell can you help me here? I was curious here why we are not confirming if replica regions are closed or not?

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 am not sure about this either.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@apurtellapurtell 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.

This is good work and looks good to me. There is a checkstyle nit remaining to fix, please attend to that.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache9Apache9 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.

Still need lots of polishing, but in general I think the approach is OK, it does not change the normal transition logic, just changes the way on how we show regions as in transition.

// splittingServersFromWALDir are being actively split -- the directory in the FS ends in
// '-SPLITTING'. Each splitting server should have a corresponding SCP. Log if not.
splittingServersFromWALDir.stream().filter(s -> !deadServersFromPE.contains(s))
splittingServersFromWALDir.stream().filter(s -> !deadServersFromPE.containsKey(s))

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 we change the parameter from Set to a Map but we only use its containsKey method?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

we are passing it to ServerManager where we are adding both the values to deadServermap (ref)

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.

Then better change the parameter name?

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.

@Umeshkumar9414 Here, I've replied some of the comments.

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

done

* @param liveServersFromWALDir the live region servers from wal directory.
*/
void findDeadServersAndProcess(Set<ServerName> deadServersFromPE,
void findDeadServersAndProcess(Map<ServerName, Long> deadServersFromPE,

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 just a parameter type change without chaging any real logic?

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 value is the crash time? We should use it when setting up dead servers?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yes we should use it. We are using it in line 445 (deadservers::putIfAbsent).

I didn't need to change the code becuase lambda and method overloading.

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.

Let's change the parameter name.

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.

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

done


private final int forceRegionRetainmentRetries;

private final RegionInTransitionTracker regionInTransitionTracker;

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 not put this into RegionStates? In this way we can reduce the code change i think.

@Umeshkumar9414Umeshkumar9414Nov 10, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

There are couple of reasons for this

  • I wanted regionTransitionTracker to follow meta (RegionStateStore in code) and regionStates doesn't do that. Sometime we update region state in memory and update meta in next step of procedure.
  • regionInTransitionTracker needed tableStateManager and I doesn't wanted to pass tableStateManager to regionSates. Another option would be create tracker in AssignmentManager itself and then pass that in constructor.

Considering above I feel keeping this in AM is better.

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 we could keep it here and also pass and store it in RegionStates, if we use it in both places.

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.

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.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

We are not using it in RegionStates as of now.
I do thought of a use in RegionStateNode though, I was thinking to include activeTransitProcedureCount in RegionInTransitionTracker only. But then again in that way I had to pass it till RegionStateNode.

Comment threadhbase-server/src/main/java/org/apache/hadoop/hbase/master/DeadServer.java Outdated
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 31sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed 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 _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall3m 7smaster passed
+1 💚compile1m 18smaster passed
+1 💚javadoc0m 41smaster passed
+1 💚shadedjars6m 16sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall3m 10sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚javadoc0m 41sthe patch passed
+1 💚shadedjars6m 13spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit264m 36s/patch-unit-hbase-server.txthbase-server in the patch failed.
+1 💚unit4m 3shbase-testing-util in the patch passed.
298m 0s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/10/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7375
Optional Testsjavac javadoc unit compile shadedjars
unameLinux ca11717282bd 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / c84ed4d
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/10/testReport/
Max. process+thread count4127 (vs. ulimit of 30000)
modulesC: hbase-server hbase-testing-util U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/10/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Umeshkumar9414

Copy link
Copy Markdown
ContributorAuthor

TestSecureIPC test failed in the build, I was not able to run this test successfully in my machine for master branch as well, becuase of keytab issue. Looks like I might need some changes in my machine to run these tests, that I am not aware of.

@Umeshkumar9414

Copy link
Copy Markdown
ContributorAuthor

@Apache9 can you help me with review ?

@Apache9Apache9 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.

We are almost done, thanks for the patience.

Now I'm OK with not putting RegionInTransitionStateTracker in RegionStates. The only left thing is about the isRegionInRegionStates method, do we really use this method in our code base? Can we just remove it?

// AssignmentManager calls setTableStateManager once hbase:meta is confirmed online, if it is
// still null it means confirmation is still pending. One should not access TableStateManger
// till the time.
if (TableName.isMetaTableName(tableName)) {

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.

Maybe here we could add an assert TableName.isMetaTableName(tableName);, and then return true?

Anyway, throwing a RuntimeException is also acceptable as in production environment we may disable assertion.

Better add something like "CODE-BUG" to tell developers that you may write code wrong.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Somehow I try to avoid if else and liked the idea of assert. Will do that.

Comment threadhbase-server/src/main/resources/hbase-webapps/master/deadRegionServers.jsp Outdated
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 13sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗mvndep0m 19sMaven dependency ordering for branch
+1 💚mvninstall6m 56smaster passed
+1 💚compile6m 5smaster passed
+1 💚checkstyle1m 49smaster passed
+1 💚spotbugs3m 39smaster passed
+1 💚spotless1m 22sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall6m 48sthe patch passed
+1 💚compile6m 3sthe patch passed
+1 💚javac6m 3sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle1m 34shbase-server: The patch generated 0 new + 45 unchanged - 2 fixed = 45 total (was 47)
+1 💚checkstyle0m 23sThe patch passed checkstyle in hbase-testing-util
+1 💚spotbugs5m 28sthe patch passed
+1 💚hadoopcheck19m 5sPatch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚spotless1m 27spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 30sThe patch does not generate ASF License warnings.
73m 29s
SubsystemReport/Notes
DockerClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/11/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7375
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 96c76c7301d1 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4af272b
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count71 (vs. ulimit of 30000)
modulesC: hbase-server hbase-testing-util U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/11/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 31sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed 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 _
+0 🆗mvndep0m 33sMaven dependency ordering for branch
+1 💚mvninstall3m 35smaster passed
+1 💚compile1m 25smaster passed
+1 💚javadoc0m 43smaster passed
+1 💚shadedjars6m 23sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall3m 14sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚javadoc0m 42sthe patch passed
+1 💚shadedjars6m 13spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit212m 18shbase-server in the patch passed.
+1 💚unit2m 27shbase-testing-util in the patch passed.
244m 40s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/11/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7375
Optional Testsjavac javadoc unit compile shadedjars
unameLinux ae37f0c5564f 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4af272b
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/11/testReport/
Max. process+thread count4748 (vs. ulimit of 30000)
modulesC: hbase-server hbase-testing-util U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/11/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec2m 27sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall5m 2smaster passed
+1 💚compile4m 51smaster passed
+1 💚checkstyle1m 28smaster passed
+1 💚spotbugs2m 53smaster passed
+1 💚spotless1m 7sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall4m 24sthe patch passed
+1 💚compile4m 45sthe patch passed
+1 💚javac4m 45sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle1m 13shbase-server: The patch generated 0 new + 45 unchanged - 2 fixed = 45 total (was 47)
+1 💚checkstyle0m 12sThe patch passed checkstyle in hbase-testing-util
+1 💚spotbugs3m 4sthe patch passed
+1 💚hadoopcheck13m 21sPatch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚spotless0m 56spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 23sThe patch does not generate ASF License warnings.
55m 24s
SubsystemReport/Notes
DockerClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/12/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7375
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 928e2edb867e 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 3218382
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count70 (vs. ulimit of 30000)
modulesC: hbase-server hbase-testing-util U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/12/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 34sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed 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 _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚mvninstall3m 10smaster passed
+1 💚compile1m 17smaster passed
+1 💚javadoc0m 40smaster passed
+1 💚shadedjars6m 13sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall3m 12sthe patch passed
+1 💚compile1m 19sthe patch passed
+1 💚javac1m 19sthe patch passed
+1 💚javadoc0m 40sthe patch passed
+1 💚shadedjars6m 13spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit212m 16s/patch-unit-hbase-server.txthbase-server in the patch failed.
+1 💚unit2m 9shbase-testing-util in the patch passed.
242m 20s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/12/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7375
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 6b66c6cd5128 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 3218382
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/12/testReport/
Max. process+thread count4419 (vs. ulimit of 30000)
modulesC: hbase-server hbase-testing-util U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7375/12/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache9Apache9 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.

+1.

Thanks @Umeshkumar9414!

@Umeshkumar9414

Umeshkumar9414 commented Nov 30, 2025

Copy link
Copy Markdown
ContributorAuthor

Can we merge it @Apache9 ? I think @apurtell is out for some days and I was thinking if it can get merge before any new commit that conflict these changes.
I have opened PR for other branches as well except branch-2.6 where it was clean cherry pick from branch-2

@Apache9

Copy link
Copy Markdown
Contributor

I'm OK with merging it.

I'm in a business trip in Singapore, so let me see if I can get a device to merge and cherry-pick this to all branches...

Thanks.

@Apache9
Apache9 merged commit 7d604d4 into apache:masterDec 1, 2025
1 check failed
Apache9 pushed a commit that referenced this pull request Dec 1, 2025
Close#7447
Co-authored-by: ukumawat <ukumawat@salesforce.com>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 7d604d4)
ServerName crashedServerName = scp.getServerName();
for (RegionInfo regionInfo : regionsOnCrashedServer) {
RegionStateNode node = regionStates.getOrCreateRegionStateNode(regionInfo);
if (node.getRegionLocation() == crashedServerName) {

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.

is this always guaranteed to be comparable via ==? Or do we have to, or would it be safer to, use equals?

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.

Ah, it should be equals, and we should log a warn when they do not equal, as this method is called before we assign any regions on the crashed region server, so the regionsOnCrashedServer should all be on the crashed server.

Let me prepare an addendum. Thanks @d-c-manning !

@Umeshkumar9414Umeshkumar9414Dec 6, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks @d-c-manning, @Apache9 let me know if I can help here.

@Umeshkumar9414

Umeshkumar9414 commented Dec 8, 2025

Copy link
Copy Markdown
ContributorAuthor

Hi @Apache9, @apurtell , @virajjasani while building the phoenix with these changes I got to know that Phoenix uses isRegionInTransition method of RegionStates class that I removed with this change. And this version of pheonix will be facing compile issue after this change. Wanted to know what do we do in such cases ?

 [ERROR] /****/phoenix/phoenix-core/src/it/java/org/apache/phoenix/rpc/PhoenixServerRpcIT.java:[247,79] cannot find symbol
symbol: method isRegionInTransition(org.apache.hadoop.hbase.client.RegionInfo)
location: class org.apache.hadoop.hbase.master.assignment.RegionStates

@virajjasani

Copy link
Copy Markdown
Contributor

@Umeshkumar9414 the usage seems to be in the test code so we can remove it if it is not really necessary, or use JMX metrics to find out RIT count in the test

@apurtell

Copy link
Copy Markdown
Contributor

@Umeshkumar9414@virajjasani

RegionStates is annotated @InterfaceAudience.Private so Phoenix was wrong to ever use this interface. Phoenix must solve the issue themselves and not rely on Private annotated code. This is well understood by now, it keeps coming up that they do this and get broken.

@Umeshkumar9414

Copy link
Copy Markdown
ContributorAuthor

@Umeshkumar9414@virajjasani

RegionStates is annotated @InterfaceAudience.Private so Phoenix was wrong to ever use this interface. Phoenix must solve the issue themselves and not rely on Private annotated code. This is well understood by now, it keeps coming up that they do this and get broken.

Raised an JIRA https://issues.apache.org/jira/browse/PHOENIX-7741 and solved it in phoenix.

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.

6 participants

@Umeshkumar9414@Apache-HBase@Apache9@virajjasani@apurtell@d-c-manning