github-actions[bot] commented on issue #1128:
URL: 
https://github.com/apache/incubator-seata-go/issues/1128#issuecomment-4977510122

   > Bot detected the issue body's language is not English, translate it 
automatically.
   
   This Issue is divided into 2 phases, 5 sub PRs
   # Phase 1: Universal Functional Phase
   This phase plans to implement the capabilities of semantic batch: batch 
expression, transaction management, AT mirroring, lock key, undo log, partial 
failure and global rollback semantics
   
   # # PR1: Unified Batch API, Execution Model, Transaction Semantics and 
Backend Scheduling
   
   Semantic Batch execution process
   ```
   Receive full BatchExecContext
   Parsing and validating the entire batch at → once
   → Create or reuse the same local transaction
   → Use the same TransactionContext
   Call existing DML executors in item → order
   → Cumulative image and lock key: [redacted] Any failure Stop immediately
   Overall Rollback on → Failure
   Commit or keep pending based on API type after → all successes
   ```
   Scope:
   * Added 'BatchExecContext`, which expresses the complete set of parameters 
at once, as well as the Batch API, itemized execution results, and transaction 
state models.* Supports API self-managed transactions and existing `* sql.Tx` 
entries, and clarifies semantics such as failure, rollback failure, and unknown 
submission status.
   * Provides a unified backend scheduling framework and a complete semantic 
backend for subsequent database optimization and reuse.
   
   # # PR2: Complete AT Batch correctness for update, delete, insert
   
   * Complete the batch level before/after image, lock key: [redacted] undo log 
construction of three types of DML based on PR 1, and ensure that the entire 
batch only uses one local transaction, one AT branch, and one cumulative undo 
log.
   * Overrides repeated updates of the same row, federated primary key, 
generated key, `returning`, constraint conflicts, and midway failures.
   * Any SQL that cannot safely build a full image should be explicitly 
rejected before business SQL execution, and rolled back as a whole when any 
item fails.
   
   # Phase 2: Drive Optimization Phase
   Under the premise of the first phase, native/optimized batch backend is 
added to PostgreSQL/pgx and MySQL to reduce network round-trip and increase 
throughput.# # PR3: Native Batch SPI vs. PostgreSQL/pgx Backend
   * Adding pgx native batch capability under a unified backend framework 
reduces network round-trips with `pgx.Batch`, `Queue` and 'SendBatch' and 
guarantees the same physical connection for the current transaction.
   * The native execution still needs to correctly build the batch image, lock 
key: [redacted] undo log, and handle PostgreSQL transaction aborted, 
`returning`, connection exception, and unknown item-by-item status.
   * SQL equivalent to semantic backend cannot be proven to fall back 
automatically before execution.
   
   # # PR4: MySQL Optimized Batch Backend
   * Implement multi-line insert overrides, batch sharding, and limited 
update/delete fast paths for MySQL.All rewrites must remain placeholder, all 
chunks are still in the same local transaction, TransactionContext and AT 
branch* generated key: [redacted] semantic backend
   * Update/delete only optimizes scenarios that prove sequential, 
RowsAffected, trigger, and mirror semantic equivalence
   
   # # PR5: Cross-Backend Conformance Testing with Benchmark
   * Establish a unified conformance suite to compare the final data, 
item-by-item status, image, lock key, undo log, local rollback, and global 
rollback results for semantic, PostgreSQL native, and MySQL optimized backend.
   * PR 3 and PR 4 will still contain their own functional tests. PR 5 mainly 
supplements systematic control tests across databases and paths.Benchmark will 
compare throughput, latency, network round-trips, number of executions, memory 
allocation, and undo log overhead at different batch sizes to confirm that the 
optimization path does bring benefits.


-- 
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