siadat opened a new issue, #5883:
URL: https://github.com/apache/paimon/issues/5883

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   I would like to enable compaction on a dynamic bucket append-only table.
   
   ### Solution
   
   I noticed that compaction for bucket-unaware append-only tables appears to 
have been disabled in https://github.com/apache/paimon/pull/1337, and that the 
[CompactManager](https://github.com/apache/paimon/blob/release-1.2/paimon-core/src/main/java/org/apache/paimon/operation/AppendFileStoreWrite.java#L78)
 in this case seems to be a `NoopCompactManager`.
   
   I was wondering if you think it would make sense to allow compaction for 
append-only tables when using dynamic buckets (i.e., `bucket = -1`).
   
   From my reading of the docs, it sounds like dynamic bucket append-only 
tables should work with a single write job:
   
   > Dynamic Bucket only supports a single write job. Please do not start 
multiple jobs to write to the same partition (this can lead to duplicate data). 
Even if you enable 'write-only' and start a dedicated compaction job, it won’t 
work. ([docs 
link](https://github.com/apache/paimon/blob/release-1.2/paimon-core/src/main/java/org/apache/paimon/operation/AppendFileStoreWrite.java#L78))
   
   I tried running with these options in a single writer, but compaction 
doesn’t seem to be triggered:
   
   ```sql
   'bucket' = '-1',
   'write-only' = 'false',
   ```
   
   Compaction *does* work for an append-only table with a single bucket, which 
is the same number of bucket to a dynamic bucket append-only table:
   
   ```sql
   'bucket' = '1',
   'bucket-key' = 'key',
   'write-only' = 'false',
   ```
   
   I was wondering if there is any technical reason why compaction shouldn’t be 
supported for bucket-unaware append-only tables? Or is it something that could 
be revisited? Thanks.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@paimon.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to