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

   ### Search before asking
   
   - [x] I searched in the issues and found nothing similar.
   
   ### Paimon version
   
   master at 71082ea86a57930f3fa00bb74f60d0a5dd676e35 (2.2-SNAPSHOT).
   
   ### Compute Engine
   
   Java API; the same filesystem schema merge is used by Spark path-based 
writes.
   
   ### Minimal reproduce step
   
   1. Create an ordinary append table with an `id INT` column and open it with 
`FileStoreTableFactory.create(fileIO, path)`.
   2. Call `table.store().mergeSchema` with an incoming row type containing `id 
INT, requested STRING`.
   3. After the merge reads schema 0, let another schema writer add `other 
INT`, publishing schema 1 before the first writer's atomic schema-file 
publication.
   4. The first writer's atomic publication returns false because schema 1 
already exists. `mergeSchema` also returns false, although `requested` was 
never added.
   
   The regression in `SchemaManagerTest` injects the competing real schema 
commit immediately before the atomic write, without timing-dependent threads.
   
   ### What doesn't meet your expectations?
   
   `mergeSchema` documents false as a no-op, but a lost commit is not a no-op. 
Callers can continue without the requested schema; Spark's schema helper only 
reloads its table when the result is true. A failed publication should raise an 
exception so the whole operation can be retried with fresh schema state.
   
   ### Anything else?
   
   The proposed fix checks the atomic commit result and reports the conflict. 
Successful merges and true no-op merges retain their current return values.
   
   ### 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: [email protected]

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

Reply via email to