apache/beam · warning

RCSP : Invalid response type

Error message

RCSP {}: Invalid response type

What it means

In the Bigtable change streams connector, ReadChangeStreamPartitionAction can emit records of several types; when the action produces an output record whose type is not one of the recognized kinds, the connector logs a warning 'RCSP {}: Invalid response type' and returns empty, meaning that change stream response is dropped and not emitted downstream.

Solutions

  1. Upgrade the Beam google-cloud-platform IO module / connector to the latest version so all known response types are handled.
  2. Check Cloud Bigtable change stream behavior for the partition range in question (splits/merges during streaming).
  3. If data loss matters, re-run the affected partitions or restart the pipeline; the affected record is skipped, not retried.

Example fix

// before
connector = BigtableIO.readChangeStream().withProjectId(p).withInstanceId(i).withAppProfile("default");
// after
// pin/upgrade to a Beam release matching your Bigtable server behavior
connector = BigtableIO.readChangeStream().withProjectId(p).withInstanceId(i).withAppProfile("default"); // e.g. Beam 2.61+
Defensive patterns

Strategy: fallback

Type guard

if (response.getResponseTypeCase() == ResponseTypeCase.MUTATION || response.getResponseTypeCase() == ResponseTypeCase.HEARTBEAT) { handle(response); }

Try / catch

try { runPartition(record); } catch (IllegalStateException e) { LOG.warn("Unknown change stream response dropped", e); } // record is skipped by design; re-run partitions if data loss matters

Prevention

When it happens

Trigger: A mutation/response read from the Bigtable change stream (e.g. a Heartbeat, CloseStream, or unknown LogRecord variant) is not of the expected type at ChangeStreamAction.run, so the switch/if-chain matches no known type for the partition's ByteStringRange.

Common situations: Unexpected change stream records returned by Cloud Bigtable (new server-side record types, out-of-order CloseStream/Heartbeat handling), or connector version mismatch with the Bigtable server API behavior.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/0275dc73109ddc1e. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/changestreams/action/ChangeStreamAction.java:202

      // runner initiated checkpoints.
      if (!tracker.tryClaim(streamProgress)) {
        return Optional.of(DoFn.ProcessContinuation.stop());
      }
      if (changeStreamMutation.getType() == ChangeStreamMutation.MutationType.GARBAGE_COLLECTION) {
        metrics.incChangeStreamMutationGcCounter();
      } else if (changeStreamMutation.getType() == ChangeStreamMutation.MutationType.USER) {
        metrics.incChangeStreamMutationUserCounter();
      }
      Instant delay = toJodaTime(changeStreamMutation.getCommitTimestamp());
      metrics.updateProcessingDelayFromCommitTimestamp(
          Instant.now().getMillis() - delay.getMillis());

      // We are outputting elements with timestamp of 0 to prevent reliance on event time. This
      // limits the ability to window on commit time of any data changes. It is still possible to
      // window on processing time.
      receiver.outputWithTimestamp(outputRecord, Instant.EPOCH);
    } else {
      LOG.warn(
          "RCSP {}: Invalid response type", formatByteStringRange(partitionRecord.getPartition()));
    }
    return Optional.empty();
  }
}

View on GitHub (pinned to 12126d8942)