You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by si...@apache.org on 2021/04/17 00:47:25 UTC
[incubator-pinot] branch master updated: Add the refreshed segment
back into queue(#6796) (#6800)
This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new b44d4c2 Add the refreshed segment back into queue(#6796) (#6800)
b44d4c2 is described below
commit b44d4c225544be9d7af1b1bbcd06b46bc1bf8102
Author: Sharayu <ga...@gmail.com>
AuthorDate: Fri Apr 16 17:47:05 2021 -0700
Add the refreshed segment back into queue(#6796) (#6800)
---
.../tests/LuceneRealtimeClusterIntegrationTest.java | 19 ++++++++++---------
.../RealtimeLuceneIndexReaderRefreshThread.java | 3 ++-
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LuceneRealtimeClusterIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LuceneRealtimeClusterIntegrationTest.java
index 7b3fc0e..f90548e 100644
--- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LuceneRealtimeClusterIntegrationTest.java
+++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/LuceneRealtimeClusterIntegrationTest.java
@@ -42,6 +42,7 @@ import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
+import static org.testng.AssertJUnit.fail;
/**
@@ -197,15 +198,15 @@ public class LuceneRealtimeClusterIntegrationTest extends BaseClusterIntegration
Thread.sleep(100);
}
- // TODO: Fix Lucene index on consuming segments to update the latest records, then uncomment the following part
-// TestUtils.waitForCondition(aVoid -> {
-// try {
-// return getTextColumnQueryResult() == NUM_MATCHING_RECORDS;
-// } catch (Exception e) {
-// fail("Caught exception while getting text column query result");
-// return false;
-// }
-// }, 10_000L, "Failed to reach expected number of matching records");
+ //Lucene index on consuming segments to update the latest records
+ TestUtils.waitForCondition(aVoid -> {
+ try {
+ return getTextColumnQueryResult() == NUM_MATCHING_RECORDS;
+ } catch (Exception e) {
+ fail("Caught exception while getting text column query result");
+ return false;
+ }
+ }, 10_000L, "Failed to reach expected number of matching records");
}
private long getTextColumnQueryResult()
diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexReaderRefreshThread.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexReaderRefreshThread.java
index 7ad6bd6..1377b5e 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexReaderRefreshThread.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/invertedindex/RealtimeLuceneIndexReaderRefreshThread.java
@@ -134,6 +134,7 @@ public class RealtimeLuceneIndexReaderRefreshThread implements Runnable {
}
}
} finally {
+ _luceneRealtimeReaders.offer(realtimeReadersForSegment);
realtimeReadersForSegment.getLock().unlock();
}
}
@@ -146,4 +147,4 @@ public class RealtimeLuceneIndexReaderRefreshThread implements Runnable {
}
} // end while
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org