{"record":{"id":"696a9cd5329237b1","repo":"influxdata/influxdb","slug":"num-row-groups-in-parallel-should-be-above-zero","errorCode":null,"errorMessage":"num_row_groups_in_parallel should be above zero","messagePattern":"num_row_groups_in_parallel should be above zero","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/parquet_file/src/storage.rs","lineNumber":246,"sourceCode":"            parquet_write_parallelization_settings: Default::default(),\n        }\n    }\n\n    /// Provide settings for parallelized writes. Settings determine the\n    /// amount of parallelization per row group and per column.\n    ///\n    /// # Panics\n    ///\n    /// This will panic if an invalid usize (not > 0) is used.\n    pub fn with_parallel_write_settings(\n        self,\n        num_row_group_writers: usize,\n        num_column_writers_across_row_groups: usize,\n    ) -> Self {\n        Self {\n            parquet_write_parallelization_settings: ParallelParquetWriterOptions::new(\n                NonZeroUsize::new(num_row_group_writers)\n                    .expect(\"num_row_groups_in_parallel should be above zero\"),\n                NonZeroUsize::new(num_column_writers_across_row_groups)\n                    .expect(\"num_columns_in_parallel should be above zero\"),\n            ),\n            ..self\n        }\n    }\n\n    /// Get underlying object store.\n    pub fn object_store(&self) -> &Arc<DynObjectStore> {\n        &self.object_store\n    }\n\n    /// Get ID.\n    pub fn id(&self) -> StorageId {\n        self.id\n    }\n\n    /// Fake DataFusion context for testing that contains this store","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/parquet_file/src/storage.rs#L228-L264","documentation":"This panic occurs in a builder method that configures how many row group writers the parquet writer should run in parallel. It converts the caller-supplied usize into a NonZeroUsize and panics via expect when the value is 0, because zero parallel row groups is meaningless for the writer pool.","triggerScenarios":"Calling the public builder (with_parquet_write_parallelization or equivalent on the storage options struct) passing num_row_group_writers = 0.","commonSituations":"Reading the parallelism level from config/env where a default of 0 slips through, or computing parallelism from a formula (e.g. num_cpus * factor) that yields 0 on constrained environments.","solutions":["Pass a num_row_group_writers value >= 1 when calling the builder","Clamp or default the value before the call, e.g. n.max(1)","Fix the config source so the parallelism setting cannot be 0"],"exampleFix":"// before\nlet opts = opts.with_row_group_writers(config.row_group_parallelism); // 0\n// after\nlet n = config.row_group_parallelism.max(1);\nlet opts = opts.with_row_group_writers(n);","handlingStrategy":"validation","validationCode":"assert!(num_row_group_writers > 0, \"num_row_group_writers must be > 0\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clamp parallelism settings with .max(1) before passing to builders","Validate parallelism config at startup, not at writer construction"],"tags":["panic","parquet","configuration","parallelism"],"backgroundTag":"invalid-config-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}