Skip to content

Changed auto generated index name - #503

Open
shubhamsrkdev wants to merge 11 commits into
mikemccand:mainfrom
shubhamsrkdev:changeIndexFileName
Open

Changed auto generated index name#503
shubhamsrkdev wants to merge 11 commits into
mikemccand:mainfrom
shubhamsrkdev:changeIndexFileName

Conversation

@shubhamsrkdev

@shubhamsrkdev shubhamsrkdev commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

The auto generated index name though informative is very long leading to errors like:

Could not start recording, not able to write to file /local/home/username/lucenebenchy/logs/baseline_vs_patch/2026.01.06.11.14.39/bench-index-baseline_vs_patch-wikimediumall.lucene_candidate.c
andidate.facets.taxonomy:Date.taxonomy:Month.taxonomy:DayOfYear.sortedset:Date.sortedset:Month.sortedset:DayOfYear.taxonomy:RandomLabel.sortedset:RandomLabel.Lucene90.Lucene104.dvfields.nd33.3326M.jfr. /local/home/username/lucenebenchy/logs/baseline_vs_patch/2026.01.06.11.14.39/bench-index-baseline_vs_patch-wikimediumall.lucene_candidate.candidate.facets.taxonomy:Date.taxonomy:Month.taxonomy:DayOfYear.sortedset:Date.sortedset:Month.sorted
set:DayOfYear.taxonomy:RandomLabel.sortedset:RandomLabel.Lucene90.Lucene104.dvfields.nd33.3326M.jfr: File name too long 
Error occurred during initialization of VM

This PR reduces the file name size and also added a metadata file to verify if the index is not reduced.

Fixes #198

Comment thread src/python/competition.py Outdated

@mikemccand mikemccand left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tackling this! It is super annoying when it strikes!

As a short-term workaround, you can tell your local Competition (or Index instance maybe) which index name you want to use, overriding this overly-verbose default.

@shubhamsrkdev
shubhamsrkdev marked this pull request as ready for review January 7, 2026 14:31
@shubhamsrkdev shubhamsrkdev changed the title Changed auto generated file name Changed auto generated index name Jan 7, 2026
@mikemccand

Copy link
Copy Markdown
Owner

Looks like you need a make tidy maybe? Or possibly make ruff-fix?

Comment thread src/python/competition.py Outdated
@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Feb 7, 2026

@mikemccand mikemccand left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, super close!

Comment thread src/python/competition.py Outdated
@github-actions github-actions Bot removed the Stale label May 27, 2026
Comment thread src/python/constants.py
JAVA_COMMAND = "%s -server -Xms2g -Xmx2g --add-modules jdk.incubator.vector -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC" % JAVA_EXE
else:
print("use java command %s" % JAVA_COMMAND) # pyright: ignore[reportUnboundVariable] # TODO: fix how variables are managed here
print("use java command %s" % JAVA_COMMAND) # pyright: ignore[reportUndefinedVariable] # TODO: fix how variables are managed here

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL this is so painful -- it fails on GitHub actions this way, but passes for our dev boxes. I go back and forth which is the lesser evil. And I wish we could explain why it's not consistent b/w our dev boxes and GitHub actions... we fix the version of basedpyright=1.29.0 in requirements.txt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was failing in the build on Github, shall we keep it like this?

Comment thread scripts/nrt.sh
# /root/jdk1.6.0_31/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

/opt/zing/zingLX-jdk1.6.0_31-5.2.0.0-18-x86_64/bin/java -verbose:gc -Xms40G -Xmx40G -cp .:$LUCENE_HOME/build/core/classes/java:$LUCENE_HOME/build/highlighter/classes/java:$LUCENE_HOME/build/test-framework/classes/java:$LUCENE_HOME/build/queryparser/classes/java:$LUCENE_HOME/build/suggest/classes/java:$LUCENE_HOME/build/analysis/common/classes/java:$LUCENE_HOME/build/grouping/classes/java perf.SearchPerfTest \
-indexPath /large/indices/wikimediumall.lucene4x.Lucene40.nd33.3326M/index \

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just noise/wrong? Since we turn it into hash, this new version (removing the Lucene40 part) won't be right either?

Comment thread src/main/IndexToFST.java Outdated
import org.apache.lucene.util.fst.Util;

// javac -cp lucene/core/build/libs/lucene-core-10.0.0-SNAPSHOT.jar IndexToFST.java; java -cp .:lucene/core/build/libs/lucene-core-10.0.0-SNAPSHOT.jar IndexToFST /l/indices/wikimediumall.trunk.facets.taxonomy:Date.taxonomy:Month.taxonomy:DayOfYear.taxonomy:RandomLabel.taxonomy.sortedset:Date.sortedset:Month.sortedset:DayOfYear.sortedset:RandomLabel.sortedset.Lucene90.Lucene90.dvfields.nd33.3326M/index
// javac -cp lucene/core/build/libs/lucene-core-10.0.0-SNAPSHOT.jar IndexToFST.java; java -cp .:lucene/core/build/libs/lucene-core-10.0.0-SNAPSHOT.jar IndexToFST /l/indices/wikimediumall.trunk.nd33.3326M/index

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noise?

Comment thread src/python/benchUtil.py
raise

# After successful indexing, write the config file
write_index_config(fullIndexPath, current_config)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assert can_reuse_index(...) here?

@mikemccand mikemccand left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very close! Thank you @shubhamsrkdev!

@github-actions

Copy link
Copy Markdown

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Jun 11, 2026
@github-actions github-actions Bot removed the Stale label Jun 13, 2026
@github-actions

Copy link
Copy Markdown

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make auto generated index name shorter

2 participants