Skip to content

[IOTDB-5901][To rel/1.1] Load: load tsfile without data will throw NPE#9894

Merged
SteveYurongSu merged 1 commit intoapache:rel/1.1from
yschengzi:IOTDB-5901
May 19, 2023
Merged

[IOTDB-5901][To rel/1.1] Load: load tsfile without data will throw NPE#9894
SteveYurongSu merged 1 commit intoapache:rel/1.1from
yschengzi:IOTDB-5901

Conversation

@yschengzi
Copy link
Copy Markdown
Contributor

Problems:
load a tsfile without data will throw NPE

java.lang.NullPointerException: null
at org.apache.iotdb.commons.partition.StorageExecutor.getDataNodeLocation(StorageExecutor.java:39)
at org.apache.iotdb.db.mpp.plan.planner.plan.FragmentInstance.setExecutorAndHost(FragmentInstance.java:107)
at org.apache.iotdb.db.mpp.plan.scheduler.load.LoadTsFileScheduler.loadLocally(LoadTsFileScheduler.java:319)
at org.apache.iotdb.db.mpp.plan.scheduler.load.LoadTsFileScheduler.start(LoadTsFileScheduler.java:140)
at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.schedule(QueryExecution.java:305)
at org.apache.iotdb.db.mpp.plan.execution.QueryExecution.start(QueryExecution.java:219)
at org.apache.iotdb.db.mpp.plan.Coordinator.execute(Coordinator.java:161)
at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:221)
at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementV2(ClientRPCServiceImpl.java:502)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3689)
at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3669)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.iotdb.db.service.thrift.ProcessorWithMetrics.process(ProcessorWithMetrics.java:64)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

This PR contains:

  • judge TsFile has data or not in LoadTsFileScheduler
  • add UT for loading TsFile without data

@SteveYurongSu SteveYurongSu self-assigned this May 19, 2023
@SteveYurongSu SteveYurongSu merged commit 30f0d1f into apache:rel/1.1 May 19, 2023
SteveYurongSu added a commit that referenced this pull request May 21, 2023
… unsequence dir (#9900)

Cherry-picked from rel/1.1. @yschengzi 

- [IOTDB-5869] Load strategy: load all files to unsequence dir (#9837)
- [IOTDB-5721] Delete TTimePartitionSlotTransmitLimit from iotdb-common.properties (#9863)
- [IOTDB-5901] Load: load tsfile without data will throw NPE (#9894)

---------

Co-authored-by: yschengzi <87161145+yschengzi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants