risingwavelabs/risingwave · warning
should not create local state from MockWaitEpochStateStore
Error message
should not create local state from MockWaitEpochStateStore
What it means
A deliberate `panic!` in `MockWaitEpochStateStore::new_local`. The mock only implements the wait-for-epoch-release behavior needed by DML executor tests; creating a local state store partition is unsupported and indicates the test setup used the mock beyond its intended scope.
Solutions
- Swap the mock for MemoryStateStore (or another StateStore with a real Local implementation) when the test needs local state.
- Keep MockWaitEpochStateStore only for tests that solely exercise epoch-wait semantics.
- Check new/refactored executor code paths that now call new_local and adjust the test fixture accordingly.
Example fix
// before let store = MockWaitEpochStateStore::new(...); let local = store.new_local(opts).await?; // panics // after let store = MemoryStateStore::new(); let local = store.new_local(opts).await?;
Defensive patterns
Strategy: validation
Validate before calling
// ensure the fixture provides a real Local store
let store: Arc<dyn StateStore> = if needs_local_writes {
Arc::new(MemoryStateStore::new())
} else {
Arc::new(MockWaitEpochStateStore::new(...))
}; Prevention
- Never call new_local on mocks; choose a store with a real Local impl.
- Review executor refactors for newly introduced new_local calls.
- Keep mock usage scoped to the single test that needs epoch-wait semantics.
When it happens
Trigger: Calling `StateStore::new_local` on a `MockWaitEpochStateStore`, e.g. when building a stream executor that needs a `StateStoreLocal` from the mock.
Common situations: Test scaffolding wires MockWaitEpochStateStore into a component that writes via a local store; a refactor makes a previously inert code path call new_local; copy-pasting executor test setups that require local writes.
Related errors
- should not create vector writer 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/e187ced8799e180c.
Report an issue: GitHub.
Appendix: source
Thrown at src/stream/src/executor/dml.rs:509
type Local = PanicStateStore;
type ReadSnapshot = PanicStateStore;
type VectorWriter = PanicStateStore;
async fn try_wait_epoch(
&self,
epoch: HummockReadEpoch,
options: TryWaitEpochOptions,
) -> StorageResult<()> {
if let Some(tx) = self.wait_epoch_called_tx.lock().unwrap().take() {
assert!(tx.send((epoch, options)).is_ok());
}
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();View on GitHub (pinned to 6469eb736d)