{"record":{"id":"f6ccdb848384905b","repo":"risingwavelabs/risingwave","slug":"storageerror-error","errorCode":null,"errorMessage":"StorageError {error}","messagePattern":"StorageError (.+?)","errorType":"exception","errorClass":"BindingError::Storage","httpStatus":null,"severity":"error","filePath":"src/jni_core/src/lib.rs","lineNumber":91,"sourceCode":"macro_rules! enable {\n    () => {\n        use risingwave_jni_core as _;\n    };\n}\n\npub static JAVA_BINDING_ASYNC_RUNTIME: LazyLock<Runtime> =\n    LazyLock::new(|| tokio::runtime::Runtime::new().unwrap());\n\n#[derive(Error, Debug)]\npub enum BindingError {\n    #[error(\"JniError {error}\")]\n    Jni {\n        #[from]\n        error: jni::errors::Error,\n        backtrace: Backtrace,\n    },\n\n    #[error(\"StorageError {error}\")]\n    Storage {\n        #[from]\n        error: anyhow::Error,\n        backtrace: Backtrace,\n    },\n\n    #[error(\"DecodeError {error}\")]\n    Decode {\n        #[from]\n        error: DecodeError,\n        backtrace: Backtrace,\n    },\n\n    #[error(\"StreamChunkArrayError {error}\")]\n    StreamChunkArray {\n        #[from]\n        error: ArrayError,\n        backtrace: Backtrace,","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/jni_core/src/lib.rs#L73-L109","documentation":"BindingError::Storage wraps an anyhow::Error raised by RisingWave storage code (Hummock state store, object store access) invoked through the JNI binding layer. It is displayed as 'StorageError {error}'. It surfaces whenever a JVM-exposed entry point initializes or touches the state/object store and the underlying storage operation fails for any reason (bad URL, unreachable endpoint, IO failure). execute_and_catch converts it into a thrown Java exception.","triggerScenarios":"Calling binding entry points that initialize the object store or read/write via Hummock (e.g. initObjectStoreForTest, Hummock read/write JNI methods) with a bad state_store_url, unreachable object store endpoint, or failing storage IO operation.","commonSituations":"Passing an unsupported or malformed state store URL (e.g. wrong s3:// bucket, missing minio endpoint) from Java; object store credentials missing or wrong; MinIO/S3 not running in the test environment; data directory invalid.","solutions":["Read the wrapped anyhow error message in the thrown Java exception — it contains the underlying storage failure (bad URL, connection refused, credentials)","Verify the state store URL scheme and endpoint are correct and the object store service is reachable from the process","For S3/MinIO, check credentials and region configuration before calling the binding","Use initObjectStoreForTest only with a supported hummock URL format (memory://, s3://, minio://)"],"exampleFix":"// before\nBinding.initObjectStoreForTest(\"s3://bad-bucket\", \"/data\"); // StorageError: endpoint unreachable\n// after\nBinding.initObjectStoreForTest(\"memory\", \"/tmp/rw-test-data\"); // or verify S3 endpoint/creds first","handlingStrategy":"try-catch","validationCode":"// Java, before initObjectStoreForTest\nif (url == null || url.isEmpty()) throw new IllegalArgumentException(\"state_store_url required\");\nif (!(url.startsWith(\"memory\") || url.startsWith(\"s3://\") || url.startsWith(\"minio://\")))\n    throw new IllegalArgumentException(\"unsupported state store url: \" + url);","typeGuard":null,"tryCatchPattern":"try {\n    Binding.initObjectStoreForTest(url, dir);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"StorageError\")) {\n        // log full report: contains underlying object-store cause (creds/endpoint/IO)\n    }\n    throw e;\n}","preventionTips":["Validate state store URL scheme/endpoint before initialization","Ensure the object store service (MinIO/S3) is reachable and credentials are set","Prefer \"memory\" state store for pure unit tests","Give the data directory a writable, existing path"],"tags":["storage","hummock","object-store","jni"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}