You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2017/09/20 23:16:00 UTC

[jira] [Commented] (PHOENIX-4221) Disallow DML operations on connections with CURRENT_SCN set - VariableLengthPKIT

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

James Taylor commented on PHOENIX-4221:
---------------------------------------

Thanks for the patch, [~aertoria]. Instead of having member variables for the table names, how about if we just use local variables? The reason is that we setup/tear down the mini cluster (a relatively expensive operation) based on how many calls are made to generateUniqueName() which will happen 5x more frequently when using member variables.
{code}
+    private String pTSDBTableName;
+    private String bTableName;
+    private String varcharKeyTestTable;
+    private String pTSDB2TableName;
+    private String substrTestTableName;
+
+    @Before
+    public void setUp(){
+        if(!(pTSDBTableName==null
+                &&bTableName==null
+                &&pTSDB2TableName==null
+                &&varcharKeyTestTable==null
+                &&substrTestTableName==null)) throw new RuntimeException("test has not been cleaned up properly");
+        pTSDBTableName = generateUniqueName();
+        pTSDB2TableName = generateUniqueName();
+        bTableName = generateUniqueName();
+        varcharKeyTestTable = generateUniqueName();
+        substrTestTableName = generateUniqueName();
+    }
+
+    @After
+    public void cleanUp() {
+        pTSDBTableName = null;
+        bTableName = null;
+        pTSDB2TableName = null;
+        varcharKeyTestTable = null;
+        substrTestTableName = null;
+    }
{code}

> Disallow DML operations on connections with CURRENT_SCN set - VariableLengthPKIT
> --------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4221
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4221
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Ethan Wang
>            Assignee: Ethan Wang
>         Attachments: PHOENIX-4221.patch
>
>
> Disallow DML operations on connections with CURRENT_SCN set - VariableLengthPKIT



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)