gokceni commented on a change in pull request #550: PHOENIX-5348: Fix flaky 
test: testIndexRebuildTask
URL: https://github.com/apache/phoenix/pull/550#discussion_r312677426
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/schema/task/Task.java
 ##########
 @@ -230,7 +232,20 @@ public static void deleteTask(PhoenixConnection conn, 
PTable.TaskType taskType,
                 taskQuery += " AND " + PhoenixDatabaseMetaData.TASK_DATA + " 
LIKE '%" + indexName + "%'";
             }
 
-        return populateTasks(connection, taskQuery);
+            List<TaskRecord> taskRecords = populateTasks(connection, 
taskQuery);
+            List<TaskRecord> result = new ArrayList<TaskRecord>();
+            if (ts != null) {
+                // Adding TASK_TS to the where clause did not work. It returns 
empty when directly querying with the timestamp.
+                for (TaskRecord tr : taskRecords) {
 
 Review comment:
   @ChinmaySKulkarni Your previous comments about uniquely getting a task made 
me question about task query. I realized that there might be a case where we 
have tasks for the same index and table but with a different timestamp. I 
change the code to handle that.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to