CcdbApi: Fixed logReading in vectoredLoadFileTomemory#12276
Conversation
| // Save snapshots | ||
| for (int i = 0; i < requestContexts.size(); i++) { | ||
| auto& requestContext = requestContexts.at(i); | ||
| logReading(requestContext.path, requestContext.timestamp, &requestContext.headers, |
There was a problem hiding this comment.
@TrifleMichael will it show the actual object fetched (with timestamps and etag) like it was before vectorization?
There was a problem hiding this comment.
Yes, it will show the full path including the timestamp and etag like it did before. The problem was calling logReading before the headers arrived, which resulted in requestContext.headers being empty and not containing that information.
| } | ||
| } else { | ||
| LOG(warning) << "Did not receive content for " << requestContext.path << "\n"; // Temporarily demoted to warning, since it floods the infologger | ||
| LOG(info) << "Did not receive content for " << requestContext.path << "\n"; // This is to be expected in case of http answer 304 and similar cases |
There was a problem hiding this comment.
Cannot we suppress the message completely when the content is not supposed to be shipped?
There was a problem hiding this comment.
We can definitely do that in case of receiving http 304. I don't know if there are any other similar cases, but most likely that could be done.
There was a problem hiding this comment.
Only 304 is a legitimate case of not shipping an object, and we don't need to log this case. All other cases I know should produce a LOG(error).
There was a problem hiding this comment.
Then I'll modify the code so it log's an error in case of non-304 response and no object received.
There was a problem hiding this comment.
In principle only http codes >= 400 should be considered errors and returned. Or libcurl IO errors, if the call could not be performed at all.
|
@shahor02 the above |
|
@costing So, then it should be ok to log an error in the https://github.com/AliceO2Group/AliceO2/pull/12276/files/6ba1cfa64111499e28a87f1b34eff43647708eaa#diff-2355211fcd8f9232fbeddc19348089f206c655459237baffc0252dbd544dd025R1691 only if a curl code assuming a shipped object was received but the object was not there, right? Effectively response in [200 : 300[ with no payload, since all other cases are already covered by the navigateURLsAndRetrieveContent logs). |
|
Error while checking build/O2/fullCI for 6ba1cfa at 2023-11-21 22:05: Full log here. |
|
@shahor02 I'll update this PR so that errors are logged only if 400+ was received and no content arrived. |
…2276) * CcdbApi: Fixed logReading in vectoredLoadFileTomemory * CcdbDownloader: Better transfer info logging * Formatting fix * Removed whitespace
In order do properly print data received from headers in
logReading, the line callinglogReadinghas been moved after the execution of downloader loop.Additionally the warning of "No content received" has been demoted to info, as it is expected in various use cases. For example in case of checking whether data has been modified and receiving 304.