amoro icon indicating copy to clipboard operation
amoro copied to clipboard

[Bug]: Expired the snapshot that is planning in optimizing process

Open HuangFru opened this issue 2 years ago • 0 comments

What happened?

Currently, we create TableOptimizingProcess after the planner is ready: image

When optimizing tasks are not committed, the snapshot with which it planned should not be expired: image

However, when a table is planned for too long, the snapshot of the table may be expired during planning. Because the TableOptimizingProcess has not been generated at this time, fetchOptimizingSnapshotTime will return Long.MAX_VALUE.

Then when we commit, we'll occur NPE: image

Affects Versions

master

What engines are you seeing the problem on?

AMS

How to reproduce

Construct a scenario as described in ‘what happened’.

Relevant log output

NPE problem.

Anything else

No response

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

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

HuangFru avatar Nov 27 '23 11:11 HuangFru