MCPcopy Create free account
hub / github.com/baidu/tera / GetTableTransactionType

Method GetTableTransactionType

src/observer/executor/scanner_impl.cc:595–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593}
594
595TransactionType ScannerImpl::GetTableTransactionType(tera::Table* table) {
596 tera::ErrorCode err;
597 std::shared_ptr<Table> table_ptr;
598 table_ptr.reset(tera_client_->OpenTable(table->GetName(), &err));
599 std::shared_ptr<TableImpl> table_impl(
600 static_cast<TableWrapper*>(table_ptr.get())->GetTableImpl());
601 TableSchema schema = table_impl->GetTableSchema();
602
603 if (IsTransactionTable(schema)) {
604 std::set<std::string> gtxn_cfs;
605 FindGlobalTransactionCfs(schema, &gtxn_cfs);
606 if (gtxn_cfs.size() > 0) {
607 return kGlobalTransaction;
608 }
609 return kSingleRowTransaction;
610 }
611 return kNoneTransaction;
612}
613
614void ScannerImpl::ValidateCellValue(RowReader* value_reader) {
615 std::unique_ptr<NotificationContext> context((NotificationContext*)(value_reader->GetContext()));

Callers

nothing calls this directly

Calls 9

IsTransactionTableFunction · 0.85
FindGlobalTransactionCfsFunction · 0.85
GetTableImplMethod · 0.80
GetTableSchemaMethod · 0.80
resetMethod · 0.45
OpenTableMethod · 0.45
GetNameMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected