CRZbulabula opened a new pull request, #15930:
URL: https://github.com/apache/iotdb/pull/15930

   In this PR, we replace the `getDataPartition` with 
`getOrCreateDataPartition` when executing FetchDeviceLeader. As a result, the 
behavior of this interface is as follows:
   
   1. Return the corresponding region leader when both database and data 
partition are existed. Correct device leader URL: 0.0.0.0:6667
   2. Throw `StatementExecutionException` when database not existed. 301: 
Failed to fetch device leader: An error occurred when executing 
getOrCreateDataPartition():Create DataPartition failed because the database: 
test3 is not exists
   3. Automatically create a new data partition when the specified deviceId 
does not exist. Error deviceId device leader URL: 0.0.0.0:6667
   4. Automatically create a new data partition when the specified deviceId 
does not exist. Error tag device leader URL: 0.0.0.0:6667
   5. Automatically create a new data partition when the specified time 
partition does not exist. Error time device leader URL: 0.0.0.0:6667
   
   U can find detailed test cases in TableModelSessionPoolExample.java.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to