这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@captncraig
Copy link
Contributor

Instead of locking, use a channel, and a central indexing goroutine. If data channel overflows we lose some data points, but very few have new information anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Grrrr.... empty lines

@kylebrandt
Copy link
Member

I like the tests. I'm not sure we should be optimizing with a buffered chan unless this is solving an active problem. Does the CPU cycles outweigh the risk of unanticipated consequences or more difficult debugging? http://www.slideshare.net/cloudflare/a-channel-compendium

We definitely want to keep the tests either way. If you do go with the buffered channel, can we instrument its length and overflows with collect somehow?

@captncraig
Copy link
Contributor Author

We can instrument drops for sure. The whole reason for this is that pprof shows consistently hundreds of goroutines waiting on the search lock. Generally shouldn't have too high of a cost, but that many sockets held open any longer than necessary for search indexing seems unnecessary. Yes, we should definitely instrument overflows, but the idea is that occasional overflows are ok, since we should see metric/tag sets many many times.

@captncraig
Copy link
Contributor Author

redis migration should make this entirely different holding off for now.

@captncraig captncraig closed this Sep 17, 2015
@captncraig captncraig deleted the search branch November 4, 2015 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants