[
https://issues.apache.org/jira/browse/PHOENIX-4983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709184#comment-16709184
]
ASF GitHub Bot commented on PHOENIX-4983:
-----------------------------------------
Github user twdsilva commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/405#discussion_r238808710
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java ---
@@ -399,8 +401,21 @@ public Integer call() throws SQLException {
}
MutationState state =
connection.getMutationState();
MutationPlan plan =
stmt.compilePlan(PhoenixStatement.this, Sequence.ValueOp.VALIDATE_SEQUENCE);
- if (plan.getTargetRef() != null &&
plan.getTargetRef().getTable() != null &&
plan.getTargetRef().getTable().isTransactional()) {
-
state.startTransaction(plan.getTargetRef().getTable().getTransactionProvider());
+ PTable table =
plan.getTargetRef().getTable();
+ if(table != null && connection.getSCN() !=
null && !connection.isRunningUpgrade() && !connection.isBuildingIndex()) {
--- End diff --
can you move these checks to UpsertCompiler? Also I think you can remove
the second check for mutable tables with indexes here.
> Allow using a connection with a SCN set to write data to tables EXCEPT
> transactional tables or mutable tables with indexes or tables with a
> ROW_TIMESTAMP column
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-4983
> URL: https://issues.apache.org/jira/browse/PHOENIX-4983
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Thomas D'Silva
> Assignee: Swaroopa Kadam
> Priority: Major
> Labels: SFDC
> Attachments: PHOENIX-4983-4.x-HBase-1.4.patch
>
>
> Currently If a SCN is set on a connection it is read-only. We only need to
> prevent a client from using a connection with a SCN set to upsert data for:
> 1) transactional tables
> 2) mutable tables with indexes
> 3) tables with a ROW_TIMESTAMP column
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)