risingwavelabs/risingwave · warning
should not create vector writer from MockWaitEpochStateStore
Error message
should not create vector writer from MockWaitEpochStateStore
What it means
A deliberate `panic!` in `MockWaitEpochStateStore::new_vector_writer`. The mock does not implement vector writes; it exists solely to gate progress on epoch releases in DML executor tests. Attempting to create a vector writer means the test writes data through the mock, which is unsupported by design.
Solutions
- Inject test rows via a store that supports writers (e.g. MemoryStateStore) instead of the mock.
- Update MockWaitEpochStateStore's test usages if a new code path now requires vector writes.
- Restrict the mock to its epoch-wait-only role and move data setup to a real backing store.
Example fix
// before let writer = mock_store.new_vector_writer(opts).await?; // panics // after let writer = MemoryStateStore::new().new_vector_writer(opts).await?;
Defensive patterns
Strategy: validation
Validate before calling
// write test data via a supporting store, not the mock let writer = MemoryStateStore::new().new_vector_writer(opts).await?;
Prevention
- Never construct writers from mocks; use a real backing store for data setup.
- Re-check mock usage when new write APIs (like vector writers) are adopted.
- Restrict MockWaitEpochStateStore to gating epoch progress only.
When it happens
Trigger: Calling `StateStore::new_vector_writer` on a `MockWaitEpochStateStore`, e.g. when a test component tries to ingest data via the vector writer API.
Common situations: DML executor test setup that pipelines test rows through a vector writer; newer executor code paths adopting the vector-writer API and being plugged into the legacy mock.
Related errors
- should not create local state from MockWaitEpochStateStore
- should not read changelog from MockWaitEpochStateStore
- should not read snapshot from MockWaitEpochStateStore
- aggregate function is not supported
- All valid CDC connectors should have returned by now
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/49c4f69517e0fbdb.
Report an issue: GitHub.
Appendix: source
Thrown at src/stream/src/executor/dml.rs:521
let rx = self.wait_epoch_release_rx.lock().await.take().unwrap();
rx.await.unwrap();
Ok(())
}
async fn new_local(&self, _option: NewLocalOptions) -> Self::Local {
panic!("should not create local state from MockWaitEpochStateStore")
}
async fn new_read_snapshot(
&self,
_epoch: HummockReadEpoch,
_options: NewReadSnapshotOptions,
) -> StorageResult<Self::ReadSnapshot> {
panic!("should not read snapshot from MockWaitEpochStateStore")
}
async fn new_vector_writer(&self, _options: NewVectorWriterOptions) -> Self::VectorWriter {
panic!("should not create vector writer from MockWaitEpochStateStore")
}
}
#[tokio::test]
async fn test_dml_executor() {
let table_id = TableId::default();
let schema = Schema::new(vec![
Field::unnamed(DataType::Int64),
Field::unnamed(DataType::Int64),
]);
let column_descs = vec![
ColumnDesc::unnamed(ColumnId::new(0), DataType::Int64),
ColumnDesc::unnamed(ColumnId::new(1), DataType::Int64),
];
let stream_key = vec![0];
let dml_manager = Arc::new(DmlManager::for_test());
let (mut tx, source) = MockSource::channel();View on GitHub (pinned to 6469eb736d)