Doris-Breakwater commented on issue #71033:
URL: https://github.com/apache/doris/issues/71033#issuecomment-7162437863

   **Triage:** Source review confirms a cloud compaction correctness bug with a 
silent data-loss path. The picker and commit behavior are present in public 
4.1.4 (`ad35a140c7f`) and the checked `master` revision (`d1be112183`). The 
impact on the reported tablets still needs runtime evidence.
   
   - Once the level-2 scan is reached, it skips level-1 rowsets aged 24 hours 
or less even after collecting an input. A size or time trigger can then return 
`[4-5]` and `[8-9]` across `[6-7]`. The cloud BE checks the sorted candidate 
list before calling the policy. The merge builds readers from the selected 
inputs, and the commit sends their outer version bounds and the selected rowset 
count. [Level-2 
picker](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/storage/compaction/cumulative_compaction_time_series_policy.cpp#L376-L415),
 [BE 
selection](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/cloud/cloud_cumulative_compaction.cpp#L495-L555),
 [merge 
readers](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/storage/compaction/compaction.cpp#L258-L265),
 [commit 
fields](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/cloud/cloud_cumulative_com
 paction.cpp#L261-L280)
   - If that job commits with all three rowsets visible, the meta-service scans 
the full span and queues the skipped rowset for recycling. Its count check only 
catches a positive declared count with zero scanned rowsets, so three scanned 
versus two declared passes. Tablet statistics use the declared input and output 
counts and can overstate the remaining data. [Meta-service scan and 
removal](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/cloud/src/meta-service/meta_service_job.cpp#L1164-L1254),
 [statistics 
update](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/cloud/src/meta-service/meta_service_job.cpp#L816-L830)
   - The cumulative-point explanation matches the parallel path on `master`. 
Public 4.1.4's time-series policy proposes `output.end_version() + 1` for a 
nonempty level-2-or-higher output on a running tablet, even when the output 
starts above the point. The gap is possible if the picker sees the reported 
layout. How that layout formed on the affected build remains open. [Master 
cumulative-point 
logic](https://github.com/apache/doris/blob/d1be1121830ca3994d5bc168d58700722da1002e/be/src/cloud/cloud_cumulative_compaction.cpp#L350-L376),
 [4.1.4 
commit](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/cloud/cloud_cumulative_compaction.cpp#L246-L253),
 [4.1.4 point 
policy](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/cloud/cloud_cumulative_compaction_policy.cpp#L347-L360)
   
   Please open the PR with the contiguous-run fix and a BE continuity check on 
the selected inputs before starting the job. Cover the reported gap under both 
size and time triggers, leading young rowsets, and level-0 boundaries. The 
local policy score also needs version ordering and level-0 boundaries. Cloud 
scheduling uses the approximate cumulative delta count, so the picker fix and 
BE guard are the priority for the cloud backport. For meta-service defense in 
depth, reject extra live rowsets before staging removals or recycling. Test 
both metadata modes and preserve synthetic hole-rowset handling, since the BE 
excludes those placeholders from the declared count. [Local 
score](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/storage/compaction/cumulative_compaction_time_series_policy.cpp#L54-L153),
 [cloud 
score](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/cloud/cloud_tablet.cpp#L925-L929),
 [BE input count](
 
https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/storage/compaction/compaction.cpp#L1911-L1919)
   
   To confirm impact, please share the exact BE and meta-service build hashes, 
effective compaction thresholds, and redacted BE and meta-service logs for one 
tablet and job ID. The most useful evidence is the selected versions and commit 
result, the cumulative points and output versions of the preceding jobs, and 
before/after rowset metadata. A row or checksum comparison for records unique 
to the skipped rowset would establish query-visible loss.
   
   Breakwater-GitHub-Analysis-Slot: slot_7453dddb2d6b
   


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