cube-js/cube · error
not used
Error message
not used
What it means
The partition method on this store implementation is explicitly unimplemented: it panics with 'not used' because partition creation for this backend goes through build_index_chunks / repartition paths instead of the trait's partition(_wal_id) entry point. Hitting it means an internal code path called a method that should never be invoked.
Source
Thrown at rust/cubestore/cubestore/src/store/mod.rs:440
#[async_trait]
impl ChunkDataStore for ChunkStore {
async fn partition_data(
&self,
table_id: u64,
rows: Vec<ArrayRef>,
columns: &[Column],
in_memory: bool,
) -> Result<Vec<ChunkUploadJob>, CubeError> {
let indexes = self
.meta_store
.get_table_indexes_out_of_queue(table_id)
.await?;
self.build_index_chunks(table_id, &indexes, rows.into(), columns, in_memory)
.await
}
async fn partition(&self, _wal_id: u64) -> Result<(), CubeError> {
panic!("not used");
}
async fn repartition(&self, partition_id: u64) -> Result<(), CubeError> {
let (partition, index, table, _) = self
.meta_store
.get_partition_for_compaction(partition_id)
.await?;
if partition.get_row().is_active() {
return Err(CubeError::internal(format!(
"Tried to repartition active partition: {:?}",
partition
)));
}
let chunks = self
.meta_store
.get_chunks_by_partition(partition_id, false)
.await?View on GitHub (pinned to 7d981676b3)
Solutions
- Use the supported ingestion/compaction APIs (build_index_chunks / repartition) rather than partition
- Upgrade to an official CubeStore build where WAL handling does not call this method
- File a bug with the call stack if reached during normal operation
Defensive patterns
Strategy: fallback
Validate before calling
// avoid custom paths that call partition() directly; prefer supported ingestion if (typeof store.partition === 'function' && isOfficialBuild) use supportedIngestionPath(); else useRepartitionPath();
Try / catch
// in custom Rust integrations, intercept before calling the trait method
async fn safe_partition(store: &dyn PartitionTraits, wal_id: u64) -> Result<(), CubeError> {
Err(CubeError::internal("partition() unsupported for this store; use repartition/build_index_chunks"))
} Prevention
- Use official CubeStore builds and public APIs only
- Route WAL work through replay/repartition paths, not partition()
- Review custom patches for calls to unimplemented trait methods
- Add integration tests covering ingestion and compaction flows
When it happens
Trigger: Calling partition(_wal_id) directly or an internal flow (e.g. WAL replay invoking partition) that the implementation does not support — any code path expecting this store trait impl to partition raw WAL data.
Common situations: Custom code or a modified CubeStore build invoking the PartitionTraits partition method directly; a bug where WAL replay routes work to the unimplemented method.
Related errors
- Does not work for standalone mode yet
- impossible
- Unexpected value: {:?}
- This query doesnt have a plan, because it already has values
- Should be rewritten with UtcTimestamp function
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/a3b6115c9a1b581a.
Report an issue: GitHub.