This is an automated email from the ASF dual-hosted git repository.
tkhurana pushed a commit to branch PHOENIX-7562-feature-new
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/PHOENIX-7562-feature-new by
this push:
new bc4bf6d1e8 PHOENIX-7962 addendum: restore Abortable on the live
replication write path
bc4bf6d1e8 is described below
commit bc4bf6d1e8a9f64de70e8deaf3e4af0a7f021e8c
Author: tkhurana <[email protected]>
AuthorDate: Thu Aug 6 15:54:17 2026 -0700
PHOENIX-7962 addendum: restore Abortable on the live replication write path
dc5719ae93 refactored IndexRegionObserver's live sync-write path to route
through getReplicationLogGroup(), which called the
ReplicationLogGroup.get(conf, serverName, haGroup, HAGroupStoreManager)
overload -- forwarding a null Abortable. A fatal replication error on the
live path could therefore no longer abort the region server. (The replay
path in getHAGroupFromWALKey was untouched and still passed the abortable.)
Add a get(...) overload taking both the HAGroupStoreManager and an
Abortable, and use it at the live-path call site so the RegionServerServices
abortable is threaded through again.
---
.../phoenix/hbase/index/IndexRegionObserver.java | 2 +-
.../phoenix/replication/ReplicationLogGroup.java | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
index 715683e979..eca912f5fc 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
@@ -925,7 +925,7 @@ public class IndexRegionObserver implements
RegionCoprocessor, RegionObserver {
return Optional.empty();
}
Optional<ReplicationLogGroup> logGroup =
ReplicationLogGroup.get(env.getConfiguration(),
- env.getServerName(), haGroup, haGroupStoreManager);
+ env.getServerName(), haGroup, haGroupStoreManager, abortable);
if (logGroup.isPresent()) {
return logGroup;
}
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogGroup.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogGroup.java
index 3d760af01a..845c181e70 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogGroup.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogGroup.java
@@ -439,6 +439,24 @@ public class ReplicationLogGroup {
return getOrCreate(conf, serverName, haGroupName, haGroupStoreManager,
null);
}
+ /**
+ * Get or create a ReplicationLogGroup instance for the given HA Group.
Returns empty when this
+ * cluster is not active for the HA group (see {@link #getOrCreate}). Used
by callers that already
+ * hold the store manager and want fatal errors to abort via the supplied
{@link Abortable}.
+ * @param conf Configuration object
+ * @param serverName The server name
+ * @param haGroupName The HA Group name
+ * @param haGroupStoreManager HA Group Store Manager instance
+ * @param abortable Abortable to invoke on fatal errors (typically
RegionServerServices)
+ * @return ReplicationLogGroup instance, or empty if this cluster is not
active
+ * @throws IOException if initialization fails
+ */
+ public static Optional<ReplicationLogGroup> get(Configuration conf,
ServerName serverName,
+ String haGroupName, HAGroupStoreManager haGroupStoreManager, Abortable
abortable)
+ throws IOException {
+ return getOrCreate(conf, serverName, haGroupName, haGroupStoreManager,
abortable);
+ }
+
/**
* Get an existing, or create and initialize a new, ReplicationLogGroup —
but only when this
* cluster is active for the HA group. A replication log group is a WRITER;
it must exist only