You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/12/04 19:40:00 UTC

[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

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

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_r238806770
  
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertWithSCNIT.java ---
    @@ -0,0 +1,167 @@
    +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();
    +
    +
    +
    +    @Test // See https://issues.apache.org/jira/browse/PHOENIX-4983
    +    public void testUpsertOnSCNSetTxnTable() throws SQLException {
    +
    +        String trnx = "CREATE TABLE transaction_table (METRIC_ID CHAR(15) NOT NULL,\n" +
    --- End diff --
    
    Use a generateUniqueName() to create tables with unique names since tests that extend ParallelStatsDisabledIT 
     share the same cluster. 


> 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)