You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/10/02 19:57:20 UTC

[GitHub] [phoenix] gokceni commented on a change in pull request #592: PHOENIX-5505 Index read repair does not repair unverified rows with h…

gokceni commented on a change in pull request #592: PHOENIX-5505 Index read repair does not repair unverified rows with h…
URL: https://github.com/apache/phoenix/pull/592#discussion_r330741861
 
 

 ##########
 File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/GlobalIndexCheckerIT.java
 ##########
 @@ -230,14 +233,27 @@ public void testSkipDataTableAndPostIndexPartialRowUpdate() throws Exception {
         conn.commit();
         IndexRegionObserver.setSkipDataTableUpdatesForTesting(false);
         IndexRegionObserver.setSkipPostIndexUpdatesForTesting(false);
-        conn.createStatement().execute("upsert into " + dataTableName + " (id, val3) values ('a', 'abcdd')");
-        conn.commit();
         String selectSql =  "SELECT val2, val3 from " + dataTableName + " WHERE val1  = 'ab'";
         // Verify that we will read from the first index table
         assertExplainPlan(conn, selectSql, dataTableName, indexName + "1");
         ResultSet rs = conn.createStatement().executeQuery(selectSql);
         assertTrue(rs.next());
         assertEquals("abc", rs.getString(1));
+        assertEquals("abcd", rs.getString(2));
+        assertFalse(rs.next());
+        selectSql =  "SELECT val2, val3 from " + dataTableName + " WHERE val2  = 'abcc'";
+        // Verify that we will read from the second index table
+        assertExplainPlan(conn, selectSql, dataTableName, indexName + "2");
+        rs = conn.createStatement().executeQuery(selectSql);
+        assertFalse(rs.next());
+        conn.createStatement().execute("upsert into " + dataTableName + " (id, val3) values ('a', 'abcdd')");
+        conn.commit();
+        selectSql =  "SELECT val2, val3 from " + dataTableName + " WHERE val1  = 'ab'";
+        // Verify that we will read from the first index table
+        assertExplainPlan(conn, selectSql, dataTableName, indexName + "1");
+        rs = conn.createStatement().executeQuery(selectSql);
+        assertTrue(rs.next());
+        assertEquals("abc", rs.getString(1));
         assertEquals("abcdd", rs.getString(2));
 
 Review comment:
   Should not this value be abcd? Because the second and 3rd phase is failing?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services