github-actions[bot] commented on code in PR #64578:
URL: https://github.com/apache/doris/pull/64578#discussion_r3423323519


##########
be/src/service/http/action/file_cache_action.cpp:
##########
@@ -87,18 +85,13 @@ Status FileCacheAction::_handle_header(HttpRequest* req, 
std::string* json_metri
         const std::string& sync = req->param(std::string(SYNC));
         const std::string& segment_path = req->param(std::string(VALUE));
         if (segment_path.empty()) {
-            io::FileCacheFactory::instance()->clear_file_caches(false);
+            
RETURN_IF_ERROR(io::FileCacheFactory::instance()->clear_file_caches(

Review Comment:
   This now writes the raw `clear_file_caches()` summary into `json_metrics`, 
so `handle()` sends a body like `finish clear_file_cache_sync, ...` with 
`Content-Type: application/json`. That is not valid JSON, and it also leaves 
the existing HTTP tests stale: `FileCacheActionTest.clear_defaults_to_async` 
still expects `json_metrics` to be empty, while 
`FileCacheActionTest.clear_sync_true_runs_async_and_warns` still expects a JSON 
object. Please keep the clear endpoint response JSON-shaped (for example wrap 
the summary in `EasyJson`, or preserve the old empty/status JSON behavior for 
async) and update/add the HTTP tests for the intended contract.



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