Autocomplete in 1.7.30 #3928
Replies: 8 comments 19 replies
-
I found suggester DBs for every project under the data directory, as well as the thesis, but it didn't help much in getting it to work :( |
Beta Was this translation helpful? Give feedback.
-
I'm totally lost with this. Apparently it works for some projects, but for others it doesn't. And for those projects that it does NOT work I see only WFST files in the suggester's project directory. I tried removing one of bad project directories and restarting Tomcat. It just regenerated WFST files (no version.txt, no search_count.db). I was adding some debug statements to see what's going on, and at some point after removing bad suggester project directory and restarting Tomcat it actually got regenerated correctly, with all the files. But subsequent attempt yielded the same problem with WFST only. |
Beta Was this translation helpful? Give feedback.
-
I think I see two Suggesters initialized and running in parallel from two threads once Tomcat is restarted:
You can see how the two threads are generating about the same WFST files for the same PROJECT at the same time. I wonder if this shouldn't happen? |
Beta Was this translation helpful? Give feedback.
-
Here are the stack traces. I don't do any API calls or run indexing in parallel. Just remove /opengrok/data/suggester/PROJECT and restart tomcat.
|
Beta Was this translation helpful? Give feedback.
-
I'm sorry the two threads running happened to be a misconfiguration. I had webapps/source-1.7.30 and then a webapps/source symlink, so Tomcat was starting two copies of the app. But after removing symlink it still cannot proceed past WFST init. It appears to be stuck in build(indexReader, "full") not taking any CPU. Added an Exception handler in SuggesterProjectData::build(). Nothing is getting thrown.
|
Beta Was this translation helpful? Give feedback.
-
It's never coming out of WSTCompletionLookup::build() for field="full" |
Beta Was this translation helpful? Give feedback.
-
Yeah, if I exclude "full" from the suggester config, it all completes successfully. Once it gets into build() for "full", java takes about 100% CPU and the stack varies. E.g.:
or
Then I see this message in catalina.out:
At this point the thread's dead and CPU inactive. It's worth mentioning again that control never leaves WFSTCompletionLookup::build(). IDK, can java throw something other than Exception? Can the thread just be killed? And the index is 3GB in total with individual files going up to 1.3GB. |
Beta Was this translation helpful? Give feedback.
-
So, to summarize, this ended up being a Tomcat misconfiguration. Suggester's index generator thread was silently killed due to OOM while generating WFST file for "full", so the /opengrok/data/suggester/PROJECT directory was left with partially generated files. And the solution was, as the Wiki says, pass a -Xmx8192M option to Tomcat during startup. Autocompletions do work now, and work really well. I think, they alone were well worth the upgrade. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
Hi,
Does autocomplete of the main form search fields require some special configuration?
I see a wheel briefly spinning when I type, I even see requests like below in the logs, but no results show up.
GET /source/api/v1/suggest?projects%5B%5D=PROJECT&field=path&full=&defs=&refs=&path=boost&hist=&type=&caret=3 HTTP/1.1" 200 95
There are definitely matches though (plenty of files starting with "boost"), and if I copy/paste the above URL in the browser, I get back this:
{"time":0,"suggestions":[],"identifier":"boostlqsbw","queryText":"boostlqsbw","partialResult":true}
If I search for a variable definition with a name starting with "ccc", the query and result look like this:
/source/api/v1/suggest?projects%5B%5D=PROJECT&field=defs&full=&defs=ccc&refs=&path=&hist=&type=&caret=3
{"time":0,"suggestions":[],"identifier":"cccmqtze","queryText":"cccmqtze","partialResult":true}
I'm not sure if the 5-letter junk at the end of queryText and identifier is there on purpose or not. Every time I resubmit GET, I get back different 5-letter combinations.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions