@@ -76,26 +76,20 @@ shardlord; he learns about them and starts the actual execution. At any time you
76
76
can cancel currently executing command, just send SIGUSR1 to the shardlord. This
77
77
is not yet implemented as a handy SQL function, but you can use cancel_cmd.sh
78
78
script from bin/ directory. All submitted cmds return unique command id which is
79
- used to check the cmd status later by querying shardman.cmd_log and
80
- shardman.cmd_opts tables:
79
+ used to check the cmd status later by querying shardman.cmd_log table:
81
80
82
81
CREATE TABLE cmd_log (
83
82
id bigserial PRIMARY KEY,
84
83
cmd_type cmd NOT NULL,
84
+ cmd_opts TEXT[],
85
85
status cmd_status DEFAULT 'waiting' NOT NULL
86
86
);
87
- CREATE TABLE cmd_opts (
88
- id bigserial PRIMARY KEY,
89
- cmd_id bigint REFERENCES cmd_log(id),
90
- opt text
91
- );
92
87
93
- We will unite them into convenient view someday. Commands status is enum with
94
- mostly obvious values ('waiting', 'canceled', 'failed', 'in progress',
95
- 'success', 'done'). You might wonder what is the difference between 'success'
96
- and 'done'. We set the latter when the command is not atomic itself, but
97
- consists of several atomic steps, some of which were probably executed
98
- successfully and some failed.
88
+ Commands status is enum with mostly obvious values ('waiting', 'canceled',
89
+ 'failed', 'in progress', 'success', 'done'). You might wonder what is the
90
+ difference between 'success' and 'done'. We set the latter when the command is
91
+ not atomic itself, but consists of several atomic steps, some of which were
92
+ probably executed successfully and some failed.
99
93
100
94
Currently cmd_log can be seen and commands issued only on the shardlord, but
101
95
that's easy to change.
0 commit comments