Source:
public void testSkipDataTableAndPostIndexPartialRowUpdate() throws Exception { String dataTableName = generateUniqueName(); populateTable(dataTableName); Connection conn = DriverManager.getConnection(getUrl()); String indexName = generateUniqueName(); conn.createStatement().execute("CREATE INDEX " + indexName + "1 on " + dataTableName + " (val1) include (val2, val3)" + (async ? "ASYNC" : "")); conn.createStatement().execute("CREATE INDEX " + indexName + "2 on " + dataTableName + " (val2) include (val1, val3)" + (async ? "ASYNC" : "")); if (async) { IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "1"); IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "2"); } conn.createStatement().execute("upsert into " + dataTableName + " (id, val3) values ('a', 'abcdd')"); conn.commit(); String selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val1 = 'ab'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "1"); ResultSet rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val2 = 'abc'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "2"); rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); conn.close(); }

Target:
public void testSkipDataTableAndPostIndexPartialRowUpdate() throws Exception { String dataTableName = generateUniqueName(); populateTable(dataTableName); Connection conn = DriverManager.getConnection(getUrl()); String indexName = generateUniqueName(); conn.createStatement().execute("CREATE INDEX " + indexName + "1 on " + dataTableName + " (val1) include (val2, val3)" + (async ? "ASYNC" : "")); conn.createStatement().execute("CREATE INDEX " + indexName + "2 on " + dataTableName + " (val2) include (val1, val3)" + (async ? "ASYNC" : "")); if (async) { IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "1"); IndexToolIT.runIndexTool(true, false, null, dataTableName, indexName + "2"); } IndexRegionObserver.setSkipDataTableUpdatesForTesting(true); IndexRegionObserver.setSkipPostIndexUpdatesForTesting(true); conn.createStatement().execute("upsert into " + dataTableName + " (id, val2) values ('a', 'abcc')"); 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'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "1"); ResultSet rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); selectSql = "SELECT val2, val3 from " + dataTableName + " WHERE val2 = 'abc'"; assertExplainPlan(conn, selectSql, dataTableName, indexName + "2"); rs = conn.createStatement().executeQuery(selectSql); assertTrue(rs.next()); assertEquals("abc", rs.getString(1)); assertEquals("abcdd", rs.getString(2)); assertFalse(rs.next()); conn.close(); }