HaHaJeff commented on code in PR #269:
URL: https://github.com/apache/paimon-cpp/pull/269#discussion_r3913818806


##########
src/paimon/core/realtime/realtime_primary_key_writer.cpp:
##########
@@ -245,15 +235,14 @@ Result<CommitIncrement> 
RealtimePrimaryKeyWriter::PrepareCommit(bool wait_compac
     return increment;
 }
 
-Status RealtimePrimaryKeyWriter::FlushSegment(const 
std::shared_ptr<RealtimeSegmentHandle>& segment,
-                                              const OffsetRange& 
sealed_offsets) {
+Status RealtimePrimaryKeyWriter::FlushSegment(
+    const std::shared_ptr<RealtimeSegmentHandle>& segment) {
     PAIMON_ASSIGN_OR_RAISE(std::vector<std::unique_ptr<BatchReader>> readers,
                            realtime_store_->CreateCommitReaders(segment));

Review Comment:
   Could we validate the raw PK commit readers before MOR?
   
   This path no longer checks segment->GetRowCount(). If a custom store misses 
or duplicates a mutation, deduplication may hide it and incomplete data could 
be committed.
   
   We should at least check the raw row count and validate that 
_REALTIME_OFFSET is non-null, unique, and within the sealed range. The same 
offset validation may also be useful for append.



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