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
x/tools/cmd/godoc: frequent “Indexing in progress” failures #24965
Comments
(CC: @stamblerre @alandonovan) |
I’ve also been seeing this more frequently lately and would appreciate a fix. |
I'm actually not familiar with this codebase, but I can look into it. |
@stamblerre I was looking around this code for an unrelated search proposal I'm working on so I figured I'd post some notes to make myself useful in case my proposal falters. I believe the message is set here:
It looks like a reindex happens every 5 minutes: initialization (not set), usage (use default). This is actually surprising to me since I recall getting the indexing message multiple times in a 10 minute window in what I remember to be off hours. So it's hard to believe that the filesystem is actually changing. Looks like
That might just be removing the
Maybe use a channel which |
That is correct. There was a separate issue (#7524) which tracked changing this to respond to filesystem changes. But that was closed deciding that controlling the index_interval with the flag is good enough.
Yes, looks like it. I agree that we should just return stale data instead of returning an error. But then, this is for golang.org. So when it is deployed, it just indexes the standard library. There is no user code here. So, essentially nothing ever changes and we are just re-indexing anyways. I would suggest setting the index_interval to 1 week or something. So that it effectively becomes a non-issue. /cc @andybons |
/cc @broady who was just playing around with godoc. |
Was going through the godoc flags today and realised that a negative |
Closing. Please re-open if you see this on golang.org again. Indexing happens as part of the deployment process, so this message shouldn't ever be seen. Edit: shouldn't have been so hasty to close. There's a minor race condition. RunIndexer is called in a goroutine, so between the first call to c.UpdateIndex() and the sever starting, users will see this message. With the move to flex, this won't be seen almost at all in practice, but on the old deployment which was OOMing, basically only a single request would be handled before OOM so the chances of seeing this error was high. |
@broady - I mean it's not a race condition "per se". Because the access is mutex protected. Still, this I don't see any obvious way around this, unless you want to make |
It's a race between Yes, in production mode, UpdateIndex should be synchronous (i.e., happen before incoming requests are handled). That said, it doesn't really matter very much (see the last para in my previous comment). |
Change https://golang.org/cl/148998 mentions this issue: |
@broady, do we still ship a pre-built index for golang.org on Flex? |
Yep, the index is built as part of the build process. We don't use a
spliced zip for goroot anymore.
…On Mon, Nov 12, 2018, 8:26 AM Brad Fitzpatrick ***@***.*** wrote:
@broady <https://github.com/broady>, do we still ship a pre-built index
for golang.org on Flex?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24965 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABhlq8XqY5Zlbn3S7DBB5uRgz56DUA1ks5uuaD-gaJpZM4Tc5sI>
.
|
Change https://golang.org/cl/150685 mentions this issue: |
On some large fraction of queries to https://golang.org/search, I get an empty results page like the one shown below. If I reload, the error goes away.
It's the server's responsibility to find data to serve: we shouldn't push that off on the user. If indexing usually finishes quickly, we should just wait to serve the page until it's ready. Otherwise, we should prefer to serve stale data instead of an unhelpful error.
The text was updated successfully, but these errors were encountered: