This makes `kill` and `profile` behave like how `exclude` functions, and means
commands don't have to change depending on TLS status.
Verified via starting a TLS cluster and killing a process before and after this change.
* 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.
This counter is used to print a warning in fdbcli if there are incompatible peers.
Example Output:
./fdbcli
Using cluster file `fdb.cluster'.
WARNING: Incompatible peers exist.
The database is unavailable; type `status' for more information.
Welcome to the fdbcli. For help, type `help'.
fdb> status
WARNING: Incompatible peers exist.
Using cluster file `fdb.cluster'.
Could not communicate with a quorum of coordination servers:
127.0.0.1:4000 (unreachable)
* Fixed fdbcli to be more idiomatic.
* Removed is_binary_serializable in favor of std::is_pod<>
* Removed custom enable_if<> in favor of std::enable_if<>
* Removed HEY REVIEWER comments
* Removed print from prof.py
* Added FLOW_PROFILER_ENABLED=yes to circus components that wished to enable the flow profiler.
This adds the fdbcli commands:
* profile list -- Lists all workers in a way that doesn't fill `kill`'s list.
* profile flow run -- Allows starting flow profiling on a set of hosts for a specified interval.
And threads through all the support for enabling and disabling profiling as an RPC.
Previously, interactive execution and --exec used two models for how a failed
command would impact other commands in the execution.
As an example, consider:
fdb> set foo bar ; set bar f\00 ; set baz foo
In interactive mode, this had the effect of {foo=bar, baz=foo}.
In --exec mode, this had the effect of {foo=bar}.
With this change, both now have the effect of {foo=bar}. This is achieved by
prefixing the last parsed command, which is the one that had the error, with a
fake "parse_error" token.
The execution of this would now look like:
ERROR: malformed escape sequence
>>> set foo bar
ERROR: Command failed to completely parse.
ERROR: Not running partial or malformed command: set bar
Which indicates how much execution occurred and where it halted, identically in
both modes of execution.
Previously, running a command like `set \xffx\02abcded/` would cause a crash.
The `x\02` is a malformed typo of `\x02`, and the previously existing code to
handle this case looks like
loop {
err = parse_command
if (err) continue;
// do things
}
Thus, if we hit an error, we'd go back to the top of the loop, and try again.
This should be an infinite loop. However, the actor compiler implementation of
loops involves function calls, so this actually turns into a series of the loop
head calling the loop body calling the loop head calling ... and we eventually
crash due to running out of stack.
This is now fixed by simply letting the code continue on to the check later
that does
if (there was an error) {
print nasty message
return error
}
With output that looks like
ERROR: malformed escape sequence
WARNING: the previous command failed, the remaining commands will not be executed.
And therefore the world becomes a happy place.