[ 
https://issues.apache.org/jira/browse/PHOENIX-7898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lokesh Khurana reassigned PHOENIX-7898:
---------------------------------------

    Assignee: Lokesh Khurana

> Cloned PhoenixConnection loses HA group, breaking _HAGroupName tagging on 
> UPSERT SELECT and DELETE
> --------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-7898
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7898
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Lokesh Khurana
>            Assignee: Lokesh Khurana
>            Priority: Major
>
>   Four `PhoenixConnection` copy constructors pass `null` for the cloned 
> connection's `haGroup` field, so cloned connections produced by 
> `MutatingParallelIteratorFactory.newIterator(...)` (UPSERT
>   SELECT and DELETE) bypass the `MutationState.annotateMutationWithMetadata` 
> guard `connection.getHAGroup() != null && ...`. The `_HAGroupName` HBase 
> attribute is not attached to the affected
>   mutations, and the consistent_failover server's mutation-block contract is 
> not enforced.
>   For UPSERT SELECT crossing the default `MUTATE_BATCH_SIZE = 100`: 
> floor(N/100) in-loop flushes drop `_HAGroupName` (cloned conn path); the 
> trailing N mod 100 rows are joined back to the parent
>   and tagged correctly. At N=250: 200 dropped, 50 tagged.
>   ## Fix
>   1. `PhoenixConnection.java` — four copy constructors propagate 
> `connection.haGroup` instead of `null`.
>   2. `PhoenixConnection.java` — split shared `// Only available for 
> connection which is part of HA Connections` Javadoc on `haGroupName` and 
> `haGroup` into field-specific descriptions.
>   3. `ConnectionQueryServices.java` — convert 3-arg `connect(url, info, 
> haGroup)` from abstract to `default` delegating to 2-arg `connect(url, info)` 
> for source-compat with 3rd-party
>   implementors.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to