-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
bugSomething isn't working rightSomething isn't working right
Description
There are 2 problems with the same root cause:
- There is an exception presented to the user before the correct message regarding the materialized view building progress:
Example:
(venv_dtest_3.8.6) raya@raya-Latitude-5421:~/scylla_repo/scylla-ccm(next)$ ccm node1 nodetool viewbuildstatus keyspace1 m_view
Traceback (most recent call last):
File "/home/raya/scylla_repo/scylla-ccm/ccm", line 75, in <module>
cmd.run()
File "/home/raya/scylla_repo/scylla-ccm/ccmlib/cmds/node_cmds.py", line 262, in run
stdout, stderr = self.node.nodetool(" ".join(self.args[1:]))
File "/home/raya/scylla_repo/scylla-ccm/ccmlib/scylla_node.py", line 662, in nodetool
return super().nodetool(*args, **kwargs)
File "/home/raya/scylla_repo/scylla-ccm/ccmlib/node.py", line 794, in nodetool
raise NodetoolError(" ".join(nodetool), exit_status, stdout, stderr)
ccmlib.node.NodetoolError: Nodetool command '/home/raya/.ccm/scylla-repository/unstable/master/latest/scylla-tools-java/bin/nodetool -h 127.0.0.1 -p 7100 viewbuildstatus keyspace1 m_view' failed; exit status: 1; stdout: keyspace1.m_view has not finished building; node status is below.
Host Info
127.0.0.2 STARTED
127.0.0.3 STARTED
127.0.0.1 STARTED
- Since the table of "Host" and "info" columns is presented in the exception stdout, the SUCCESS status is never presented.
When the materialized view fully built , only the following string is presented to the user:
" view has finished building"
According to official viewbuildstatus documentation:
viewbuildstatus - Shows the progress of a materialized view build.
For example:
nodetool viewbuildstatus my_keyspace my_view
my_view has not finished building; node status is below.
Host Info
55.40.72.17 STARTED
Output options:UNKNOWN - The host doesn’t know about that view.
STARTED - The host is building the view.
SUCCESS - The host has finished building the view.
Seems like the System.exit(1) code origin is from Cassandra. So we need to either remove the exception or to update the viewbuildstatus documentation page with this behavior.
System.out.println(String.format("%s.%s has not finished building; node status is below.", keyspace, view));
System.out.println();
builder.printTo(System.out);
System.exit(1);
} else {
System.out.println(String.format("%s.%s has finished building", keyspace, view));
System.exit(0);
Metadata
Metadata
Assignees
Labels
bugSomething isn't working rightSomething isn't working right