YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/src/yb/common/wire_protocol.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
//
18
// The following only applies to changes made to this file as part of YugaByte development.
19
//
20
// Portions Copyright (c) YugaByte, Inc.
21
//
22
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
23
// in compliance with the License.  You may obtain a copy of the License at
24
//
25
// http://www.apache.org/licenses/LICENSE-2.0
26
//
27
// Unless required by applicable law or agreed to in writing, software distributed under the License
28
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
29
// or implied.  See the License for the specific language governing permissions and limitations
30
// under the License.
31
//
32
// Helpers for dealing with the protobufs defined in wire_protocol.proto.
33
#ifndef YB_COMMON_WIRE_PROTOCOL_H
34
#define YB_COMMON_WIRE_PROTOCOL_H
35
36
#include <vector>
37
38
#include "yb/common/common_fwd.h"
39
40
#include <google/protobuf/repeated_field.h>
41
42
#include "yb/gutil/endian.h"
43
44
#include "yb/util/status_fwd.h"
45
#include "yb/util/cast.h"
46
#include "yb/util/enums.h"
47
#include "yb/util/math_util.h"
48
#include "yb/util/net/net_fwd.h"
49
#include "yb/util/status_ec.h"
50
#include "yb/util/type_traits.h"
51
#include "yb/util/result.h"
52
53
namespace yb {
54
55
class ColumnId;
56
class ColumnSchema;
57
class faststring;
58
class HostPort;
59
class RowChangeList;
60
class Schema;
61
class Slice;
62
63
// Convert the given C++ Status object into the equivalent Protobuf.
64
void StatusToPB(const Status& status, AppStatusPB* pb);
65
66
// Convert the given protobuf into the equivalent C++ Status object.
67
Status StatusFromPB(const AppStatusPB& pb);
68
69
// Convert the specified HostPort to protobuf.
70
void HostPortToPB(const HostPort& host_port, HostPortPB* host_port_pb);
71
72
// Returns the HostPort created from the specified protobuf.
73
HostPort HostPortFromPB(const HostPortPB& host_port_pb);
74
75
bool HasHostPortPB(
76
    const google::protobuf::RepeatedPtrField<HostPortPB>& list, const HostPortPB& hp);
77
78
// Returns an Endpoint from HostPortPB.
79
CHECKED_STATUS EndpointFromHostPortPB(const HostPortPB& host_portpb, Endpoint* endpoint);
80
81
// Adds addresses in 'addrs' to 'pbs'. If an address is a wildcard (e.g., "0.0.0.0"),
82
// then the local machine's FQDN or its network interface address is used in its place.
83
CHECKED_STATUS AddHostPortPBs(const std::vector<Endpoint>& addrs,
84
                              google::protobuf::RepeatedPtrField<HostPortPB>* pbs);
85
86
// Simply convert the list of host ports into a repeated list of corresponding PB's.
87
void HostPortsToPBs(const std::vector<HostPort>& addrs,
88
                    google::protobuf::RepeatedPtrField<HostPortPB>* pbs);
89
90
// Convert list of HostPortPBs into host ports.
91
void HostPortsFromPBs(const google::protobuf::RepeatedPtrField<HostPortPB>& pbs,
92
                      std::vector<HostPort>* addrs);
93
94
enum SchemaPBConversionFlags {
95
  SCHEMA_PB_WITHOUT_IDS = 1 << 0,
96
};
97
98
// Convert the specified schema to protobuf.
99
// 'flags' is a bitfield of SchemaPBConversionFlags values.
100
void SchemaToPB(const Schema& schema, SchemaPB* pb, int flags = 0);
101
102
// Convert the specified schema to protobuf without column IDs.
103
void SchemaToPBWithoutIds(const Schema& schema, SchemaPB *pb);
104
105
// Returns the Schema created from the specified protobuf.
106
// If the schema is invalid, return a non-OK status.
107
Status SchemaFromPB(const SchemaPB& pb, Schema *schema);
108
109
// Convert the specified column schema to protobuf.
110
// 'flags' is a bitfield of SchemaPBConversionFlags values.
111
void ColumnSchemaToPB(const ColumnSchema& schema, ColumnSchemaPB *pb, int flags = 0);
112
113
// Return the ColumnSchema created from the specified protobuf.
114
ColumnSchema ColumnSchemaFromPB(const ColumnSchemaPB& pb);
115
116
// Convert the given list of ColumnSchemaPB objects into a Schema object.
117
//
118
// Returns InvalidArgument if the provided columns don't make a valid Schema
119
// (eg if the keys are non-contiguous or nullable).
120
Status ColumnPBsToSchema(
121
  const google::protobuf::RepeatedPtrField<ColumnSchemaPB>& column_pbs,
122
  Schema* schema);
123
124
// Returns the required information from column pbs to build the column part of SchemaPB.
125
CHECKED_STATUS ColumnPBsToColumnTuple(
126
    const google::protobuf::RepeatedPtrField<ColumnSchemaPB>& column_pbs,
127
    std::vector<ColumnSchema>* columns , std::vector<ColumnId>* column_ids, int* num_key_columns);
128
129
// Extract the columns of the given Schema into protobuf objects.
130
//
131
// The 'cols' list is replaced by this method.
132
// 'flags' is a bitfield of SchemaPBConversionFlags values.
133
void SchemaToColumnPBs(
134
  const Schema& schema,
135
  google::protobuf::RepeatedPtrField<ColumnSchemaPB>* cols,
136
  int flags = 0);
137
138
// Extract the colocated table information of the given schema into a protobuf object.
139
void SchemaToColocatedTableIdentifierPB(
140
    const Schema& schema, ColocatedTableIdentifierPB* colocated_pb);
141
142
YB_DEFINE_ENUM(UsePrivateIpMode, (cloud)(region)(zone)(never));
143
144
// Returns mode for selecting between private and public IP.
145
Result<UsePrivateIpMode> GetPrivateIpMode();
146
147
// Pick node's public host and port
148
// registration - node registration information
149
const HostPortPB& PublicHostPort(const ServerRegistrationPB& registration);
150
151
// Pick host and port that should be used to connect node
152
// broadcast_addresses - node public host ports
153
// private_host_ports - node private host ports
154
// connect_to - node placement information
155
// connect_from - placement information of connect originator
156
const HostPortPB& DesiredHostPort(
157
    const google::protobuf::RepeatedPtrField<HostPortPB>& broadcast_addresses,
158
    const google::protobuf::RepeatedPtrField<HostPortPB>& private_host_ports,
159
    const CloudInfoPB& connect_to,
160
    const CloudInfoPB& connect_from);
161
162
// Pick host and port that should be used to connect node
163
// registration - node registration information
164
// connect_from - placement information of connect originator
165
const HostPortPB& DesiredHostPort(
166
    const ServerRegistrationPB& registration, const CloudInfoPB& connect_from);
167
168
HAS_MEMBER_FUNCTION(error);
169
HAS_MEMBER_FUNCTION(status);
170
171
template<class Response>
172
CHECKED_STATUS ResponseStatus(
173
    const Response& response,
174
25.6M
    typename std::enable_if<HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
175
  // Response has has_error method, use status from it.
176
25.6M
  if (response.has_error()) {
177
17.7k
    return StatusFromPB(response.error().status());
178
17.7k
  }
179
25.5M
  return Status::OK();
180
25.6M
}
181
182
template<class Response>
183
CHECKED_STATUS ResponseStatus(
184
    const Response& response,
185
    typename std::enable_if<HasMemberFunction_status<Response>::value &&
186
2.69M
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
2.69M
  if (response.has_status()) {
188
122k
    return StatusFromPB(response.status());
189
122k
  }
190
2.56M
  return Status::OK();
191
2.69M
}
yb::Status yb::ResponseStatus<yb::tserver::PgHeartbeatResponsePB>(yb::tserver::PgHeartbeatResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgHeartbeatResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgHeartbeatResponsePB>::value)), void*>::type)
Line
Count
Source
186
10.7k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
10.7k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
10.7k
  return Status::OK();
