in src/Apache.IoTDB/SessionPool.cs [1597:1643]
public async Task<int> TestInsertTabletAsync(Tablet tablet)
{
var client = _clients.Take();
var req = GenInsertTabletReq(tablet, client.SessionId);
try
{
var status = await client.ServiceClient.testInsertTabletAsync(req);
if (_debugMode)
{
_logger.LogInformation("insert one tablet to device {0}, server message: {1}", tablet.DeviceId,
status.Message);
}
return _utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode);
}
catch (TException e)
{
await Open(_enableRpcCompression);
client = _clients.Take();
req.SessionId = client.SessionId;
try
{
var status = await client.ServiceClient.testInsertTabletAsync(req);
if (_debugMode)
{
_logger.LogInformation("insert one tablet to device {0}, server message: {1}", tablet.DeviceId,
status.Message);
}
return _utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode);
}
catch (TException ex)
{
throw new TException("Error occurs when test inserting one tablet", ex);
}
}
finally
{
_clients.Add(client);
}
}