apache/cassandra · error · java.lang.RuntimeException

. has not finished building; node status is below.

Error message

%s.%s has not finished building; node status is below.

What it means

ViewBuildStatus polls every node's view build status for a materialized view. If any node reports the view as failed or not finished building, the command prints the per-node status table and throws a RuntimeException containing '%s.%s has not finished building; node status is below.'. It signals the view build did not complete cluster-wide.

Solutions

  1. Check the printed per-node status table to find which node(s) are not SUCCESS.
  2. If still building (IN_PROGRESS), wait and re-run; builds on large tables take a long time.
  3. Inspect system.log on failing nodes for view build errors; fix the underlying issue (restart node, repair, free disk).
  4. If the build is permanently stuck, drop and recreate the materialized view.
Defensive patterns

Strategy: retry

Validate before calling

// poll until build completes before treating as failure, with a deadline
long deadline = System.currentTimeMillis() + timeoutMs;
while (System.currentTimeMillis() < deadline) {
  if (runNodetoolCapture("viewbuildstatus", ks, view).contains("has finished building")) return;
  Thread.sleep(pollIntervalMs);
}

Try / catch

try { runNodetool("viewbuildstatus", ks, view); }
catch (RuntimeException e) {
  if (e.getMessage() != null && e.getMessage().contains("has not finished building")) {
    // inspect per-node status output; retry with backoff before escalating
  } else throw e;
}

Prevention

When it happens

Trigger: `nodetool viewbuildstatus <keyspace> <view>` while the view build is still in progress, or after a node failed its portion of the build (e.g. errors during backfill, node restarts mid-build).

Common situations: Impatiently polling a large view build still in progress; view build stalled because a replica was down; view build failure due to tombstone/timeouts during backfill after heavy writes.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/6f8f7d60b38f4ddb. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/tools/nodetool/ViewBuildStatus.java:91

        boolean failed = false;
        TableBuilder builder = new TableBuilder();

        builder.add("Host", "Info");
        for (Map.Entry<String, String> status : buildStatus.entrySet())
        {
            if (!status.getValue().equals(SUCCESS)) {
                failed = true;
            }
            builder.add(status.getKey(), status.getValue());
        }

        if (failed)
        {
            String message = String.format("%s.%s has not finished building; node status is below.", keyspace, view);
            out.println(message);
            out.println();
            builder.printTo(out);
            throw new RuntimeException(message);
        }
        else
            out.println(String.format("%s.%s has finished building", keyspace, view));
    }
}

View on GitHub (pinned to 88fd0f6a0e)