191
10.7k
}
yb::Status yb::ResponseStatus<yb::tserver::PgOpenTableResponsePB>(yb::tserver::PgOpenTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgOpenTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgOpenTableResponsePB>::value)), void*>::type)
Line
Count
Source
186
191k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
191k
  if (response.has_status()) {
188
64
    return StatusFromPB(response.status());
189
64
  }
190
191k
  return Status::OK();
191
191k
}
yb::Status yb::ResponseStatus<yb::tserver::PgFinishTransactionResponsePB>(yb::tserver::PgFinishTransactionResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgFinishTransactionResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgFinishTransactionResponsePB>::value)), void*>::type)
Line
Count
Source
186
218k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
218k
  if (response.has_status()) {
188
16.0k
    return StatusFromPB(response.status());
189
16.0k
  }
190
202k
  return Status::OK();
191
218k
}
yb::Status yb::ResponseStatus<yb::tserver::PgGetDatabaseInfoResponsePB>(yb::tserver::PgGetDatabaseInfoResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgGetDatabaseInfoResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgGetDatabaseInfoResponsePB>::value)), void*>::type)
Line
Count
Source
186
5.72k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
5.72k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
5.72k
  return Status::OK();
191
5.72k
}
yb::Status yb::ResponseStatus<yb::tserver::PgReserveOidsResponsePB>(yb::tserver::PgReserveOidsResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgReserveOidsResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgReserveOidsResponsePB>::value)), void*>::type)
Line
Count
Source
186
805
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
805
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
805
  return Status::OK();
