You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
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);
The text was updated successfully, but these errors were encountered:
rayakurl
changed the title
viewnodebuildstatus nodetool command throws an exception during materialized view building in progress
viewbuildstatus nodetool command throws an exception during materialized view building in progress
Feb 10, 2022
@rayakurl it seems you added (in dtest commit 8fac9535b) dtests for nodetool viewbuildstatus (in materialized_views_test.py), and discovered this bug, but left it out of the test. As far as I can tell, the dtests we have focus on checking the individual host status before view building completes, and only check the first line when it becomes the success (after view building completes), so it misses this bug. I guess intentionally? (to have only passing tests)
There are 2 problems with the same root cause:
Example:
When the materialized view fully built , only the following string is presented to the user:
" view has finished building"
According to official viewbuildstatus documentation:
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.
The text was updated successfully, but these errors were encountered: