Commit Graph

10 Commits

Author SHA1 Message Date
Evan Tschannen 6e26ae2bb3 added a new multi_dc configuration 2017-09-01 15:45:27 -07:00
Alex Miller 0c7fd0a23d Unify and clarify interactive and --exec command error and parse error handling.
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.
2017-08-21 13:42:01 -07:00
Alex Miller d78b29625c Make fdbcli gracefully handle malformed and partial command errors.
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.
2017-08-15 17:49:39 -07:00
John King f6d282e66a change exclusions so that they calculate free space based on storage servers only 2017-08-11 17:20:28 -07:00
A.J. Beamon 9ce8d3ae4f Merge branch 'release-5.0' 2017-08-09 10:37:43 -07:00
A.J. Beamon c7402eb10c fix: call initSignalSafeUnwind in fdbcli and backup to avoid hangs in slow task profiling. 2017-08-07 15:55:08 -07:00
Yichi Chiang 6a8a5c41b0 Add a switch to turn off data distribution in CLI 2017-07-28 18:14:55 -07:00
Evan Tschannen 15cb498aa7 removed fast_recovery_double and fast_recovery_triple from the fdbcli 2017-06-23 16:18:23 -07:00
Alvin Moore b28ed397a2 Fixed printf field width specifier to reduce compilation warnings within OS X 2017-05-26 14:51:34 -07:00
FDB Dev Team a674cb4ef4 Initial repository commit 2017-05-25 13:48:44 -07:00