191
805
}
yb::Status yb::ResponseStatus<yb::tserver::PgIsInitDbDoneResponsePB>(yb::tserver::PgIsInitDbDoneResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgIsInitDbDoneResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgIsInitDbDoneResponsePB>::value)), void*>::type)
Line
Count
Source
186
2
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
2
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
2
  return Status::OK();
191
2
}
yb::Status yb::ResponseStatus<yb::tserver::PgGetCatalogMasterVersionResponsePB>(yb::tserver::PgGetCatalogMasterVersionResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgGetCatalogMasterVersionResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgGetCatalogMasterVersionResponsePB>::value)), void*>::type)
Line
Count
Source
186
22
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
22
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
22
  return Status::OK();
191
22
}
Unexecuted instantiation: yb::Status yb::ResponseStatus<yb::tserver::PgCreateSequencesDataTableResponsePB>(yb::tserver::PgCreateSequencesDataTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgCreateSequencesDataTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgCreateSequencesDataTableResponsePB>::value)), void*>::type)
yb::Status yb::ResponseStatus<yb::tserver::PgDropTableResponsePB>(yb::tserver::PgDropTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgDropTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgDropTableResponsePB>::value)), void*>::type)
Line
Count
Source
186
4.14k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
4.14k
  if (response.has_status()) {
188
6
    return StatusFromPB(response.status());
189
6
  }
190
4.14k
  return Status::OK();
191
4.14k
}
yb::Status yb::ResponseStatus<yb::tserver::PgBackfillIndexResponsePB>(yb::tserver::PgBackfillIndexResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgBackfillIndexResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgBackfillIndexResponsePB>::value)), void*>::type)
Line
Count
Source
186
536
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
536
  if (response.has_status()) {
188
6
    return StatusFromPB(response.status());
189
6
  }
190
530
  return Status::OK();
191
536
}
yb::Status yb::ResponseStatus<yb::tserver::PgTabletServerCountResponsePB>(yb::tserver::PgTabletServerCountResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgTabletServerCountResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgTabletServerCountResponsePB>::value)), void*>::type)
Line
Count
Source
186
148
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
148
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
148
  return Status::OK();
