-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YSQL][SQLsmith] Internal error (yb/common/ql_expr.cc:702): Unable to initialize catalog manager: Failed to initialize sys tables async: Failed log replay. Reason: Column unexpectedly not found in cache #11229
Open
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/bug
This issue is a bug
kind/failing-test
Tests and testing infra
priority/medium
Medium priority issue
qa_automation
Bugs identified via itest-system, LST, Stress automation or causing automation failures
Comments
def-
changed the title
[DocDB] Internal error (yb/common/ql_expr.cc:702): Unable to initialize catalog manager: Failed to initialize sys tables async: Failed log replay. Reason: Column unexpectedly not found in cache
[DocDB][SQLsmith] Internal error (yb/common/ql_expr.cc:702): Unable to initialize catalog manager: Failed to initialize sys tables async: Failed log replay. Reason: Column unexpectedly not found in cache
Feb 3, 2022
Got same message when trying to fix #5658. With partial fix patch on latest 2.6 and centos fastdebug gcc build, rolling upgrade rf=3 2.0.5.2 to 2.2.2.0 to this 2.6 build causes master FATAL. Slightly modified msg to show stack trace and column number:
For reproducibility, here's the partial fix patch for #5658: diff --git a/src/yb/tablet/tablet_metadata.cc b/src/yb/tablet/tablet_metadata.cc
index b15b47a7ab..6209fcd49c 100644
--- a/src/yb/tablet/tablet_metadata.cc
+++ b/src/yb/tablet/tablet_metadata.cc
@@ -51,6 +51,7 @@
#include "yb/gutil/map-util.h"
#include "yb/gutil/stl_util.h"
#include "yb/gutil/strings/substitute.h"
+#include "yb/master/sys_catalog_constants.h"
#include "yb/rocksutil/yb_rocksdb.h"
#include "yb/rocksutil/yb_rocksdb_logger.h"
#include "yb/server/metadata.h"
@@ -181,6 +182,18 @@ Status KvStoreInfo::LoadTablesFromPB(
RETURN_NOT_OK(table_info->LoadFromPB(table_pb));
if (table_info->table_id != primary_table_id) {
if (table_pb.schema().table_properties().is_ysql_catalog_table()) {
+ // For now, only master syscatalog tablet has YSQL system tables.
+ CHECK_EQ(primary_table_id, master::kSysCatalogTableId);
+
+ // Backwards compatibility with clusters that upgraded over v2.0.9-v2.0.10: these clusters
+ // may incorrectly have pgtable_id set for system tables, so remove it. See issue #5658 for
+ // details.
+ if (table_info->schema.has_pgtable_id()) {
+ LOG(INFO) << "Removing pgtable id " << table_info->schema.pgtable_id()
+ << " from YSQL catalog table " << table_info->table_id;
+ table_info->schema.set_pgtable_id(0);
+ }
+
Uuid cotable_id;
CHECK_OK(cotable_id.FromHexString(table_info->table_id));
// TODO(#79): when adding for multiple KV-stores per Raft group support - check if we need |
yugabyte-ci
changed the title
[DocDB][SQLsmith] Internal error (yb/common/ql_expr.cc:702): Unable to initialize catalog manager: Failed to initialize sys tables async: Failed log replay. Reason: Column unexpectedly not found in cache
[YSQL][SQLsmith] Internal error (yb/common/ql_expr.cc:702): Unable to initialize catalog manager: Failed to initialize sys tables async: Failed log replay. Reason: Column unexpectedly not found in cache
Jul 19, 2022
yugabyte-ci
added
area/ysql
Yugabyte SQL (YSQL)
and removed
area/docdb
YugabyteDB core features
labels
Jul 19, 2022
kripasreenivasan
added
the
qa_automation
Bugs identified via itest-system, LST, Stress automation or causing automation failures
label
Sep 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/bug
This issue is a bug
kind/failing-test
Tests and testing infra
priority/medium
Medium priority issue
qa_automation
Bugs identified via itest-system, LST, Stress automation or causing automation failures
Jira Link: DB-931
Description
yb-master failed to come up when restarting (in Debug build) after a SQLsmith session. FATAL file reports:
I can provide the data files if required. (10 GB)
The text was updated successfully, but these errors were encountered: