public async Task ExecuteLastDataQueryAsync()

in src/Apache.IoTDB/SessionPool.cs [1890:1940]


        public async Task<SessionDataSet> ExecuteLastDataQueryAsync(List<string> paths, long lastTime)
        {
            TSExecuteStatementResp resp;
            TSStatus status;
            var client = _clients.Take();
            var req = new TSLastDataQueryReq(client.SessionId, paths, lastTime, client.StatementId)
            {
                FetchSize = _fetchSize,
                EnableRedirectQuery = false
            };
            try
            {
                resp = await client.ServiceClient.executeLastDataQueryAsync(req);
                status = resp.Status;
            }
            catch (TException e)
            {
                _clients.Add(client);

                await Open(_enableRpcCompression);
                client = _clients.Take();
                req.SessionId = client.SessionId;
                req.StatementId = client.StatementId;
                try
                {
                    resp = await client.ServiceClient.executeLastDataQueryAsync(req);
                    status = resp.Status;
                }
                catch (TException ex)
                {
                    _clients.Add(client);
                    throw new TException("Error occurs when executing last data query", ex);
                }
            }

            if (_utilFunctions.VerifySuccess(status, SuccessCode, RedirectRecommendCode) == -1)
            {
                _clients.Add(client);

                throw new TException("execute last data query failed", null);
            }

            _clients.Add(client);

            var sessionDataset = new SessionDataSet("", resp, _clients, client.StatementId)
            {
                FetchSize = _fetchSize,
            };

            return sessionDataset;
        }