github-actions[bot] commented on code in PR #66227:
URL: https://github.com/apache/doris/pull/66227#discussion_r4131691354
##########
fe/fe-core/src/main/java/org/apache/doris/common/profile/Profile.java:
##########
@@ -668,6 +715,7 @@ public void writeToStorage(String systemProfileStorageDir) {
DataOutputStream memoryDataStream = new
DataOutputStream(memoryStream);
// Write summary profile and execution profile content to memory
+ updateProfileCompletionStateForStorage();
Review Comment:
[P2] Preserve the terminal completion state while storing a profile. After
this call sets `INCOMPLETE` for a finished query with missing BE reports, a
concurrent `getProfileByLevel()` can set the same summary key back to
`COLLECTING` before `summaryProfile.write()` serializes it:
`profileStoragePath` remains empty until later, and ProfileManager permits
reads during its background storage task. The stored profile can then report
`COLLECTING` permanently after collection has ended. Serialize a stable
terminal-state snapshot or synchronize rendering with storage, and cover the
interleaving in a test.
--
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]