191
148
}
yb::Status yb::ResponseStatus<yb::tserver::PgListLiveTabletServersResponsePB>(yb::tserver::PgListLiveTabletServersResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgListLiveTabletServersResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgListLiveTabletServersResponsePB>::value)), void*>::type)
Line
Count
Source
186
4
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
4
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
4
  return Status::OK();
191
4
}
yb::Status yb::ResponseStatus<yb::tserver::PgSetActiveSubTransactionResponsePB>(yb::tserver::PgSetActiveSubTransactionResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgSetActiveSubTransactionResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgSetActiveSubTransactionResponsePB>::value)), void*>::type)
Line
Count
Source
186
61.7k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
61.7k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
61.7k
  return Status::OK();
191
61.7k
}
yb::Status yb::ResponseStatus<yb::tserver::PgRollbackSubTransactionResponsePB>(yb::tserver::PgRollbackSubTransactionResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgRollbackSubTransactionResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgRollbackSubTransactionResponsePB>::value)), void*>::type)
Line
Count
Source
186
13.5k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
13.5k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
13.5k
  return Status::OK();
191
13.5k
}
yb::Status yb::ResponseStatus<yb::tserver::PgValidatePlacementResponsePB>(yb::tserver::PgValidatePlacementResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgValidatePlacementResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgValidatePlacementResponsePB>::value)), void*>::type)
Line
Count
Source
186
1
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
1
  if (response.has_status()) {
188
1
    return StatusFromPB(response.status());
189
1
  }
190
0
  return Status::OK();
191
1
}
yb::Status yb::ResponseStatus<yb::tserver::PgInsertSequenceTupleResponsePB>(yb::tserver::PgInsertSequenceTupleResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgInsertSequenceTupleResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgInsertSequenceTupleResponsePB>::value)), void*>::type)
Line
Count
Source
186
295
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
295
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
295
  return Status::OK();
191
295
}
yb::Status yb::ResponseStatus<yb::tserver::PgUpdateSequenceTupleResponsePB>(yb::tserver::PgUpdateSequenceTupleResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgUpdateSequenceTupleResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgUpdateSequenceTupleResponsePB>::value)), void*>::type)
Line
Count
Source
186
2.97k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
2.97k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
2.97k
  return Status::OK();
191
2.97k
}
yb::Status yb::ResponseStatus<yb::tserver::PgReadSequenceTupleResponsePB>(yb::tserver::PgReadSequenceTupleResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgReadSequenceTupleResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgReadSequenceTupleResponsePB>::value)), void*>::type)
Line
Count
Source
186
3.23k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
3.23k
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
3.23k
  return Status::OK();
191
3.23k
}
yb::Status yb::ResponseStatus<yb::tserver::PgDeleteSequenceTupleResponsePB>(yb::tserver::PgDeleteSequenceTupleResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgDeleteSequenceTupleResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgDeleteSequenceTupleResponsePB>::value)), void*>::type)
Line
Count
Source
186
282
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
282
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
282
  return Status::OK();
191
282
}
yb::Status yb::ResponseStatus<yb::tserver::PgDeleteDBSequencesResponsePB>(yb::tserver::PgDeleteDBSequencesResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgDeleteDBSequencesResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgDeleteDBSequencesResponsePB>::value)), void*>::type)
Line
Count
Source
186
71
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
71
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
71
  return Status::OK();
191
71
}
yb::Status yb::ResponseStatus<yb::tserver::PgPerformResponsePB>(yb::tserver::PgPerformResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgPerformResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgPerformResponsePB>::value)), void*>::type)
Line
Count
Source
186
2.17M
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
2.17M
  if (response.has_status()) {
188
106k
    return StatusFromPB(response.status());
189
106k
  }
190
2.06M
  return Status::OK();
