Skip to content

Commit a84bfbb

Browse files
committed
update
1 parent 281bc25 commit a84bfbb

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/insert/insert.cc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -189,29 +189,29 @@ grpc::Status InsertService::Insert(grpc::ServerContext* context,
189189
small::insert::InsertReply* response) {
190190
SPDLOG_INFO("insert request: {}", request->DebugString());
191191

192-
auto info = small::server_base::get_info();
193-
if (!info.ok())
194-
return grpc::Status(grpc::StatusCode::INTERNAL,
195-
"failed to get server info");
196-
std::string db_path = info.value()->db_path;
197-
auto db = small::rocks::RocksDBWrapper::GetInstance(db_path, {});
198-
199-
// get the table
200-
auto result =
201-
small::catalog::Catalog::GetInstance()->GetTable(request->table_name());
202-
if (!result) {
203-
return grpc::Status(grpc::StatusCode::NOT_FOUND,
204-
fmt::format("table {} not found, server: {}",
205-
request->table_name(), db_path));
206-
}
207-
auto table = result.value();
208-
209-
const auto& column_values = request->column_values();
210-
std::vector<std::string> values;
211-
for (const auto& value : column_values) {
212-
values.push_back(value);
213-
}
214-
db->WriteRowWire(table, values);
192+
// auto info = small::server_base::get_info();
193+
// if (!info.ok())
194+
// return grpc::Status(grpc::StatusCode::INTERNAL,
195+
// "failed to get server info");
196+
// std::string db_path = info.value()->db_path;
197+
// auto db = small::rocks::RocksDBWrapper::GetInstance(db_path, {});
198+
199+
// // get the table
200+
// auto result =
201+
// small::catalog::Catalog::GetInstance()->GetTable(request->table_name());
202+
// if (!result) {
203+
// return grpc::Status(grpc::StatusCode::NOT_FOUND,
204+
// fmt::format("table {} not found, server: {}",
205+
// request->table_name(), db_path));
206+
// }
207+
// auto table = result.value();
208+
209+
// const auto& column_values = request->column_values();
210+
// std::vector<std::string> values;
211+
// for (const auto& value : column_values) {
212+
// values.push_back(value);
213+
// }
214+
// db->WriteRowWire(table, values);
215215
return grpc::Status::OK;
216216
}
217217

0 commit comments

Comments
 (0)