mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-03 11:08:26 +00:00
Merge pull request #764 from orozery/remove_false_multihead_warnings
Remove false multihead warnings
This commit is contained in:
commit
57b2a60172
@ -3899,12 +3899,15 @@ int S3fsMultiCurl::MultiPerform(void)
|
|||||||
{
|
{
|
||||||
std::vector<pthread_t> threads;
|
std::vector<pthread_t> threads;
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
bool isMultiHead = false;
|
||||||
|
|
||||||
for(s3fscurlmap_t::iterator iter = cMap_req.begin(); iter != cMap_req.end(); ++iter) {
|
for(s3fscurlmap_t::iterator iter = cMap_req.begin(); iter != cMap_req.end(); ++iter) {
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
S3fsCurl* s3fscurl = (*iter).second;
|
S3fsCurl* s3fscurl = (*iter).second;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
isMultiHead |= s3fscurl->GetOp() == "HEAD";
|
||||||
|
|
||||||
rc = pthread_create(&thread, NULL, S3fsMultiCurl::RequestPerformWrapper, static_cast<void*>(s3fscurl));
|
rc = pthread_create(&thread, NULL, S3fsMultiCurl::RequestPerformWrapper, static_cast<void*>(s3fscurl));
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
success = false;
|
success = false;
|
||||||
@ -3925,7 +3928,7 @@ int S3fsMultiCurl::MultiPerform(void)
|
|||||||
S3FS_PRN_ERR("failed pthread_join - rc(%d)", rc);
|
S3FS_PRN_ERR("failed pthread_join - rc(%d)", rc);
|
||||||
} else {
|
} else {
|
||||||
int int_retval = (int)(intptr_t)(retval);
|
int int_retval = (int)(intptr_t)(retval);
|
||||||
if (int_retval) {
|
if (int_retval && !(int_retval == ENOENT && isMultiHead)) {
|
||||||
S3FS_PRN_WARN("thread failed - rc(%d)", int_retval);
|
S3FS_PRN_WARN("thread failed - rc(%d)", int_retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3954,7 +3957,10 @@ int S3fsMultiCurl::MultiRead(void)
|
|||||||
isRetry = true;
|
isRetry = true;
|
||||||
}else if(404 == responseCode){
|
}else if(404 == responseCode){
|
||||||
// not found
|
// not found
|
||||||
|
// HEAD requests on readdir_multi_head can return 404
|
||||||
|
if(s3fscurl->GetOp() != "HEAD"){
|
||||||
S3FS_PRN_WARN("failed a request(%ld: %s)", responseCode, s3fscurl->url.c_str());
|
S3FS_PRN_WARN("failed a request(%ld: %s)", responseCode, s3fscurl->url.c_str());
|
||||||
|
}
|
||||||
}else if(500 == responseCode){
|
}else if(500 == responseCode){
|
||||||
// case of all other result, do retry.(11/13/2013)
|
// case of all other result, do retry.(11/13/2013)
|
||||||
// because it was found that s3fs got 500 error from S3, but could success
|
// because it was found that s3fs got 500 error from S3, but could success
|
||||||
|
@ -439,6 +439,7 @@ class S3fsCurl
|
|||||||
std::string GetBasePath(void) const { return base_path; }
|
std::string GetBasePath(void) const { return base_path; }
|
||||||
std::string GetSpacialSavedPath(void) const { return saved_path; }
|
std::string GetSpacialSavedPath(void) const { return saved_path; }
|
||||||
std::string GetUrl(void) const { return url; }
|
std::string GetUrl(void) const { return url; }
|
||||||
|
std::string GetOp(void) const { return op; }
|
||||||
headers_t* GetResponseHeaders(void) { return &responseHeaders; }
|
headers_t* GetResponseHeaders(void) { return &responseHeaders; }
|
||||||
BodyData* GetBodyData(void) const { return bodydata; }
|
BodyData* GetBodyData(void) const { return bodydata; }
|
||||||
BodyData* GetHeadData(void) const { return headdata; }
|
BodyData* GetHeadData(void) const { return headdata; }
|
||||||
|
@ -2573,7 +2573,7 @@ static int append_objects_from_xml_ex(const char* path, xmlDocPtr doc, xmlXPathC
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(xmlXPathNodeSetIsEmpty(contents_xp->nodesetval)){
|
if(xmlXPathNodeSetIsEmpty(contents_xp->nodesetval)){
|
||||||
S3FS_PRN_WARN("contents_xp->nodesetval is empty.");
|
S3FS_PRN_DBG("contents_xp->nodesetval is empty.");
|
||||||
S3FS_XMLXPATHFREEOBJECT(contents_xp);
|
S3FS_XMLXPATHFREEOBJECT(contents_xp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user