This is an automated email from the ASF dual-hosted git repository. siddteotia pushed a commit to branch hotfixtextindex in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 7e8963fb58325332651350e45ed87d8538f2125d Author: Siddharth Teotia <steo...@steotia-mn1.linkedin.biz> AuthorDate: Mon Oct 26 09:39:37 2020 -0700 Use docBase from leaf context for multi-segment search --- .travis/.travis_install.sh | 13 ++++++++++--- .travis/.travis_nightly_build.sh | 2 +- pinot-controller/src/main/resources/package.json | 5 +++-- .../segment/index/readers/text/LuceneDocIdCollector.java | 6 +++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.travis/.travis_install.sh b/.travis/.travis_install.sh index 5b676cc..40ec4bf 100755 --- a/.travis/.travis_install.sh +++ b/.travis/.travis_install.sh @@ -49,17 +49,24 @@ java -version if [ $noThirdEyeChange -ne 0 ]; then echo "Full Pinot build" echo "No ThirdEye changes" + +echo "Fixing git setup for $TRAVIS_BRANCH" +git checkout ${TRAVIS_BRANCH} +git branch -u origin/${TRAVIS_BRANCH} +git config branch.${TRAVIS_BRANCH}.remote origin +git config branch.${TRAVIS_BRANCH}.merge refs/heads/${TRAVIS_BRANCH} + if [ "$TRAVIS_JDK_VERSION" != 'oraclejdk8' ]; then # JDK 11 prints more logs exceeding Travis limits. - mvn clean install -B -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true ${DEPLOY_BUILD_OPTS} ${KAFKA_BUILD_OPTS} > /tmp/mvn_build_log + mvn clean install -B -DscmBranch="${TRAVIS_BRANCH}" -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true ${KAFKA_BUILD_OPTS} > /tmp/mvn_build_log if [ $? -eq 0 ]; then exit 0 else - tail -1000 /tmp/mvn_build_log + cat /tmp/mvn_build_log exit 1 fi else - mvn clean install -B -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true ${DEPLOY_BUILD_OPTS} ${KAFKA_BUILD_OPTS} || exit $? + mvn clean install -B -DscmBranch="${TRAVIS_BRANCH}" -DskipTests=true -Pbin-dist -Dmaven.javadoc.skip=true ${KAFKA_BUILD_OPTS} || exit $? fi fi diff --git a/.travis/.travis_nightly_build.sh b/.travis/.travis_nightly_build.sh index 602a4bf..27f9447 100755 --- a/.travis/.travis_nightly_build.sh +++ b/.travis/.travis_nightly_build.sh @@ -27,5 +27,5 @@ if [ -n "${DEPLOY_BUILD_OPTS}" ]; then mvn versions:commit -q -B # Deploy to bintray - mvn deploy -s .travis/.ci.settings.xml -DskipTests -q -DretryFailedDeploymentCount=5 -DaltDeploymentRepository=bintray-linkedin-maven::default::'https://api.bintray.com/maven/linkedin/maven/pinot/;publish=1;override=1' + mvn deploy -s .travis/.ci.settings.xml -DscmBranch="${TRAVIS_BRANCH}" -DskipTests -q -DretryFailedDeploymentCount=5 -DaltDeploymentRepository=bintray-linkedin-maven::default::'https://api.bintray.com/maven/linkedin/maven/pinot/;publish=1;override=1' fi diff --git a/pinot-controller/src/main/resources/package.json b/pinot-controller/src/main/resources/package.json index a05cb3b..6006a25 100644 --- a/pinot-controller/src/main/resources/package.json +++ b/pinot-controller/src/main/resources/package.json @@ -21,8 +21,6 @@ ] }, "devDependencies": { - "@types/react": "16.9.34", - "@types/react-dom": "16.9.6", "@typescript-eslint/eslint-plugin": "2.30.0", "@typescript-eslint/parser": "2.30.0", "clean-webpack-plugin": "^3.0.0", @@ -59,7 +57,10 @@ "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.51", "@types/codemirror": "0.0.97", + "@types/react-dom": "16.9.6", "@types/react-router-dom": "^5.1.5", + "@types/react-router": "^5.1.8", + "@types/react": "16.9.34", "axios": "^0.19.2", "codemirror": "^5.55.0", "cross-fetch": "^3.0.4", diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/text/LuceneDocIdCollector.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/text/LuceneDocIdCollector.java index b24667b..723dd00 100644 --- a/pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/text/LuceneDocIdCollector.java +++ b/pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/text/LuceneDocIdCollector.java @@ -67,7 +67,11 @@ public class LuceneDocIdCollector implements Collector { @Override public void collect(int doc) throws IOException { - _docIds.add(_docIdTranslator.getPinotDocId(doc)); + // even though we merge lucene sub-indexes, there could still be cases + // that can lead to multiple sub-indexes. For search on multiple + // sub-indexes, we need to use compute the absolute lucene docID across + // sub-indexes because that's how the lookup table in docIdTranslator is built + _docIds.add(_docIdTranslator.getPinotDocId(context.docBase + doc)); } }; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org