{"record":{"id":"81d8e559fda184d4","repo":"apache/seatunnel","slug":"append-only-table-currently-do-not-support-dynamic","errorCode":null,"errorMessage":"Append only table currently do not support dynamic bucket","messagePattern":"Append only table currently do not support dynamic bucket","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java","lineNumber":177,"sourceCode":"                (IOManagerImpl)\n                        IOManager.create(splitPaths(paimonSinkConfig.getChangelogTmpPath()));\n        this.newTableWrite();\n        BucketMode bucketMode = this.paimonTable.bucketMode();\n        // https://paimon.apache.org/docs/master/primary-key-table/data-distribution/#dynamic-bucket\n        // When you need cross partition upsert (primary keys not contain all partition fields),\n        // Dynamic Bucket mode directly maintains the mapping of keys to partition and bucket, uses\n        // local disks, and initializes indexes by reading all existing keys in the table when\n        // starting job. For tables with a large amount of data, there will be a significant loss in\n        // performance. Moreover, initialization takes a long time. This mode is not supported at\n        // this time.\n        if (BucketMode.CROSS_PARTITION == bucketMode) {\n            throw new UnsupportedOperationException(\n                    \"Cross Partitions Upsert Dynamic Bucket Mode is not supported.\");\n        }\n        this.dynamicBucket = BucketMode.HASH_DYNAMIC == bucketMode;\n        int bucket = paimonTable.coreOptions().bucket();\n        if (bucket == -1 && BucketMode.BUCKET_UNAWARE == bucketMode) {\n            log.warn(\"Append only table currently do not support dynamic bucket\");\n        }\n        if (dynamicBucket) {\n            paimonBucketAssignerFactory.init(paimonTablePath, paimonFileStoretable, parallelism);\n        }\n        PaimonSecurityContext.shouldEnableKerberos(paimonHadoopConfiguration);\n    }\n\n    public PaimonSinkWriter(\n            Context context,\n            ReadonlyConfig readonlyConfig,\n            CatalogTable catalogTable,\n            Table paimonFileStoretable,\n            String commitUser,\n            List<PaimonSinkState> states,\n            JobContext jobContext,\n            PaimonSinkConfig paimonSinkConfig,\n            PaimonHadoopConfiguration paimonHadoopConfiguration,\n            PaimonBucketAssignerFactory paimonBucketAssignerFactory) {","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java#L159-L195","documentation":"In PaimonSinkWriter construction, if the table's bucket mode is BUCKET_UNAWARE (append-only, no bucket assignment) and bucket = -1 (dynamic), the writer warns that append-only tables do not support dynamic bucket. Execution continues without dynamic bucketing; this is informational about the resolved mode.","triggerScenarios":"Creating a Paimon sink writer on an append-only table (write-mode append / primary-key absent) with bucket = -1 and bucketMode resolving to BUCKET_UNAWARE.","commonSituations":"Copying a primary-key table config (bucket = -1 for dynamic buckets) onto an append-only table; defaulting bucket to -1 hoping for auto-scaling buckets on append tables.","solutions":["Set a fixed positive 'bucket' value for the append-only table, or leave default bucket to let Paimon decide.","Remove bucket = -1 from the sink/table options if you assumed dynamic buckets.","Convert the table to a primary-key table (or use cross-partition upsert) if you truly need dynamic buckets.","Ignore the warning if unaware append mode is desired — it is not an error."],"exampleFix":"// before\n'bucket' = '-1'   // append-only table\n// after\n'bucket' = '4'    // fixed bucket count for append-only table","handlingStrategy":"validation","validationCode":"boolean appendOnly = !tableOptions.containsKey(\"primary-key\");\nif (appendOnly && \"-1\".equals(tableOptions.get(\"bucket\"))) throw new IllegalStateException(\"Append-only table cannot use dynamic bucket; set a fixed bucket\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set explicit bucket for append-only tables","Do not copy primary-key table bucket=-1 config to append tables","Understand Paimon BucketMode per table type"],"tags":["paimon","bucketing","configuration"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}