matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: cn upgrader bug #12262

Closed fengttt closed 6 months ago

fengttt commented 1 year ago

Is there an existing issue for the same bug?

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 1.0-dev
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

| internal error: unknown d | internal error: unknown data type collati | internal error: unknown data type collati (1) Wraps: (2) -- stack trace: | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.ParseDataTypeToColType | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader_util.go:56 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).GetCurrentSchema | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:69 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).UpgradeNewViewColumn | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:208 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).Upgrade | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:171 | github.com/matrixorigin/matrixone/pkg/cnservice.(service).upgrade | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/server_task.go:130 | github.com/matrixorigin/matrixone/pkg/cnservice.(service).handleCommands | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/server_heartbeat.go:97 | github.com/matrixorigin/matrixone/pkg/cnservice.(service).heartbeat | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/server_heartbeat.go:85 | github.com/matrixorigin/matrixone/pkg/cnservice.(service).heartbeatTask | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/server_heartbeat.go:52 | github.com/matrixorigin/matrixone/pkg/common/stopper.(Stopper).doRunCancelableTask.func1 | /go/src/github.com/matrixorigin/matrixone/pkg/common/stopper/stopper.go:259 | runtime.goexit | /usr/local/go/src/runtime/asm_amd64.s:1598 Wraps: (3) internal error: unknown data type collati Error types: (1) errutil.withContext (2) errutil.withStack (3) moerr.Error | | internal error: unknown d | internal error: unknown data type created | internal error: unknown data type created (1) Wraps: (2) -- stack trace: | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.ParseDataTypeToColType | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader_util.go:56 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).GetCurrentSchema | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:69 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).UpgradeNewViewColumn | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:208 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).Upgrade | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:171

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

fengttt commented 1 year ago

And this,

| internal error: can not g | internal error: can not get the schema | internal error: can not get the schema (1) Wraps: (2) -- stack trace: | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).GetCurrentSchema | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:79 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).UpgradeNewViewColumn | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:208 | github.com/matrixorigin/matrixone/pkg/cnservice/upgrader.(Upgrader).Upgrade | /go/src/github.com/matrixorigin/matrixone/pkg/cnservice/upgrader/upgrader.go:171 | github.com/matrixorigin/matrixone/pkg/cnservice.(service).upgrade

gavinyue commented 1 year ago

Looking

gavinyue commented 1 year ago

正在看 已经找到问题

gavinyue commented 1 year ago

The problem is that the upgrader only support limited column types now.
Will add current required.

gavinyue commented 1 year ago

