Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get the pid before stopping in optimize script #953

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

glguy
Copy link
Contributor

@glguy glguy commented Mar 29, 2023

Gets the PID before stopping fuseki so that it can tell if the stopping succeeded.

When I test this it successfully stops the service, however I'm getting an error from tdbstats that that doesn't seem related to my change.

Stopping Fuseki
Running tdbstats
org.apache.jena.sparql.ARQException: No such type: <http://jena.apache.org/2016/tdb#DatasetTDB2>
	at org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:140)
	at org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:132)
	at tdb2.cmdline.ModTDBDataset.createDataset(ModTDBDataset.java:81)
	at arq.cmdline.ModDataset.getDataset(ModDataset.java:35)
	at tdb2.cmdline.CmdTDB.getDataset(CmdTDB.java:77)
	at tdb2.cmdline.CmdTDB.getDatasetGraph(CmdTDB.java:69)
	at tdb2.tdbstats.exec(tdbstats.java:94)
	at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87)
	at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56)
	at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43)
	at tdb2.tdbstats.main(tdbstats.java:43)
Now printing the contents of stats.opt:
cat: /etc/fuseki/databases/RACK/stats.opt: No such file or directory

@weisenje
Copy link
Contributor

This is most likely fallout from updating to TDB2 (#951) @tuxji

@tuxji
Copy link
Contributor

tuxji commented Mar 29, 2023

This is most likely fallout from updating to TDB2 (#951)

I agree. Likely you tested with an old RACK still using tdb, but your cli/optimize.sh is already running tdb2.tdbstats.

@glguy
Copy link
Contributor Author

glguy commented Mar 29, 2023

OK, that makes sense. I have to manually rebuild my rack docker image to get the aarch64 build, so I'm not always on the latest revision there. In that case I think this change is ready to go.

@glguy glguy merged commit 8629e11 into master Mar 29, 2023
@glguy glguy deleted the optimize_script_kill branch March 29, 2023 20:07
@weisenje
Copy link
Contributor

I tested via the Docker RACK UI and am seeing consistently successful restarts and optimizations.

@glguy Just checking that you do not also want to make the same change in restart-fuseki.sh as you made in optimize.sh? These have mirrored each other in the past.

@glguy
Copy link
Contributor Author

glguy commented Mar 30, 2023

We either need them in both places or neither places. It's possible that something has changed and fuseki restarts fine on its own now, but also it's easy for the restart script to report no error and not actually restart anything.

@weisenje
Copy link
Contributor

Got it - so you will make restart-fuseki.sh match optimize.sh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants