Skip to content

Commit 959a248

Browse files
committed
Adapt prefetch logic for new request state transition
1 parent a1ff809 commit 959a248

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/jrd/inf.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,7 @@ ULONG INF_request_info(const Request* request,
11241124

11251125
case isc_info_message_number:
11261126
case isc_info_message_size:
1127-
if (!(request->req_flags & req_active) ||
1128-
(request->req_operation != Request::req_receive &&
1129-
request->req_operation != Request::req_send))
1127+
if (!(request->req_flags & req_active))
11301128
{
11311129
buffer_ptr[0] = item;
11321130
item = isc_info_error;

src/remote/server/server.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4462,16 +4462,21 @@ static bool get_next_msg_no(Rrq* request, USHORT incarnation, USHORT * msg_numbe
44624462
switch (*info)
44634463
{
44644464
case isc_info_state:
4465-
if (n != isc_info_req_send)
4466-
return false;
4465+
// Request is in state req_send when it reached SuspendNode after start() or send()
4466+
// Request is in state req_stall when SuspendNode has just returned and generally
4467+
// it is unknown what next execution path can be. Still it is possible that it will
4468+
// lead to the next SuspendNode i.e. returning of the next record.
4469+
if (n == isc_info_req_send || n == isc_info_req_sql_stall)
4470+
result = true;
44674471
break;
44684472

44694473
case isc_info_message_number:
44704474
*msg_number = n;
4471-
result = true;
44724475
break;
44734476

44744477
default:
4478+
// Most likely this is isc_info_error which is returned for info_message_number
4479+
// if the request is inactive
44754480
return false;
44764481
}
44774482
info += 3 + l;

0 commit comments

Comments
 (0)