phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4983) 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
Date Sat, 08 Dec 2018 19:01:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-4983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713754#comment-16713754
] 

ASF GitHub Bot commented on PHOENIX-4983:
-----------------------------------------

Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/405#discussion_r240013343
  
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java ---
    @@ -0,0 +1,137 @@
    +package org.apache.phoenix.end2end;
    +
    +import org.apache.phoenix.exception.SQLExceptionCode;
    +import org.apache.phoenix.exception.SQLExceptionInfo;
    +import org.junit.Assert;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.rules.ExpectedException;
    +
    +import java.sql.Connection;
    +import java.sql.Date;
    +import java.sql.DriverManager;
    +import java.sql.PreparedStatement;
    +import java.sql.ResultSet;
    +import java.sql.SQLException;
    +import java.util.Properties;
    +
    +import static org.hamcrest.CoreMatchers.containsString;
    +import static org.hamcrest.core.Is.is;
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.assertFalse;
    +import static org.junit.Assert.assertTrue;
    +
    +
    +public class UpsertWithSCNIT extends ParallelStatsDisabledIT {
    +
    +    @Rule
    +    public final ExpectedException exception = ExpectedException.none();
    +    Properties props = null;
    +    PreparedStatement prep = null;
    +    String tableName =null;
    +
    +
    +    @Test // See https://issues.apache.org/jira/browse/PHOENIX-4983
    +    public void testUpsertOnSCNSetTxnTable() throws SQLException {
    +
    +        helpTestUpserWithSCNIT(false, true, false, false, false);
    +        exception.expect(SQLException.class);
    +        exception.expectMessage(containsString("ERROR 1075 (44A06): Cannot use a " +
    --- End diff --
    
    don't compare error message strings, use `errorCode` instead.


> 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, PHOENIX-4983-4.x-HBase-1.4.patch,
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)

Mime
View raw message