phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4096) Disallow DML operations on connections with CURRENT_SCN set
Date Thu, 28 Sep 2017 22:00:00 GMT

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

Hadoop QA commented on PHOENIX-4096:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12889561/PHOENIX-4096_v3.patch
  against master branch at commit 033a2fc2a91052a6db94da55d87c173d4dbdabab.
  ATTACHMENT ID: 12889561

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:green}+1 tests included{color}.  The patch appears to include 7 new or modified
tests.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:red}-1 lineLengths{color}.  The patch introduces the following lines longer than
100:
    +        String tableName = initATableValues(tenantId, getDefaultSplits(tenantId), null,
null, getUrl());
+            try (PhoenixConnection phxConn = new PhoenixConnection(servicesWithUpgrade, getUrl(),
PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES), 
+                    "CREATE TABLE " + tableName + " (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR)
TRANSACTIONAL=true");
+        props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(EnvironmentEdgeManager.currentTimeMillis()));
+     UNEQUAL_SCN_AND_BUILD_INDEX_AT(534, "42911", "If both specified, values of CURRENT_SCN
and BUILD_INDEX_AT must be equal."),
+     ONLY_INDEX_UPDATABLE_AT_SCN(535, "42912", "Only an index may be updated when the BUILD_INDEX_AT
property is specified"),
+                                        String valueString = value == null ? QueryConstants.NULL_DISPLAY_TEXT
+        props.setProperty(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, Long.toString(connection.getSCN()+1));
+        props.put(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, Long.toString(EnvironmentEdgeManager.currentTimeMillis()+1));
+   public static void analyzeTable(String url, Properties props, String tableName) throws
IOException, SQLException {

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.end2end.index.PartialIndexRebuilderIT

Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1491//testReport/
Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/1491//console

This message is automatically generated.

> Disallow DML operations on connections with CURRENT_SCN set
> -----------------------------------------------------------
>
>                 Key: PHOENIX-4096
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4096
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>             Fix For: 4.12.0
>
>         Attachments: PHOENIX-4096_v2.patch, PHOENIX-4096_v3.patch, PHOENIX-4096_wip1.patch,
PHOENIX-4096_wip.patch
>
>
> We should make a connection read-only if CURRENT_SCN is set. It's really a bad idea to
go back in time and update data and it won't work with secondary indexing, potentially leading
to your index and table getting out of sync.
> For testing purposes, where we need to control the timestamp, we should rely on the EnvironmentEdgeManager
instead to control the current time.



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

Mime
View raw message