Susuper2019 opened a new issue, #70873:
URL: https://github.com/apache/doris/issues/70873

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   4.1.3-rc02-7126cf65d96
   
   ### What's Wrong?
   
   After four Stream Load transactions become visible, querying one Unique Key 
returns two rows on each of three replicas. After the first cumulative 
compaction covering the last write, repeating the same query returns one row on 
each replica and the two previously visible column values are gone. There are 
no intervening writes.
   
   ### What You Expected?
   
   A single visible row per key before and after compaction. We expect (1, 
blue, sample, 20) after both partial updates commit. Independently of sequence 
inheritance, compaction should preserve the logical query result.
   
   ### How to Reproduce?
   
   Start with an empty UNIQUE KEY(id) merge-on-write table with one bucket, 
three replicas, a skip bitmap, and seq as the sequence column. Disable 
automatic compaction on the test table to observe both stages. The columns in 
query order are id, color, note, seq.
   
   Use flexible partial updates over Stream Load 2PC, one JSON row per 
transaction. Omitted fields are absent from the JSON.
   
   | Transaction | Payload |
   |---|---|
   | A | `{"id":1,"seq":20}` |
   | B | `{"id":1,"color":"blue"}` |
   | C | `{"id":1,"note":"sample"}` |
   | D | `{"id":1,"seq":10}` |
   
   1. Prepare A, B, C while the key is absent.
   2. Commit A and wait for VISIBLE. Prepare and commit D, then wait for 
VISIBLE. The query returns `(1, NULL, NULL, 20)`.
   3. Commit B, then C. Once visible, query `SELECT id, color, note, seq FROM t 
WHERE id = 1` on each replica. Every replica returns both `(1, NULL, NULL, 20)` 
and `(1, blue, sample, 10)`.
   4. Run cumulative compaction on each replica of the test tablet. Once its 
output covers C, repeat the query. Every replica now returns only `(1, NULL, 
NULL, 20)`.
   
   ### Anything Else?
   
   
[doris-partial-update-repro.zip](https://github.com/user-attachments/files/35264900/doris-partial-update-repro.zip)
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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