{"level":"ERROR","time":"2023/10/26 01:27:44.663221 +0000","caller":"upgrader/upgrader.go:193","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'information_schema.processlist' under tenant 'sys:0' reports error: internal error: unknown data type host\u0000\u0000\u0000\ninternal error: unknown data type node_ty\ninternal error: unknown data type node_uu\ninternal error: unknown data type querytype\u0000\u0000\ninternal error: unknown data type request\ninternal error: unknown data type respons\ninternal error: unknown data type result\ninternal error: unknown data type role_id\ninternal error: unknown data type rows_re\ninternal error: unknown data type session\ninternal error: unknown data type sql_sou\ninternal error: unknown data type stateme\ninternal error: unknown data type stateme\ninternal error: unknown data type stateme\ninternal error: unknown data type stateme\ninternal error: unknown data type stats\u0000\u0000\ninternal error: unknown data type status\u0000\ninternal error: unknown data type transac\ninternal error: unknown data type user\u0000\u0000\u0000\ninternal error: unknown data type mo_fa\ninternal error: unknown data type moro\ninternal error: unknown data type account\u0000\u0000\u0000\u0000\u0000\ninternal error: unknown data type collect\ninternal error: unknown data type metric\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type type\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collect\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type type\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collect\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\ninternal error: unknown data type type\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collect\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type __mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collect\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type type\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collecttime\u0000\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type mo_ro\ninternal error: unknown data type account\ninternal error: unknown data type collect\ninternal error: unknown data type node\u0000\u0000\u0000\ninternal error: unknown data type role\u0000\u0000\u0000\ninternal error: unknown data type value\u0000\u0000\ninternal error: unknown data type __mo_fa\ninternal error: unknown data type moro\ninternal error: unknown data type column\ninternal error: unknown data type constra\ninternal error: unknown data type constra\ninternal error: unknown data type ordinal\ninternal error: unknown data type table_c\ninternal error: unknown data type table_n\ninternal error: unknown data type table_schema\ninternal error: unknown data type mo_fa\ninternal error: unknown data type __mo_ro\ninternal error: unknown data type block_o\ninternal error: unknown data type block_o\ninternal error: unknown data type context\ninternal error: unknown data type cpu_sys\ninternal error: unknown data type cpu_use\ninternal error: unknown data type duratio\ninternal error: unknown data type message\ninternal error: unknown data type message\ninternal error: unknown data type page_fa\ninternal error: unknown data type page_fa\ninternal error: unknown data type queryi\ninternal error: unknown data type seq\u0000\u0000\u0000\u0000\ninternal error: unknown data type source\ninternal error: unknown data type source\ninternal error: unknown data type source\ninternal error: unknown data type state\u0000\u0000\u0000\u0000\u0000\u0000\u0000\ninternal error: unknown data type swaps\u0000\u0000\ninternal error: unknown data type moro\ninternal error: unknown data type account\ninternal error: unknown data type client\ninternal error: unknown data type command\ninternal error: unknown data type conn_id\ninternal error: unknown data type db\u0000\u0000\u0000\u0000\u0000\ninternal error: can not get the schema "}


gavinyue commented 1 year ago

A similar error in loki. fix them together

gavinyue commented 1 year ago

https://github.com/matrixorigin/matrixone/pull/12409

one pr to fix the found problem for mo_cache upgrade

gavinyue commented 1 year ago

Pending

gavinyue commented 1 year ago

Blocked on another pr

gavinyue commented 1 year ago

https://github.com/matrixorigin/matrixone/pull/12409

需要这个PR

gavinyue commented 1 year ago

但是为什么column name 和type 弄错的问题, 还没复现, 这个只能留到1.2了

gavinyue commented 1 year ago

Pending

gavinyue commented 12 months ago

Pending

gavinyue commented 11 months ago

Pending

arjunsk commented 11 months ago

This issue has re-occurred in MO Cloud FreeTier01 (running 1.1-dev)

image

Graphana Link: here

The upgrade failure could be the root cause for https://github.com/matrixorigin/matrixone/issues/13038

arjunsk commented 11 months ago

I wanted to check, why are we ignoring the error returned by ug.Upgrade(moServerCtx) here

Incase of an upgrade failure we should panic and let the user know that the upgrade is not successful.

gavinyue commented 11 months ago

等待处理

gavinyue commented 11 months ago

Pending

gavinyue commented 11 months ago

https://github.com/matrixorigin/matrixone/issues/13146

Duplicate

gavinyue commented 11 months ago

Pending

gavinyue commented 11 months ago

Pending

gavinyue commented 10 months ago

Pending

gavinyue commented 10 months ago

Pending

gavinyue commented 10 months ago

Pending

gavinyue commented 10 months ago

Pending

gavinyue commented 10 months ago

Pending

gavinyue commented 10 months ago

Pending

daviszhen commented 9 months ago

未投入

qingxinhome commented 8 months ago

The fix for this bug depends on the refactoring of the framework upgrade #13633

qingxinhome commented 8 months ago

fixing

qingxinhome commented 8 months ago

PR has been submitted

qingxinhome commented 8 months ago

PR has been submitted

qingxinhome commented 8 months ago

PR has been submitted

qingxinhome commented 8 months ago

PR has been submitted

qingxinhome commented 8 months ago

处理中

qingxinhome commented 7 months ago

处理中

qingxinhome commented 7 months ago

Pending processing

qingxinhome commented 7 months ago

待合并

qingxinhome commented 7 months ago

The issue has been resolved and PR has been submitted. Please verify and test it @fengttt @sukki37 @aressu1985 @daviszhen