Skip to content

[Bug]: TableRuntime initialize failed when not have optimizer info for table #3810

@czy006

Description

@czy006

What happened?

When AMS Start by first time,TableRuntime will be initnal. If table doesn't have any optimizer info,restart ams will be error and failed.Because TableRuntimeMapper::selectAllStates have none table optimizer info

Affects Versions

master

What table formats are you seeing the problem on?

No response

What engines are you seeing the problem on?

AMS

How to reproduce

No response

Relevant log output

2025-10-09 10:17:16,121 ERROR [main] [org.apache.amoro.server.AmoroServiceContainer] [] - AMS start error
java.lang.NullPointerException: restoredStates must not be null.
	at org.apache.amoro.shade.guava32.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:921) ~[amoro-shade-guava-32-32.1.1-jre-0.7.0-incubating.jar:32.1.1-jre-0.7.0-incubating]
	at org.apache.amoro.server.table.DefaultTableRuntimeStore.<init>(DefaultTableRuntimeStore.java:71) ~[classes/:?]
	at org.apache.amoro.server.table.DefaultTableService.lambda$createTableRuntime$24(DefaultTableService.java:528) ~[classes/:?]
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_391]
	at org.apache.amoro.server.table.DefaultTableService.createTableRuntime(DefaultTableService.java:524) ~[classes/:?]
	at org.apache.amoro.server.table.DefaultTableService.initialize(DefaultTableService.java:186) ~[classes/:?]
	at org.apache.amoro.server.AmoroServiceContainer.startOptimizingService(AmoroServiceContainer.java:207) ~[classes/:?]
	at org.apache.amoro.server.AmoroServiceContainer.main(AmoroServiceContainer.java:138) [classes/:?]
2025-10-09 10:17:16,122 INFO [main] [org.apache.amoro.server.AmoroServiceContainer] [] - Stopping table service...

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions