Skip to content

Commit

Permalink
Remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan committed Jul 3, 2024
1 parent b9e60bd commit 5e65592
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions google/cloud/storage/internal/retry_object_read_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "google/cloud/storage/internal/retry_object_read_source.h"
#include "google/cloud/internal/make_status.h"
#include "google/cloud/log.h"
#include <algorithm>
#include <sstream>
#include <string>
Expand Down Expand Up @@ -69,7 +68,6 @@ RetryObjectReadSource::RetryObjectReadSource(

StatusOr<ReadSourceResult> RetryObjectReadSource::Read(char* buf,
std::size_t n) {
GCP_LOG(INFO) << ", offset=" << current_offset_;
if (!child_) {
return google::cloud::internal::FailedPreconditionError(
"Stream is not open", GCP_ERROR_INFO());
Expand All @@ -90,8 +88,6 @@ StatusOr<ReadSourceResult> RetryObjectReadSource::Read(char* buf,
auto backoff_policy = backoff_policy_prototype_->clone();
auto retry_policy = retry_policy_prototype_->clone();
int counter = 0;
GCP_LOG(INFO) << "Retry on =" << result.status()
<< ", offset=" << current_offset_ << ", counter=" << counter;
while (!result && retry_policy->OnFailure(result.status())) {
// A Read() request failed, most likely that means the connection failed or
// stalled. The current child might no longer be usable, so we will try to
Expand Down Expand Up @@ -129,8 +125,6 @@ StatusOr<ReadSourceResult> RetryObjectReadSource::Read(char* buf,
if (HandleResult(result)) return result;
// We have exhausted the retry policy, return the error.
auto status = std::move(result).status();
GCP_LOG(INFO) << "Exhausted retry policy during Read(), status=" << status
<< ", offset=" << current_offset_ << ", counter=" << counter;
std::ostringstream os;
if (internal::StatusTraits::IsPermanentFailure(status)) {
os << "Permanent error in Read(): " << status.message();
Expand All @@ -142,7 +136,6 @@ StatusOr<ReadSourceResult> RetryObjectReadSource::Read(char* buf,

bool RetryObjectReadSource::HandleResult(StatusOr<ReadSourceResult> const& r) {
if (!r) return false;
GCP_LOG(INFO) << ", offset=" << current_offset_;
if (r->generation) generation_ = r->generation;
if (r->transformation.value_or("") == "gunzipped") is_gunzipped_ = true;
// Since decompressive transcoding does not respect `ReadLast()` we need
Expand All @@ -156,10 +149,8 @@ bool RetryObjectReadSource::HandleResult(StatusOr<ReadSourceResult> const& r) {
return true;
}

// NOLINTNEXTLINE(misc-no-recursion)
Status RetryObjectReadSource::MakeChild(RetryPolicy& retry_policy,
BackoffPolicy& backoff_policy) {
GCP_LOG(INFO) << ", offset=" << current_offset_;
auto on_success = [this](std::unique_ptr<ObjectReadSource> child) {
child_ = std::move(child);
return Status{};
Expand Down

0 comments on commit 5e65592

Please sign in to comment.