Skip to content

PHOENIX-7769 Initialize and Close replication log groups as part of RS startup and shutdown#2465

Merged
tkhurana merged 1 commit intoapache:PHOENIX-7562-feature-newfrom
tkhurana:PHOENIX-7769
May 7, 2026
Merged

PHOENIX-7769 Initialize and Close replication log groups as part of RS startup and shutdown#2465
tkhurana merged 1 commit intoapache:PHOENIX-7562-feature-newfrom
tkhurana:PHOENIX-7769

Conversation

@tkhurana
Copy link
Copy Markdown
Contributor

@tkhurana tkhurana commented May 7, 2026

Summary

  • Eagerly initialize ReplicationLogGroup instances during RS startup (prewarm phase) when synchronous replication is enabled, so they are ready before the first mutation arrives.
  • Close all ReplicationLogGroup instances belonging to a server during RS shutdown via a new ReplicationLogGroup.closeAll(serverName) method.
  • Extract serverName capture from the test subclass into the parent PhoenixRegionServerEndpoint, removing redundant code.
  • Fix flaky ReplicationLogDiscoveryTest by injecting an advancing clock so rename timestamps are always strictly before the threshold on the next loop iteration.
  • Refactor ReplicationLogBaseTest to support configurable aligned vs full-round initial rotation delay, enabling ReplicationLogDiscoveryForwarderTest to use production-aligned rotation.

Test plan

  • Existing unit tests pass: ReplicationLogGroupTest, ReplicationLogDiscoveryTest, ReplicationLogDiscoveryForwarderTest
  • Ran all HA related integration tests (HABaseIT subclasses)
  • Verify RS shutdown logs show Closing all ReplicationLogGroup instances
  • Verify failed eager init logs a warning and does not block startup

@tkhurana
Copy link
Copy Markdown
Contributor Author

tkhurana commented May 7, 2026

@Himanshu-g81 fixed the flapper test

Copy link
Copy Markdown
Contributor

@Himanshu-g81 Himanshu-g81 left a comment

Choose a reason for hiding this comment

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

Thanks!

@tkhurana tkhurana merged commit e4d9aae into apache:PHOENIX-7562-feature-new May 7, 2026
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.

2 participants