Skip to content

Commit 3067a93

Browse files
authored
fix(storage): rollback multi stream code changes to avoid performance regression (#15471)
1 parent 1cbaa96 commit 3067a93

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

google/cloud/storage/async/object_descriptor.cc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ absl::optional<google::storage::v2::Object> ObjectDescriptor::metadata() const {
2727

2828
std::pair<AsyncReader, AsyncToken> ObjectDescriptor::Read(std::int64_t offset,
2929
std::int64_t limit) {
30-
std::int64_t max_range =
31-
impl_->options().get<storage_experimental::MaximumRangeSizeOption>();
32-
if (limit > max_range) {
33-
impl_->MakeSubsequentStream();
34-
}
30+
// TODO(15340): This change is causing performance regression. We need to
31+
// revisit it after benchmarking our code.
32+
33+
// std::int64_t max_range =
34+
// impl_->options().get<storage_experimental::MaximumRangeSizeOption>();
35+
// if (limit > max_range) {
36+
// impl_->MakeSubsequentStream();
37+
// }
3538
auto reader = impl_->Read({offset, limit});
3639
auto token = storage_internal::MakeAsyncToken(reader.get());
3740
return {AsyncReader(std::move(reader)), std::move(token)};

google/cloud/storage/async/object_descriptor_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ TEST(ObjectDescriptor, ReadLast) {
149149
}
150150

151151
TEST(ObjectDescriptor, ReadExceedsMaxRange) {
152+
GTEST_SKIP();
152153
auto mock = std::make_shared<MockAsyncObjectDescriptorConnection>();
153154
auto constexpr kMaxRange = 1024;
154155
EXPECT_CALL(*mock, options)

google/cloud/storage/tests/async_client_integration_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ TEST_F(AsyncClientIntegrationTest, Open) {
964964
}
965965

966966
TEST_F(AsyncClientIntegrationTest, OpenExceedMaximumRange) {
967-
if (!UsingEmulator()) GTEST_SKIP();
967+
GTEST_SKIP();
968968
auto async = AsyncClient(
969969
TestOptions().set<storage_experimental::MaximumRangeSizeOption>(1024));
970970
auto client = MakeIntegrationTestClient(true, TestOptions());

0 commit comments

Comments
 (0)