Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Sugu Sougoumarane 07476db53b streamlog: simplify code
The first dataQueue channel doesn't serve any purpose now.
It was initially needed because the first send used to be non-blocking,
and the subsequent ones used to block. However, the non-blocking part
was later moved to the second stage.
With dataQueue removed, the code is much simpler now.
2015-10-04 11:55:45 -07:00
Sugu Sougoumarane 59a20a7a57 streamlog: increase subscriber channel size
The go runtime schedules goroutines in any order. This means that
multiple sends can happen on a buffered channel before a runnable
receiver goroutine gets scheduled. This could cause dropped messages
even on an uncontended system.
This seems to happen very frequently for streamlog where the channel
size is 1. For now, I'm increasing this to match the original sender
channel size. Hopefully, this will lead to fewer dropped messages.
2015-10-03 20:40:46 -07:00
Michael Berlin 168588e279 Detect flaky unit tests based on their suffix _flaky_test.go.
Renamed all flaky unit tests.

Removed previous blacklist file because it's no longer necessary.

Moved custom unit test runner from travis/ to tools/.
2015-08-30 22:28:14 -07:00
Alain Jobart 76166745a5 Fixing test flakiness. 2015-07-17 14:07:48 -07:00
Peter Lobsinger 485f072c72 Don't internally drop messages in the streamlogger.
The writers have individual backoff, and internal drops can result in
not-insignificant losses during query storms. These are lost simply due
to noise in the Go scheduler, not due to actual backlog.
2014-12-02 18:45:09 -08:00
Peter Lobsinger b3b1702f1a Add positive-result counters to streamlog.
It would be useful to consider drop counts as a fraction.
2014-10-19 20:57:22 -07:00
Peter Lobsinger e47a1de171 Fixup streamlog test.
If we're more synchronous, we can be less flaky. ServiceManagement is
too heavyweight for what we're trying to accomplish in this test.

Also discovered that the ServeLogs handler doesn't return to the client
until it serves the first method (this broke a test rewrite). This has
been annoying me anyways on some low-traffic servers, so fixing that was
a nice pickup.
2014-10-19 20:51:34 -07:00
Peter Lobsinger 74d61aa340 Remove StreamLogger.size.
This value optimises for the wrong case: the case where the feature is
unused. If a feature is inefficient, the correct approach is not to
optimise for avoiding its use, but to resolve the inefficiency.

Additionally, the common case is for this feature to be used. We have
found it useful to have an always-on querylog. We have found it to be
reasonably efficient.

This "optimisation" was added with the first iteration of this feature
and likely falls into the category of premature optimisation.

TODO(plobsing): eliminate flakiness and sleepy races in the
streamlog_test.
2014-10-19 14:55:26 -07:00
Peter Lobsinger 72e723b582 Distinguish log drop counts between internal and per-client.
If you're seeing drops, it would be nice to know what is slow.
2014-10-19 13:35:35 -07:00
Anthony Yeh a91d8823ad Add or fix package comments for reusable packages. 2014-09-24 14:35:23 -07:00
Anthony Yeh 15ce7fa594 Allow ServiceManager function to return an error. 2014-08-15 13:49:00 -07:00
Anthony Yeh 6b8d690a7c Add ServiceContext to isolate internal and external ServiceManager APIs. 2014-08-15 12:50:10 -07:00
Sugu Sougoumarane a2c91fd861 query service: policy checks for URLs
Also added a falllback policy that denies
all access if the requested policy could not
be found.
2014-05-20 19:43:32 -07:00
Peter Lobsinger 91b89b995f Fix streamlog test for API change. 2014-05-16 13:32:06 -07:00
Peter Lobsinger 7cc6b3d711 Avoid serializing to string in streamlog.
Some log consumers wish to receive structured messages. This is best
evidenced by the logz handlers parsing the message strings they receive.
2014-05-13 13:15:39 -07:00
Sugu Sougoumarane d8e7e15af9 delete obsolete hourglass
and some misc test fixes.
2014-03-11 11:49:49 -07:00
Sugu Sougoumarane 836aa3174e querylogz 2014-02-18 20:25:55 -08:00
Sugu Sougoumarane 763a1dd8ee Improved streamlogger.
Simplified the streamlogger code.
Extended it to allow for local non-http subscribers.
Added tests.
The non-http subscription will be used for additional
monitoring and status reporting.
2014-02-16 11:02:54 -08:00
Sugu Sougoumarane a660b302ec expvar -> stats phase 3 2013-08-15 10:45:45 -07:00
Ryszard Szopa cead93c364 Automatic rewrite of relog import paths and calls to use glog.
Commands run:

  find go -name "*.go" | xargs sed --in-place -r 's,"github.com/youtube/vitess/go/relog",log "github.com/golang/glog",g; s,relog.Info,log.Infof,g; s,relog.Warning,log.Warningf,g; s,relog.Error,log.Errorf,g; s,relog.Fatal,log.Fatalf,g; s,relog.Debug,log.V(6).Infof,g'
  find . -name '*.go' -exec gofmt -w {} \;
2013-08-06 14:56:00 -07:00
Ryszard Szopa 0d046a5984 Replace code.google.com with github.com/youtube/vitess. 2013-07-18 18:18:20 -07:00
Sugu Sougoumarane 6fc32af99f new feature: transaction log, and simplified stats urls 2013-04-18 10:34:04 -07:00
Sugu Sougoumarane 85fd9dff0f selflessness and atomic normalization 2013-04-10 15:43:10 -07:00
Ric Szopa bcaa39d322 Decouple streamlogger registration from serving logs. 2013-01-09 12:49:24 -08:00
Ric Szopa cc3c447603 Make streamlog publish unfiltered data. 2013-01-09 12:49:16 -08:00
Ric Szopa 2e870a8cfd Fix bugs in streamlog, resurrect streamlog.Stringer. 2012-09-07 14:01:08 -07:00
Ric Szopa 6fc495658e streamlog: on demand logging through http 2012-09-06 16:36:36 -07:00