smiletrl opened a new issue, #654:
URL: https://github.com/apache/incubator-seata-go/issues/654

   <!-- Please only use this template for submitting enhancement requests -->
   
   **What would you like to be added**:
   
   Code currently parses the undo config, but it's actually not used. See 
https://github.com/apache/incubator-seata-go-samples/blob/main/conf/seatago.yml
   
   ```
       undo:
         # Judge whether the before image and after image are the same,If it is 
the same, undo will not be recorded
         data-validation: true
         # Serialization method
         log-serialization: json
         # undo log table name
         log-table: undo_log
         # Only store modified fields
         only-care-update-columns: true
         compress:
           # Whether compression is required
           enable: true
           # Compression type
           type: zip
           #  Compression threshold Unit: k
           threshold: 64k
   ```
   
   From 
https://github.com/apache/incubator-seata-go/blob/master/pkg/compressor/compressor_type.go,
 we have these types available
   
   ```
   func (c CompressorType) String() string {
        switch c {
        case CompressorNone:
                return "CompressorNone"
        case CompressorGzip:
                return "CompressorGzip"
        case CompressorZip:
                return "CompressorZip"
        case CompressorSevenz:
                return "CompressorSevenz"
        case CompressorBzip2:
                return "CompressorBzip2"
        case CompressorLz4:
                return "CompressorLz4"
        case CompressorZstd:
                return "CompressorZstd"
        case CompressorDeflate:
                return "CompressorDeflate"
        default:
                return ""
        }
   }
   ```
   
   My suggestion is to use below compress type options as possible value for 
above config `type: zip`.
   
   ```
   None
   Gzip
   Zip
   Sevenz
   Bzip2
   Lz4
   Zstd
   Deflate
   ```
   
   Once we get config type value, add prefix `Compressor` to value and then we 
get our internal compressor type string. 
   
   Or simply ignore the prefix `Compressor`, and just use the config type value 
as raw type value.
   
   We may want to update existing `type CompressorType int8` to `type 
CompressorType string.`
   
   **Why is this needed**:
   
   Allow undo manual compress config.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to