public async Task InsertStringRecordAsync()

in src/Apache.IoTDB/SessionPool.cs [779:822]


        public async Task<int> InsertStringRecordAsync(string deviceId, List<string> measurements, List<string> values,
            long timestamp)
        {
            var client = _clients.Take();
            var req = GenInsertStrRecordReq(deviceId, measurements, values, timestamp, client.SessionId);
            try
            {
                var status = await client.ServiceClient.insertStringRecordAsync(req);

                if (_debugMode)
                {
                    _logger.LogInformation("insert one string record to device {0}, server message: {1}", 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.insertStringRecordAsync(req);

                    if (_debugMode)
                    {
                        _logger.LogInformation("insert one record to device {0}, server message: {1}", deviceId, status.Message);
                    }

                    return _utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode);

                }
                catch (TException ex)
                {
                    throw new TException("Error occurs when inserting a string record", ex);
                }
            }
            finally
            {
                _clients.Add(client);
            }
        }