amoro
amoro copied to clipboard
[Bug]: Expired the snapshot that is planning in optimizing process
What happened?
Currently, we create TableOptimizingProcess after the planner is ready:
When optimizing tasks are not committed, the snapshot with which it planned should not be expired:
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:
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