You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks down HTTP accelerators (and probably various web-crawlers, too), which cache error pages momentarily (seconds), but non-error pages for an extended period of time (minutes or hours), where such OpenGrok error pages will be cached extensively, instead of being expired promptly. Plus web-crawlers might update its index, instead of ignoring the result, and trying back later.
With "Index database(s) not found.", a non-200 http status code should be returned instead, probably 503 Service Unavailable.
The text was updated successfully, but these errors were encountered:
In web/search.jsp after prepareExec has been called we can either redirect to prepared 503 error page or set the error code based on the searchHelper.errorMsg contents somehow (I am not a JSP expert to tell which one is possible/feasible).
Since #1132 it is no longer easy to trigger this problem since index references are now cached so moving index directory away will not break the search because the file remains open. To reproduce this, one has to go and move the index directory away and then redeploy. Bunch of null pointer exceptions happen then :-)
When the index database is temporarily gone, OpenGrok returns
"Index database(s) not found."
(https://github.com/OpenGrok/OpenGrok/blob/master/src/org/opensolaris/opengrok/web/SearchHelper.java) with a200 OK
HTTP status code.This breaks down HTTP accelerators (and probably various web-crawlers, too), which cache error pages momentarily (seconds), but non-error pages for an extended period of time (minutes or hours), where such OpenGrok error pages will be cached extensively, instead of being expired promptly. Plus web-crawlers might update its index, instead of ignoring the result, and trying back later.
With
"Index database(s) not found."
, a non-200 http status code should be returned instead, probably503 Service Unavailable
.The text was updated successfully, but these errors were encountered: