Commit Graph

36 Commits

Author SHA1 Message Date
Evan Tschannen 1c29275672 call all methods which could disable a trace event before it is initialized. In practice this means calling .error first, then .suppressFor, then all your details. 2018-08-01 14:30:57 -07:00
Evan Tschannen 5054c194e2 Some trace events are logged before FLOW_KNOBS are initialized 2018-07-01 14:30:37 -04:00
A.J. Beamon a680837ee4 The Machine field was missing in early trace events. The logGroup field was not being properly set. 2018-06-28 15:28:58 -07:00
A.J. Beamon 1ff42e078f Add missing include for Windows, remove throw from TraceEvent destructor. 2018-06-28 14:59:23 -07:00
A.J. Beamon cbc840ad0a Move the spammy trace event backstop from the destructor to the constructor. This allows us to avoid doing needless work on a trace event that is going to be throttled. 2018-06-27 15:51:30 -07:00
A.J. Beamon fe956bc35a Address review comments 2018-06-26 14:37:21 -07:00
A.J. Beamon f965954122 Merge commit '82be52205b95464e355c449fdf3e7d483fa06677' into trace-log-refactor
# Conflicts:
#	fdbserver/Status.actor.cpp
#	fdbserver/workloads/DDMetrics.actor.cpp
#	flow/Trace.cpp
2018-06-08 16:22:22 -07:00
A.J. Beamon 06ccd9a500 Allow trace event type names to end with an underscore. 2018-06-08 15:49:31 -07:00
A.J. Beamon 1fdfe20908 Relax the rules on trace event Types a bit by allowing multiple underscores, as well as starting with an underscore and consecutive underscores. 2018-06-08 15:40:29 -07:00
A.J. Beamon 0ca51989bb Merge branch 'master' into trace-log-refactor
# Conflicts:
#	fdbserver/QuietDatabase.actor.cpp
#	fdbserver/Status.actor.cpp
#	flow/Trace.cpp
2018-06-08 13:24:30 -07:00
A.J. Beamon e5488419cc Attempt to normalize trace events:
* Detail names now all start with an uppercase character and contain no underscores. Ideally these should be head-first camel case, though that was harder to check.
* Type names have the same rules, except they allow one underscore (to support a usage pattern Context_Type). The first character after the underscore is also uppercase.
* Use seconds instead of milliseconds in details.

Added a check when events are logged in simulation that logs a message to stderr if the first two rules above aren't followed.

This probably doesn't address every instance of the above problems, but all of the events I was able to hit in simulation pass the check.
2018-06-08 11:11:08 -07:00
A.J. Beamon 3ea5fc72f0 Rename trace file logGroup attribute to LogGroup 2018-05-31 15:34:17 -07:00
A.J. Beamon f1dea3bed9 Rework the formatter a bit and extract out the writing logic so that it could be pluggable. 2018-05-31 13:27:35 -07:00
A.J. Beamon f7735d000f Fix linking issue in flow bindings by using a different variant of printable(). 2018-05-31 11:16:01 -07:00
A.J. Beamon 78839b20fd Merge branch 'master' into trace-log-refactor
# Conflicts:
#	flow/Trace.cpp
2018-05-31 10:46:20 -07:00
A.J. Beamon e2e69b5632 Rework how rolled events are logged. Not very efficient, but it doesn't modify the cached version returned in queries. 2018-05-11 11:24:20 -07:00
A.J. Beamon fe1c9d5be4 Make the trace log formatter reference counted. 2018-05-09 14:35:15 -07:00
A.J. Beamon 047563aa62 Support trace event overflow. 2018-05-04 15:19:56 -07:00
A.J. Beamon 2a46fdb31d Change formatv to vsformat, which now returns the length of the string (or <0 for error) and takes the output string as an argument. 2018-05-04 13:35:25 -07:00
A.J. Beamon ce0c991e78 Refactor trace events to store a vector of fields that aren't encoded until write time. Better support for pre-network trace events. Rework how trace events are queried. Some initial work towards pluggable formatting of logs. 2018-05-02 10:44:38 -07:00
A.J. Beamon 62726efa82 Add support for logging trace events before the network is created and the trace log opened. 2018-03-28 08:21:22 -07:00
Evan Tschannen 5db52ab081
Merge pull request #87 from etschannen/feature-remote-logs
Feature remote logs
2018-03-23 12:55:17 -07:00
Evan Tschannen 59723f51f8 fix: continue to attempt to lock logs until remote logs are recovered, this is so that remote logs get locked and readers know they will not have any more data
do not throttle trace events in simulation
2018-03-14 12:39:55 -07:00
Alec Grieser 70a05c1a9b
fix some compiler whinges 2018-03-13 15:00:16 -07:00
Alec Grieser e1162e9238 Merge remote-tracking branch 'upstream/release-5.1' 2018-02-22 11:16:12 -08:00
Alec Grieser 0bae9880f1 remove trailing whitespace from our copyright headers ; fixed formatting of python setup.py 2018-02-21 10:25:11 -08:00
Evan Tschannen dc93759e15 suppressed trace events that are spammy 2018-02-16 16:01:19 -08:00
A.J. Beamon 03501fc26c TraceEvent::type is set in init so that it works for TraceIntervals too. ASSERT that the type is non-empty. 2018-02-13 13:29:08 -08:00
Alex Miller 1488c12c18 Simulation will return and error and print if any non-suppressed SevError events were logged.
This means that loops like `seed=1; while ./fdbserver -r simulation -s $seed;
do seed=$(($seed+1)); done` to find an example of an often failing test.  This
also means joshua will report ExitCode errors on anything that has a SevError
in the log.

As a part of this, we also implicitly downgrade any injected errors to SevWarnAlways.
2017-12-19 17:17:50 -08:00
A.J. Beamon 313e823629 Delete TDMetric data (tmpEventMetric) when a trace event is throttled. 2017-11-13 15:06:21 -08:00
Balachandar Namasivayam 80e5fecfe2 Increase message limit for throttling to 100,000 for circus runs.
Added an optimization to use a separate set for throttled events. Since this set is expected to be small, comparison of every event against this set is going to be cheaper.
2017-10-31 10:35:26 -07:00
Balachandar Namasivayam 1d3c88c147 Increase the spammy trace event threshold to 20000 in 20 minutes. 2017-10-27 12:22:56 -07:00
Balachandar Namasivayam 3aaa11977e Addressed Review Comments 2017-10-12 14:56:00 -07:00
Balachandar Namasivayam 0e153cdd35 Throttle Spammy logs. Three knobs are added.
Trace Events are sampled and cached with an expiration set. Every TraceEvent above SevDebug is checked against this cache to see if it exceeded a set threshold. If yes, then throttle the TraceEvent.
If a TraceEvent is throttled, a warning msg is logged.
2017-10-02 18:43:11 -07:00
A.J. Beamon d30c730f75 Add the ability to access name and description in Error. Update error descriptions. 2017-09-28 12:35:03 -07:00
FDB Dev Team a674cb4ef4 Initial repository commit 2017-05-25 13:48:44 -07:00