191
2.17M
}
yb::Status yb::ResponseStatus<yb::tserver::PgAlterDatabaseResponsePB>(yb::tserver::PgAlterDatabaseResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgAlterDatabaseResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgAlterDatabaseResponsePB>::value)), void*>::type)
Line
Count
Source
186
3
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
3
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
3
  return Status::OK();
191
3
}
yb::Status yb::ResponseStatus<yb::tserver::PgAlterTableResponsePB>(yb::tserver::PgAlterTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgAlterTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgAlterTableResponsePB>::value)), void*>::type)
Line
Count
Source
186
522
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
522
  if (response.has_status()) {
188
2
    return StatusFromPB(response.status());
189
2
  }
190
520
  return Status::OK();
191
522
}
yb::Status yb::ResponseStatus<yb::tserver::PgCreateDatabaseResponsePB>(yb::tserver::PgCreateDatabaseResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgCreateDatabaseResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgCreateDatabaseResponsePB>::value)), void*>::type)
Line
Count
Source
186
132
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
132
  if (response.has_status()) {
188
1
    return StatusFromPB(response.status());
189
1
  }
190
131
  return Status::OK();
191
132
}
yb::Status yb::ResponseStatus<yb::tserver::PgCreateTableResponsePB>(yb::tserver::PgCreateTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgCreateTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgCreateTableResponsePB>::value)), void*>::type)
Line
Count
Source
186
5.05k
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
5.05k
  if (response.has_status()) {
188
22
    return StatusFromPB(response.status());
189
22
  }
190
5.02k
  return Status::OK();
191
5.05k
}
yb::Status yb::ResponseStatus<yb::tserver::PgCreateTablegroupResponsePB>(yb::tserver::PgCreateTablegroupResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgCreateTablegroupResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgCreateTablegroupResponsePB>::value)), void*>::type)
Line
Count
Source
186
54
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
54
  if (response.has_status()) {
188
2
    return StatusFromPB(response.status());
189
2
  }
190
52
  return Status::OK();
191
54
}
yb::Status yb::ResponseStatus<yb::tserver::PgDropDatabaseResponsePB>(yb::tserver::PgDropDatabaseResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgDropDatabaseResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgDropDatabaseResponsePB>::value)), void*>::type)
Line
Count
Source
186
72
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
72
  if (response.has_status()) {
188
1
    return StatusFromPB(response.status());
189
1
  }
190
71
  return Status::OK();
191
72
}
yb::Status yb::ResponseStatus<yb::tserver::PgDropTablegroupResponsePB>(yb::tserver::PgDropTablegroupResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgDropTablegroupResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgDropTablegroupResponsePB>::value)), void*>::type)
Line
Count
Source
186
39
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
39
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
39
  return Status::OK();
191
39
}
yb::Status yb::ResponseStatus<yb::tserver::PgTruncateTableResponsePB>(yb::tserver::PgTruncateTableResponsePB const&, std::__1::enable_if<(HasMemberFunction_status<yb::tserver::PgTruncateTableResponsePB>::value) && (!(HasMemberFunction_error<yb::tserver::PgTruncateTableResponsePB>::value)), void*>::type)
Line
Count
Source
186
624
                            !HasMemberFunction_error<Response>::value, void*>::type = nullptr) {
187
624
  if (response.has_status()) {
188
0
    return StatusFromPB(response.status());
189
0
  }
190
624
  return Status::OK();
191
624
}
192
193
struct SplitChildTabletIdsTag : yb::StringVectorBackedErrorTag {
194
  // It is part of the wire protocol and should not be changed once released.
195
  static constexpr uint8_t kCategory = 14;
196
197
  static std::string ToMessage(Value value);
198
};
199
200
typedef yb::StatusErrorCodeImpl<SplitChildTabletIdsTag> SplitChildTabletIdsData;
201
202
} // namespace yb
203
204
#endif  // YB_COMMON_WIRE_PROTOCOL_H