Skip to content
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

[hot-fix] Fix the NullPointerException when modifying the self-optimizing.enabled #2388

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

wangtaohz
Copy link
Contributor

Why are the changes needed?

When I changed the self-optimizing.enabled from true to false, I got this error message if there is no running optimizing process.

2023-11-30 15:43:29,206 ERROR [async-table-runtime-refresh-executor-0] [com.netease.arctic.server.table.RuntimeHandlerChain] [] - failed to handle, ignore and continue
java.lang.NullPointerException: null
	at com.netease.arctic.server.table.executor.TableRuntimeRefreshExecutor.handleConfigChanged(TableRuntimeRefreshExecutor.java:69) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.lambda$fireConfigChanged$2(RuntimeHandlerChain.java:67) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.doSilently(RuntimeHandlerChain.java:110) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:67) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.RuntimeHandlerChain.fireConfigChanged(RuntimeHandlerChain.java:70) ~[classes/:?]
	at com.netease.arctic.server.table.DefaultTableService.handleTableChanged(DefaultTableService.java:326) ~[classes/:?]
	at com.netease.arctic.server.table.TableRuntime.lambda$refresh$9(TableRuntime.java:223) ~[classes/:?]
	at com.netease.arctic.server.persistence.StatedPersistentBase.invokeConsisitency(StatedPersistentBase.java:45) ~[classes/:?]
	at com.netease.arctic.server.table.TableRuntime.refresh(TableRuntime.java:215) ~[classes/:?]
	at com.netease.arctic.server.table.executor.TableRuntimeRefreshExecutor.execute(TableRuntimeRefreshExecutor.java:81) ~[classes/:?]
	at com.netease.arctic.server.table.executor.BaseTableExecutor.executeTask(BaseTableExecutor.java:74) ~[classes/:?]
	at com.netease.arctic.server.table.executor.BaseTableExecutor.lambda$scheduleIfNecessary$4(BaseTableExecutor.java:83) ~[classes/:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_292]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_292]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_292]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_292]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]

Brief change log

  • make the optimizing process is not null before checking its status

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@github-actions github-actions bot added the module:ams-dashboard Ams dashboard module label Nov 30, 2023
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ca2061e) 52.96% compared to head (ed4a1bd) 52.96%.

Files Patch % Lines
...er/table/executor/TableRuntimeRefreshExecutor.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2388      +/-   ##
============================================
- Coverage     52.96%   52.96%   -0.01%     
+ Complexity     4303     4299       -4     
============================================
  Files           516      516              
  Lines         29716    29717       +1     
  Branches       2896     2897       +1     
============================================
  Hits          15739    15739              
- Misses        12699    12701       +2     
+ Partials       1278     1277       -1     
Flag Coverage Δ
core 53.35% <0.00%> (+0.02%) ⬆️
trino 50.89% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wangtaohz
Copy link
Contributor Author

cc @zhongqishang

Copy link
Contributor

@zhongqishang zhongqishang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@baiyangtx baiyangtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@baiyangtx baiyangtx merged commit dd316d4 into apache:master Dec 1, 2023
5 of 7 checks passed
@zhoujinsong zhoujinsong mentioned this pull request Dec 19, 2023
33 tasks
zhoujinsong pushed a commit that referenced this pull request Dec 19, 2023
…mizing.enabled` (#2388)

fix NPE

(cherry picked from commit dd316d4)
Signed-off-by: zhoujinsong <463763777@qq.com>
ShawHee pushed a commit to ShawHee/arctic that referenced this pull request Dec 29, 2023
@zhoujinsong zhoujinsong mentioned this pull request Jun 25, 2024
66 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants