Skip to content

Commit 48ead54

Browse files
committed
chore: adapt to merge
1 parent 286c9d8 commit 48ead54

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

google/cloud/bigtable/ci/run_conformance_tests_proxy_bazel.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ exit_status=$?
5050
# Run all the ExecuteQuery tests that either work or we plan to skip such as
5151
# CloseClient
5252
go test -v \
53-
-run "TestExecuteQuery|TestExecuteQuery_PlanRefresh$|TestExecuteQuery_PlanRefresh_WithMetadataChange|TestExecuteQuery_PlanRefresh_Retries|TestExecuteQuery_PlanRefresh_RecoversAfterPermanentError" \
54-
-skip "CloseClient|FailsOnEmptyMetadata|FailsOnExecuteQueryMetadata|FailsOnInvalidType|FailsOnNotEnoughData|FailsOnNotEnoughDataWithCompleteRows|FailsOnSuccesfulStreamWithNoToken|ChecksumMismatch|ArraytFailsOnStructMissingField|TestExecuteQuery_PlanRefresh_AfterResumeTokenCausesError|TestExecuteQuery_RetryTest_WithPlanRefresh|TestExecuteQuery_PlanRefresh_RespectsDeadline" \
53+
-run "TestExecuteQuery|TestExecuteQuery_PlanRefresh$|TestExecuteQuery_PlanRefresh_WithMetadataChange|TestExecuteQuery_PlanRefresh_Retries|TestExecuteQuery_FailsOnSuccesfulStreamWithNoToken" \
54+
-skip "CloseClient|FailsOnEmptyMetadata|FailsOnExecuteQueryMetadata|FailsOnInvalidType|FailsOnNotEnoughData|FailsOnNotEnoughDataWithCompleteRows|FailsOnSuccesfulStreamWithNoToken|ChecksumMismatch|FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField|TestExecuteQuery_PlanRefresh_AfterResumeTokenCausesError|TestExecuteQuery_RetryTest_WithPlanRefresh|TestExecuteQuery_PlanRefresh_RespectsDeadline|TestExecuteQuery_PlanRefresh_RecoversAfterPermanentError" \
5555
-proxy_addr=:9999
5656
exit_status=$?
5757

@@ -72,10 +72,10 @@ exit_status=$?
7272
#exit_status=$?
7373

7474
# Response/Metadata mismatches b/461233335
75-
#go test -v \
76-
# -run "FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField" \
77-
# -proxy_addr=:9999
78-
#exit_status=$?
75+
go test -v \
76+
-run "FailsOnTypeMismatch|FailsOnTypeMismatchWithinMap|FailsOnTypeMismatchWithinArray|FailsOnTypeMismatchWithinStruct|FailsOnStructMissingField" \
77+
-proxy_addr=:9999
78+
exit_status=$?
7979

8080
# QueryPlan refresh tests b/461233613
8181
#go test -v \

google/cloud/bigtable/internal/data_connection_impl.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ bool IsStatusMetadataIndicatingRetryPolicyExhausted(Status const& status) {
111111
"retry-policy-exhausted"));
112112
}
113113

114+
bool IsStatusIndicatingInternalError(Status const& status) {
115+
return status.code() == StatusCode::kInternal;
116+
}
117+
114118
class DefaultPartialResultSetReader
115119
: public bigtable_internal::PartialResultSetReader {
116120
public:
@@ -962,6 +966,11 @@ bigtable::RowStream DataConnectionImpl::ExecuteQuery(
962966
}
963967
last_status = source.status();
964968

969+
if (IsStatusIndicatingInternalError(source.status())) {
970+
return bigtable::RowStream(std::make_unique<StatusOnlyResultSetSource>(
971+
std::move(last_status)));
972+
}
973+
965974
if (QueryPlanRefreshRetry::IsQueryPlanExpired(source.status())) {
966975
query_plan->Invalidate(source.status(),
967976
query_plan_data->prepared_query());

google/cloud/bigtable/internal/partial_result_set_source.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ PartialResultSetSource::Create(
5252
auto status = source->ReadFromStream();
5353

5454
// Any error during parsing will be returned.
55-
if (!status.ok()) return status;
55+
if (!status.ok()) {
56+
return status;
57+
}
5658

5759
return {std::move(source)};
5860
}
@@ -220,6 +222,7 @@ Status PartialResultSetSource::BufferProtoRows() {
220222
for (auto const& column : proto_schema.columns()) {
221223
if (!bigtable::Value::TypeAndValuesMatch(column.type(),
222224
*parsed_value)) {
225+
std::cout << "Metadata and Value not matching." << std::endl;
223226
return internal::InternalError("Metadata and Value not matching.",
224227
GCP_ERROR_INFO());
225228
}

0 commit comments

Comments
 (0)